diff --git a/apps/client/cypress/e2e/specs/admin/system-settings.e2e.ts b/apps/client/cypress/e2e/specs/admin/system-settings.e2e.ts index 56e0f86e2a..6eee006db8 100644 --- a/apps/client/cypress/e2e/specs/admin/system-settings.e2e.ts +++ b/apps/client/cypress/e2e/specs/admin/system-settings.e2e.ts @@ -7,7 +7,7 @@ describe('Administration system settings', () => { beforeEach(() => { cy.intercept('GET', 'api/v1/system/settings?key=maintenance').as('listMaintenanceSetting') cy.intercept('GET', 'api/v1/system/settings').as('listSystemSettings') - cy.intercept('POST', 'api/v1/system/settings').as('upsertSystemSetting') + cy.intercept('POST', 'api/v1/system/settings').as('upsertSystemSettings') cy.kcLogin('tcolin') cy.visit('/admin/system-settings') @@ -29,7 +29,7 @@ describe('Administration system settings', () => { cy.getByDataTestid(`toggle-maintenance`) .find('input') .check({ force: true }) - cy.wait('@upsertSystemSetting').its('response').then(($response) => { + cy.wait('@upsertSystemSettings').its('response').then(($response) => { expect($response?.statusCode).to.match(/^20\d$/) expect(JSON.stringify($response?.body)).to.equal(JSON.stringify({ key: 'maintenance', @@ -83,7 +83,7 @@ describe('Administration system settings', () => { cy.getByDataTestid(`toggle-maintenance`) .find('input') .uncheck({ force: true }) - cy.wait('@upsertSystemSetting').its('response').then(($response) => { + cy.wait('@upsertSystemSettings').its('response').then(($response) => { expect($response?.statusCode).to.match(/^20\d$/) expect(JSON.stringify($response?.body)).to.equal(JSON.stringify({ key: 'maintenance', diff --git a/apps/client/src/App.vue b/apps/client/src/App.vue index 32e5d9a600..489f11bed9 100644 --- a/apps/client/src/App.vue +++ b/apps/client/src/App.vue @@ -42,24 +42,18 @@ watch(label, (label: string) => { const systemSettings = ref() const serviceStore = useServiceStore() -onBeforeMount(() => { - serviceStore.startHealthPolling() - serviceStore.checkServicesHealth() - - systemStore.listSystemSettings() +onBeforeMount(async () => { + await serviceStore.startHealthPolling() + await serviceStore.checkServicesHealth() + await systemStore.listSystemSettings() systemSettings.value = systemStore.systemSettings })