mirror of
https://github.com/louislam/uptime-kuma.git
synced 2025-02-25 21:15:55 +00:00
fix(e2e): Ajust E2E test because there is no default condition anymore
This commit is contained in:
parent
72ecf7dbf2
commit
42442bf1f8
1 changed files with 6 additions and 2 deletions
|
@ -60,7 +60,10 @@ test.describe("Monitor Form", () => {
|
||||||
await resolveTypeSelect.getByRole("option", { name: "NS" }).click();
|
await resolveTypeSelect.getByRole("option", { name: "NS" }).click();
|
||||||
|
|
||||||
await page.getByTestId("add-condition-button").click();
|
await page.getByTestId("add-condition-button").click();
|
||||||
expect(await page.getByTestId("condition").count()).toEqual(2); // 1 added by default + 1 explicitly added
|
expect(await page.getByTestId("condition").count()).toEqual(1); // 1 explicitly added
|
||||||
|
|
||||||
|
await page.getByTestId("add-condition-button").click();
|
||||||
|
expect(await page.getByTestId("condition").count()).toEqual(2); // 2 explicitly added
|
||||||
|
|
||||||
await page.getByTestId("condition-value").nth(0).fill("a.iana-servers.net");
|
await page.getByTestId("condition-value").nth(0).fill("a.iana-servers.net");
|
||||||
await page.getByTestId("condition-and-or").nth(0).selectOption("or");
|
await page.getByTestId("condition-and-or").nth(0).selectOption("or");
|
||||||
|
@ -89,7 +92,8 @@ test.describe("Monitor Form", () => {
|
||||||
await resolveTypeSelect.click();
|
await resolveTypeSelect.click();
|
||||||
await resolveTypeSelect.getByRole("option", { name: "NS" }).click();
|
await resolveTypeSelect.getByRole("option", { name: "NS" }).click();
|
||||||
|
|
||||||
expect(await page.getByTestId("condition").count()).toEqual(1); // 1 added by default
|
await page.getByTestId("add-condition-button").click();
|
||||||
|
expect(await page.getByTestId("condition").count()).toEqual(1); // 1 explicitly added
|
||||||
|
|
||||||
await page.getByTestId("condition-value").nth(0).fill("definitely-not.net");
|
await page.getByTestId("condition-value").nth(0).fill("definitely-not.net");
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue