Skip to content

Commit b181d54

Browse files
fixed front tests
1 parent 2d345c7 commit b181d54

File tree

2 files changed

+87
-3
lines changed

2 files changed

+87
-3
lines changed

tests/tests_end_to_end/test_frontend_e2e.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ def logged_in_page(page: Page) -> Page:
2020
page.fill("#signin-email", DEFAULT_TEST_USER["username"])
2121
page.fill("#signin-password", DEFAULT_TEST_USER["password"])
2222
page.click("#signin-btn")
23-
page.wait_for_selector("#projects-grid, #projects-empty", timeout=10_000)
23+
page.wait_for_selector("#projects-grid:not(.hidden), #projects-empty:not(.hidden)", timeout=10_000)
2424
return page
2525

2626

@@ -53,7 +53,7 @@ def test_login_with_valid_credentials(self, page: Page):
5353
page.fill("#signin-email", DEFAULT_TEST_USER["username"])
5454
page.fill("#signin-password", DEFAULT_TEST_USER["password"])
5555
page.click("#signin-btn")
56-
expect(page.locator("#projects-grid, #projects-empty")).to_be_visible(timeout=10_000)
56+
expect(page.locator("#projects-grid:not(.hidden), #projects-empty:not(.hidden)")).to_be_visible(timeout=10_000)
5757

5858
def test_login_with_invalid_credentials_shows_error(self, page: Page):
5959
page.goto(BASE_URL)
@@ -72,7 +72,9 @@ class TestNavigation:
7272
"""Navigation de base dans la SPA."""
7373

7474
def test_projects_page_shows_content(self, logged_in_page: Page):
75-
expect(logged_in_page.locator("#projects-grid, #projects-empty")).to_be_visible(timeout=10_000)
75+
expect(logged_in_page.locator("#projects-grid:not(.hidden), #projects-empty:not(.hidden)")).to_be_visible(
76+
timeout=10_000
77+
)
7678

7779
def test_governance_page_loads(self, logged_in_page: Page):
7880
logged_in_page.click("[data-route='governance']")

uv.lock

Lines changed: 82 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)