ci/e2e tests against mobile (#55347)

Co-authored-by: sembauke <semboot699@gmail.com>
This commit is contained in:
Oliver Eyton-Williams
2024-07-03 06:45:35 +02:00
committed by GitHub
parent 65ee5c656c
commit 5b62ec7137
15 changed files with 133 additions and 56 deletions
+7 -2
View File
@@ -15,7 +15,8 @@ test.beforeEach(async () => {
});
test('should be possible to report a user from their profile page', async ({
page
page,
isMobile
}) => {
await page.goto('/twaha');
@@ -30,7 +31,11 @@ test('should be possible to report a user from their profile page', async ({
page.getByText("Do you want to report twaha's portfolio for abuse?")
).toBeVisible();
await page.getByRole('textbox').nth(1).fill('Some details');
// On mobile, the texarea is the first element due to the searchbox not being present
await page
.getByRole('textbox')
.nth(isMobile ? 0 : 1)
.fill('Some details');
await page.getByRole('button', { name: 'Submit the report' }).click();
await expect(page).toHaveURL('/learn');