-
Notifications
You must be signed in to change notification settings - Fork 10.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add e2e tests for password-protected Single Product block template (#…
…44304) * Add e2e tests for password-protected Single Product block template * Add changefile(s) from automation for the following project(s): woocommerce-blocks * Fix tests --------- Co-authored-by: github-actions <github-actions@github.com>
- Loading branch information
1 parent
030e028
commit 6b9b659
Showing
4 changed files
with
41 additions
and
2 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
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
18 changes: 18 additions & 0 deletions
18
.../woocommerce-blocks/tests/e2e/tests/templates/single-product-template.block_theme.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,18 @@ | ||
/** | ||
* External dependencies | ||
*/ | ||
import { test, expect } from '@woocommerce/e2e-playwright-utils'; | ||
|
||
// Sunglasses are defined as requering password in /bin/scripts/products.sh. | ||
const productWithPasswordPermalink = '/product/sunglasses/'; | ||
|
||
test.describe( 'Single Product template', async () => { | ||
test( 'shows password form in products protected with password', async ( { | ||
page, | ||
} ) => { | ||
await page.goto( productWithPasswordPermalink ); | ||
await expect( | ||
page.getByText( 'This content is password protected.' ).first() | ||
).toBeVisible(); | ||
} ); | ||
} ); |
4 changes: 4 additions & 0 deletions
4
plugins/woocommerce/changelog/44304-fix-44297-single-product-password-test
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: add | ||
Comment: Add e2e tests for password-protected Single Product block template | ||
|