Skip to content
This repository has been archived by the owner on Dec 9, 2024. It is now read-only.

Commit

Permalink
Change the health check for e2e
Browse files Browse the repository at this point in the history
  • Loading branch information
Quentin MOUTY committed Sep 27, 2024
1 parent 8a69b8a commit a5df22a
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions tests/configEditor.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ test('"Save & test" should be successful when configuration is valid', async ({
const healthCheckPath = `${selectors.apis.DataSource.proxy(
configPage.datasource.uid,
configPage.datasource.id.toString()
)}/health`;
)}/api/v0/healthcheck`;
console.log("test1: healthCheckPath: " +healthCheckPath)
await page.route(healthCheckPath, async (route) => await route.fulfill({ status: 200, body: 'OK' }));
await expect(configPage.saveAndTest({ path: healthCheckPath })).toBeOK();
});
Expand All @@ -26,8 +27,8 @@ test('"Save & test" should display success alert box when config is valid', asyn
const healthCheckPath = `${selectors.apis.DataSource.proxy(
configPage.datasource.uid,
configPage.datasource.id.toString()
)}/health`;
console.log("healthCheckPath: " +healthCheckPath)
)}/api/v0/healthcheck`;
console.log("test2: healthCheckPath: " +healthCheckPath)
await expect(configPage.saveAndTest({ path: healthCheckPath })).not.toBeOK();
expect(configPage).toHaveAlert('error');
});

0 comments on commit a5df22a

Please sign in to comment.