[e2e tests] Fix basic spec for multiple environments (#49609)

This commit is contained in:
Adrian Moldovan 2024-07-17 09:53:36 +01:00 committed by GitHub
parent 2a877ecc7b
commit b32c742f3f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 7 additions and 5 deletions

View File

@ -0,0 +1,4 @@
Significance: patch
Type: dev
E2E tests: fix basic spec for multiple environments

View File

@ -6,7 +6,7 @@ config = {
retries: 0, retries: 0,
projects: [ projects: [
{ {
name: 'default', name: 'default pressable',
use: { ...devices[ 'Desktop Chrome' ] }, use: { ...devices[ 'Desktop Chrome' ] },
testMatch: '**basic.spec.js', testMatch: '**basic.spec.js',
}, },

View File

@ -6,7 +6,7 @@ config = {
retries: 0, retries: 0,
projects: [ projects: [
{ {
name: 'default', name: 'default wpcom',
use: { ...devices[ 'Desktop Chrome' ] }, use: { ...devices[ 'Desktop Chrome' ] },
testMatch: '**basic.spec.js', testMatch: '**basic.spec.js',
}, },

View File

@ -9,9 +9,7 @@ test( 'Load the home page', async ( { page } ) => {
.getByRole( 'link', { name: 'WooCommerce Core E2E Test' } ) .getByRole( 'link', { name: 'WooCommerce Core E2E Test' } )
.count() .count()
).toBeGreaterThan( 0 ); ).toBeGreaterThan( 0 );
await expect( await expect( page.getByText( /powered by WordPress/i ) ).toBeVisible();
page.getByText( 'Proudly powered by WordPress' )
).toBeVisible();
expect( await page.title() ).toBe( 'WooCommerce Core E2E Test Suite' ); expect( await page.title() ).toBe( 'WooCommerce Core E2E Test Suite' );
await expect( await expect(
page.getByRole( 'link', { name: 'WordPress' } ) page.getByRole( 'link', { name: 'WordPress' } )