Skip to content

Commit 1a93f5a

Browse files
committed
test: revert playwright setup
1 parent cd303c7 commit 1a93f5a

File tree

1 file changed

+30
-0
lines changed

1 file changed

+30
-0
lines changed

tests/e2e/basic.spec.js

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,11 @@ test.describe( 'Search & Replace', () => {
1111
} );
1212

1313
test( 'it displays the plugin icon', async ( { page } ) => {
14+
const closeIcon = page.getByRole( 'button', { name: 'Close' } );
15+
16+
await expect( closeIcon ).toBeVisible();
17+
await closeIcon.click();
18+
1419
const pluginIcon = page.getByRole( 'button', {
1520
name: 'Search & Replace',
1621
} );
@@ -19,6 +24,11 @@ test.describe( 'Search & Replace', () => {
1924
} );
2025

2126
test( 'it displays modal on icon click', async ( { page } ) => {
27+
const closeIcon = page.getByRole( 'button', { name: 'Close' } );
28+
29+
await expect( closeIcon ).toBeVisible();
30+
await closeIcon.click();
31+
2232
// Click Plugin icon.
2333
await expect(
2434
page.getByRole( 'button', {
@@ -74,6 +84,11 @@ test.describe( 'Search & Replace', () => {
7484
} );
7585

7686
test( 'it matches text within the body content', async ( { page } ) => {
87+
const closeIcon = page.getByRole( 'button', { name: 'Close' } );
88+
89+
await expect( closeIcon ).toBeVisible();
90+
await closeIcon.click();
91+
7792
// Populate post title & content.
7893
const postTitle = page
7994
.locator( 'iframe[name="editor-canvas"]' )
@@ -125,6 +140,11 @@ test.describe( 'Search & Replace', () => {
125140
} );
126141

127142
test( 'it performs search and replace for text', async ( { page } ) => {
143+
const closeIcon = page.getByRole( 'button', { name: 'Close' } );
144+
145+
await expect( closeIcon ).toBeVisible();
146+
await closeIcon.click();
147+
128148
// Populate post title & content.
129149
const postTitle = page
130150
.locator( 'iframe[name="editor-canvas"]' )
@@ -190,6 +210,11 @@ test.describe( 'Search & Replace', () => {
190210
} );
191211

192212
test( 'it matches text case for search and replace', async ( { page } ) => {
213+
const closeIcon = page.getByRole( 'button', { name: 'Close' } );
214+
215+
await expect( closeIcon ).toBeVisible();
216+
await closeIcon.click();
217+
193218
// Populate post title & content.
194219
const postTitle = page
195220
.locator( 'iframe[name="editor-canvas"]' )
@@ -263,6 +288,11 @@ test.describe( 'Search & Replace', () => {
263288
test( 'it toggles case matching and use regular expression by default', async ( {
264289
page,
265290
} ) => {
291+
const closeIcon = page.getByRole( 'button', { name: 'Close' } );
292+
293+
await expect( closeIcon ).toBeVisible();
294+
await closeIcon.click();
295+
266296
await page.getByRole( 'link', { name: 'View Posts' } ).click();
267297
await expect(
268298
page.getByRole( 'link', { name: 'Posts', exact: true } )

0 commit comments

Comments
 (0)