-
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.
Minor improvements to WooPay test coverage (#9671)
- Loading branch information
Showing
5 changed files
with
74 additions
and
1 deletion.
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,5 @@ | ||
Significance: patch | ||
Type: dev | ||
Comment: Minor improvements to automated tests around WooPay | ||
|
||
|
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
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
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, Page } from '@playwright/test'; | ||
/** | ||
* Internal dependencies | ||
*/ | ||
import { getMerchant } from '../../utils/helpers'; | ||
import { activateWooPay, deactivateWooPay } from '../../utils/merchant'; | ||
|
||
test.describe( 'WooPay setup', () => { | ||
let merchantPage: Page; | ||
let wasWooPayEnabled: boolean; | ||
|
||
test.beforeAll( async ( { browser } ) => { | ||
merchantPage = ( await getMerchant( browser ) ).merchantPage; | ||
wasWooPayEnabled = await activateWooPay( merchantPage ); | ||
} ); | ||
|
||
test.afterAll( async () => { | ||
if ( ! wasWooPayEnabled ) { | ||
await deactivateWooPay( merchantPage ); | ||
} | ||
} ); | ||
|
||
test( 'can disable the WooPay feature', async () => { | ||
await deactivateWooPay( merchantPage ); | ||
} ); | ||
|
||
test( 'can enable the WooPay feature', async () => { | ||
await activateWooPay( merchantPage ); | ||
} ); | ||
} ); |
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