fix(e2e): Ajust E2E test because there is no default condition anymore

This commit is contained in:
Ionys 2024-11-18 10:52:12 +01:00
parent 90b9aeffb8
commit 72ecf7dbf2

View file

@ -28,16 +28,16 @@ test.describe("Monitor Form", () => {
await selectMonitorType(page); await selectMonitorType(page);
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-group-button").click(); await page.getByTestId("add-group-button").click();
expect(await page.getByTestId("condition-group").count()).toEqual(1); expect(await page.getByTestId("condition-group").count()).toEqual(1);
expect(await page.getByTestId("condition").count()).toEqual(3); // 2 solo conditions + 1 condition in group expect(await page.getByTestId("condition").count()).toEqual(2); // 1 solo conditions + 1 condition in group
await screenshot(testInfo, page); await screenshot(testInfo, page);
await page.getByTestId("remove-condition").first().click(); await page.getByTestId("remove-condition").first().click();
expect(await page.getByTestId("condition").count()).toEqual(2); // 1 solo condition + 1 condition in group expect(await page.getByTestId("condition").count()).toEqual(1); // 0 solo condition + 1 condition in group
await page.getByTestId("remove-condition-group").first().click(); await page.getByTestId("remove-condition-group").first().click();
expect(await page.getByTestId("condition-group").count()).toEqual(0); expect(await page.getByTestId("condition-group").count()).toEqual(0);