Make the "Create query" location workspace-specific (#2769)

This commit is contained in:
Shati Patel
2023-08-31 15:02:10 +01:00
committed by GitHub
parent 11ca60f213
commit 66f12bfbef
3 changed files with 7 additions and 4 deletions

View File

@@ -670,7 +670,7 @@ export function getQlPackLocation(): string | undefined {
}
export async function setQlPackLocation(folder: string | undefined) {
await QL_PACK_LOCATION.updateValue(folder, ConfigurationTarget.Global);
await QL_PACK_LOCATION.updateValue(folder, ConfigurationTarget.Workspace);
}
/**
@@ -690,7 +690,10 @@ export function getAutogenerateQlPacks(): AutogenerateQLPacks {
}
export async function setAutogenerateQlPacks(choice: AutogenerateQLPacks) {
await AUTOGENERATE_QL_PACKS.updateValue(choice, ConfigurationTarget.Global);
await AUTOGENERATE_QL_PACKS.updateValue(
choice,
ConfigurationTarget.Workspace,
);
}
/**

View File

@@ -399,7 +399,7 @@ describe("SkeletonQueryWizard", () => {
await wizard.determineStoragePath();
expect(updateValueSpy).toHaveBeenCalledWith(storagePath, 1);
expect(updateValueSpy).toHaveBeenCalledWith(storagePath, 2);
});
describe("when the user is using the codespace template", () => {

View File

@@ -628,7 +628,7 @@ describe("local databases", () => {
await (databaseManager as any).createSkeletonPacks(mockDbItem);
expect(generateSpy).not.toBeCalled();
expect(updateValueSpy).toHaveBeenCalledWith("never", 1);
expect(updateValueSpy).toHaveBeenCalledWith("never", 2);
});
it("should create the skeleton QL pack for the user", async () => {