-
Notifications
You must be signed in to change notification settings - Fork 69
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Convert merchant admin transactions E2E tests to Playwright (#10174)
- Loading branch information
Showing
5 changed files
with
45 additions
and
40 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
Significance: patch | ||
Type: dev | ||
|
||
Convert merchant admin transactions E2E test to Playwright |
Binary file added
BIN
+111 KB
...n-transactions.spec.ts/Admin-transactions-page-should-load-without-errors-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
33 changes: 33 additions & 0 deletions
33
tests/e2e-pw/specs/merchant/merchant-admin-transactions.spec.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
/** | ||
* External dependencies | ||
*/ | ||
import test, { expect } from '@playwright/test'; | ||
|
||
/** | ||
* Internal dependencies | ||
*/ | ||
import { shouldRunSubscriptionsTests } from '../../utils/constants'; | ||
import { getMerchant } from '../../utils/helpers'; | ||
import { goToTransactions } from '../../utils/merchant-navigation'; | ||
|
||
test.describe( 'Admin transactions', () => { | ||
test( 'page should load without errors', async ( { browser } ) => { | ||
const { merchantPage } = await getMerchant( browser ); | ||
await goToTransactions( merchantPage ); | ||
await expect( | ||
merchantPage | ||
.getByLabel( 'Transactions', { exact: true } ) | ||
.getByRole( 'heading', { name: 'Transactions' } ) | ||
).toBeVisible(); | ||
|
||
if ( shouldRunSubscriptionsTests ) { | ||
await expect( | ||
merchantPage.getByRole( 'columnheader', { | ||
name: 'Subscription number', | ||
} ) | ||
).toBeVisible(); | ||
} | ||
|
||
await expect( merchantPage ).toHaveScreenshot(); | ||
} ); | ||
} ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
40 changes: 0 additions & 40 deletions
40
tests/e2e/specs/wcpay/merchant/merchant-admin-transactions.spec.js
This file was deleted.
Oops, something went wrong.