Skip to content

Commit c2dd1ff

Browse files
committed
Clean up phpMyAdmin and Adminer tests
1 parent 3d25a7f commit c2dd1ff

File tree

1 file changed

+7
-9
lines changed

1 file changed

+7
-9
lines changed

packages/playground/website/playwright/e2e/website-ui.spec.ts

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -360,7 +360,7 @@ test.describe('Database panel', () => {
360360

361361
test('should load and open Adminer', async ({ website, context }) => {
362362
const adminerButton = website.page.getByRole('button', {
363-
name: /Open Adminer/i,
363+
name: 'Open Adminer',
364364
});
365365
await expect(adminerButton).toBeVisible();
366366
await expect(adminerButton).toBeEnabled();
@@ -432,7 +432,7 @@ test.describe('Database panel', () => {
432432

433433
test('should load and open phpMyAdmin', async ({ website, context }) => {
434434
const phpMyAdminButton = website.page.getByRole('button', {
435-
name: /Open phpMyAdmin/i,
435+
name: 'Open phpMyAdmin',
436436
});
437437
await expect(phpMyAdminButton).toBeVisible();
438438
await expect(phpMyAdminButton).toBeEnabled();
@@ -465,7 +465,7 @@ test.describe('Database panel', () => {
465465
.locator('tr')
466466
.filter({ hasText: 'wp_posts' })
467467
.first();
468-
await expect(wpPostsRow).toBeVisible({ timeout: 10000 });
468+
await expect(wpPostsRow).toBeVisible();
469469
await waitForAjaxHandlers();
470470
await wpPostsRow.getByRole('link', { name: 'Browse' }).click();
471471
await newPage.waitForLoadState();
@@ -480,14 +480,12 @@ test.describe('Database panel', () => {
480480
.first()
481481
.click();
482482
await newPage.waitForLoadState();
483-
const pmaForm = newPage.locator(
484-
'form#insertForm, form[name="insertForm"]'
485-
);
486-
await expect(pmaForm).toBeVisible({ timeout: 10000 });
487-
await expect(pmaForm).toContainText('Welcome to WordPress.');
483+
const editForm = newPage.locator('form#insertForm');
484+
await expect(editForm).toBeVisible();
485+
await expect(editForm).toContainText('Welcome to WordPress.');
488486

489487
// Update the post content
490-
const postContentRow = pmaForm
488+
const postContentRow = editForm
491489
.locator('tr')
492490
.filter({ hasText: 'post_content' })
493491
.first();

0 commit comments

Comments
 (0)