fix(e2e): Missing await on page.goto in org-members tests (#12525)

These tests are failing in the Last Two Days in the latest test report.

Error:
```
61 |
      62 |   // A modal dialog appears
    > 63 |   await expect(page.locator('#add-member-modal')).toBeVisible();
         |                                                   ^
      64 |
      65 |   // Fill in the name of the user to add
      66 |   await page.locator('#search-user-box input').fill('user5');
        at /workspace/forgejo/forgejo/tests/e2e/org-members.test.e2e.ts:63:51
```

The `page.goto` in the tests are unawaited, which leads to the page not
fully loaded to proceed with the next lines to check for visibility.

The fix is to add `await` on `page.goto()` in all the missing places in
this test file - `org-members.test.e2e.ts`.

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/12525
Reviewed-by: Otto <otto@codeberg.org>
This commit is contained in:
Nirmal Kumar R
2026-05-12 05:05:16 +02:00
committed by Gusted
parent 32b8d732b8
commit 9d37ac68ee
+3 -3
View File
@@ -12,7 +12,7 @@ import {test} from './utils_e2e.ts';
test.use({user: 'user2'});
test('Toggle visibility', async ({page}) => {
page.goto('/org/org3/members');
await page.goto('/org/org3/members');
// Button "Make hidden" for user2's row
const hideUser2 = page.locator('.link-action[data-url="/org/org3/members/action/private?uid=2"]');
@@ -34,7 +34,7 @@ test('Toggle visibility', async ({page}) => {
});
test('Leave org', async ({page}) => {
page.goto('/org/org3/members');
await page.goto('/org/org3/members');
// Button "Leave" for user2's row
const leaveButton = page.locator('.delete-button[data-url="/org/org3/members/action/leave"]');
@@ -53,7 +53,7 @@ test('Leave org', async ({page}) => {
});
test('Add and remove a new member to the org', async ({page}) => {
page.goto('/org/org3/members');
await page.goto('/org/org3/members');
// Click the "Add member" button
const newMemberButton = page.locator('#add-org-member-button');