Skip to content

The easy-to-use open source Business Intelligence and Embedded Analytics tool that lets everyone work with data :bar_chart:

refetch settings after updating remote sync settings (#65124)

Aleksandr Lesnenko38e2e81388cf
diff --git a/e2e/test/scenarios/admin/remote-sync.cy.spec.ts b/e2e/test/scenarios/admin/remote-sync.cy.spec.ts
index 5db5a69fc29..37b04451d9f 100644
--- a/e2e/test/scenarios/admin/remote-sync.cy.spec.ts
+++ b/e2e/test/scenarios/admin/remote-sync.cy.spec.ts
@@ -242,7 +242,7 @@ describe("Remote Sync", () => {
});
});
- describe.skip("remote sync admin settings page", () => {
+ describe("remote sync admin settings page", () => {
beforeEach(() => {
H.restore();
H.activateToken("bleeding-edge");
@@ -262,8 +262,8 @@ describe("Remote Sync", () => {
.findByText("Success")
.should("exist");
- //TODO: We should be able to remove this, but for now we need to do a page refresh to see changes
- cy.visit("/");
+ H.modal().should("not.exist", { timeout: 10000 });
+ cy.findByTestId("exit-admin").click();
H.navigationSidebar().within(() => {
cy.findByRole("heading", { name: /synced collections/i }).should(
@@ -293,8 +293,8 @@ describe("Remote Sync", () => {
.findByText("Success")
.should("exist");
- //TODO: We should be able to remove this, but for now we need to do a page refresh to see changes
- cy.visit("/");
+ H.modal().should("not.exist", { timeout: 10000 });
+ cy.findByTestId("exit-admin").click();
H.navigationSidebar().within(() => {
cy.findByRole("heading", { name: /synced collections/i }).should(
@@ -319,7 +319,9 @@ describe("Remote Sync", () => {
.findByText("Failed")
.should("exist");
cy.findByTestId("admin-layout-content")
- .findByText("Invalid git settings")
+ .findByText(
+ "Unable to connect to git repository with the provided settings",
+ )
.should("exist");
});
});
diff --git a/enterprise/frontend/src/metabase-enterprise/api/remote-sync.ts b/enterprise/frontend/src/metabase-enterprise/api/remote-sync.ts
index 5d2149ca70d..52b717905c0 100644
--- a/enterprise/frontend/src/metabase-enterprise/api/remote-sync.ts
+++ b/enterprise/frontend/src/metabase-enterprise/api/remote-sync.ts
@@ -87,6 +87,7 @@ export const remoteSyncApi = EnterpriseApi.injectEndpoints({
url: `/api/ee/remote-sync/settings`,
body: settings,
}),
+ invalidatesTags: () => [tag("session-properties")],
}),
getBranches: builder.query<GetBranchesResponse, void>({
query: () => ({