From df8bf7b4a37d84893cdfc979b98fec02b77ef0d2 Mon Sep 17 00:00:00 2001 From: Gustavo Lira e Silva Date: Wed, 4 Dec 2024 11:44:46 -0300 Subject: [PATCH 1/2] Add UI helper to open sidebar in config map test (#2055) Integrated the UIhelper utility to open the "Home" sidebar in the configuration map test. This enhances the test by ensuring the correct UI state before verifying the page title, improving accuracy and reliability. Signed-off-by: Gustavo Lira --- e2e-tests/playwright/e2e/configuration-test/config-map.spec.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/e2e-tests/playwright/e2e/configuration-test/config-map.spec.ts b/e2e-tests/playwright/e2e/configuration-test/config-map.spec.ts index c403f0ebd2..15dc21b8fd 100644 --- a/e2e-tests/playwright/e2e/configuration-test/config-map.spec.ts +++ b/e2e-tests/playwright/e2e/configuration-test/config-map.spec.ts @@ -2,6 +2,7 @@ import { test, expect } from "@playwright/test"; import { KubeClient } from "../../utils/kube-client"; import { LOGGER } from "../../utils/logger"; import { Common } from "../../utils/common"; +import { UIhelper } from "../../utils/ui-helper"; test.describe("Change app-config at e2e test runtime", () => { test("Verify title change after ConfigMap modification", async ({ page }) => { @@ -29,6 +30,7 @@ test.describe("Change app-config at e2e test runtime", () => { const common = new Common(page); await common.loginAsGuest(); + await new UIhelper(page).openSidebar("Home"); LOGGER.info("Verifying new title in the UI..."); expect(await page.title()).toContain(dynamicTitle); LOGGER.info("Title successfully verified in the UI."); From 04df020562d99746f45d7614fa220c266b2cdcc4 Mon Sep 17 00:00:00 2001 From: Nil Gallego Date: Wed, 4 Dec 2024 15:51:28 +0100 Subject: [PATCH 2/2] docs: adding general rules to e2e contribution guidelines (#1966) * adding general rules * Update CONTRIBUTING.MD --- docs/e2e-tests/CONTRIBUTING.MD | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/docs/e2e-tests/CONTRIBUTING.MD b/docs/e2e-tests/CONTRIBUTING.MD index 6f36164e3a..7353956d4a 100644 --- a/docs/e2e-tests/CONTRIBUTING.MD +++ b/docs/e2e-tests/CONTRIBUTING.MD @@ -37,6 +37,13 @@ These principles are valid for new contributions. Some parts of the codebase may All architecture principles and guidelines must be agreed upon by the team. Every team member's voice is important, and open communication ensures alignment and shared understanding of the project's direction. +6. **General Rules** + + All tests have to follow a set of simple rules: + I. Check the preconditions. If tests are running in parallel, try to create the preconditions you need to avoid race conditions. + II. Each test has to test one and only one thing. + III. All tests have to contain preconditions, actions, and assertions, like you whould do in [Gherkin](https://cucumber.io/docs/guides/overview/); think in those terms. + #### Technical Guidelines 1. **Page Object Model (POM)**