Refactor NotificationsClient (#270)

This commit is contained in:
Steve Faulkner
2020-10-12 22:10:28 -05:00
committed by GitHub
parent 3b64d75322
commit cfb9a0b321
28 changed files with 75 additions and 157 deletions

View File

@@ -27,13 +27,9 @@ describe("Documents tab", () => {
});
describe("showPartitionKey", () => {
const explorer = new Explorer({
notificationsClient: null
});
const explorer = new Explorer();
const mongoExplorer = new Explorer({
notificationsClient: null
});
const mongoExplorer = new Explorer();
mongoExplorer.defaultExperience(Constants.DefaultAccountExperience.MongoDB);
const collectionWithoutPartitionKey = <ViewModels.Collection>(<unknown>{

View File

@@ -49,7 +49,7 @@ describe("Query Tab", () => {
let explorer: Explorer;
beforeEach(() => {
explorer = new Explorer({ notificationsClient: null });
explorer = new Explorer();
});
it("should be true for accounts using SQL API", () => {
@@ -69,7 +69,7 @@ describe("Query Tab", () => {
let explorer: Explorer;
beforeEach(() => {
explorer = new Explorer({ notificationsClient: null });
explorer = new Explorer();
});
it("should be visible when using a supported API", () => {

View File

@@ -79,7 +79,7 @@ describe("Settings tab", () => {
};
beforeEach(() => {
explorer = new Explorer({ notificationsClient: null });
explorer = new Explorer();
explorer.hasAutoPilotV2FeatureFlag = ko.computed<boolean>(() => true);
});
@@ -178,7 +178,7 @@ describe("Settings tab", () => {
let explorer: Explorer;
beforeEach(() => {
explorer = new Explorer({ notificationsClient: null });
explorer = new Explorer();
explorer.hasAutoPilotV2FeatureFlag = ko.computed<boolean>(() => true);
});
@@ -256,7 +256,7 @@ describe("Settings tab", () => {
let explorer: Explorer;
beforeEach(() => {
explorer = new Explorer({ notificationsClient: null });
explorer = new Explorer();
explorer.hasAutoPilotV2FeatureFlag = ko.computed<boolean>(() => true);
});
@@ -337,9 +337,7 @@ describe("Settings tab", () => {
}
function getCollection(defaultApi: string, partitionKeyOption: PartitionKeyOption) {
const explorer = new Explorer({
notificationsClient: null
});
const explorer = new Explorer();
explorer.defaultExperience(defaultApi);
explorer.hasAutoPilotV2FeatureFlag = ko.computed<boolean>(() => true);
@@ -469,9 +467,7 @@ describe("Settings tab", () => {
describe("AutoPilot", () => {
function getCollection(autoPilotTier: DataModels.AutopilotTier) {
const explorer = new Explorer({
notificationsClient: null
});
const explorer = new Explorer();
explorer.hasAutoPilotV2FeatureFlag = ko.computed<boolean>(() => true);
explorer.databaseAccount({

View File

@@ -16,7 +16,7 @@ describe("Tabs manager tests", () => {
let documentsTab: DocumentsTab;
beforeAll(() => {
explorer = new Explorer({ notificationsClient: undefined });
explorer = new Explorer();
explorer.databaseAccount = ko.observable<DataModels.DatabaseAccount>({
id: "test",
name: "test",