mirror of
https://github.com/go-gitea/gitea.git
synced 2026-11-09 17:37:20 -06:00
test(e2e): assert server-rendered biography after profile update (#40176)
Since Playwright 1.56, a WebKit click on a native submit button can return before the form navigation starts, so `toHaveValue` passed on the old page with the value `fill()` just set, and the next step raced the reload. Assert the textarea's text instead, its server-rendered default, which only the reloaded page has. --------- Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
This commit is contained in:
@@ -10,11 +10,11 @@ test('update profile biography', async ({page, request}) => {
|
||||
await page.getByLabel('Biography').fill(bio);
|
||||
await page.getByRole('button', {name: 'Update Profile'}).click();
|
||||
await expect(page.getByText('Your profile has been updated.', {exact: true})).toBeVisible();
|
||||
await expect(page.getByLabel('Biography')).toHaveValue(bio);
|
||||
await expect(page.getByLabel('Biography')).toHaveText(bio);
|
||||
await page.getByLabel('Biography').fill('');
|
||||
await page.getByRole('button', {name: 'Update Profile'}).click();
|
||||
await expect(page.getByText('Your profile has been updated.', {exact: true})).toBeVisible();
|
||||
await expect(page.getByLabel('Biography')).toHaveValue('');
|
||||
await expect(page.getByLabel('Biography')).toHaveText('');
|
||||
});
|
||||
|
||||
test('select and deselect all webhook events', async ({page}) => {
|
||||
|
||||
Reference in New Issue
Block a user