Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve password-protected Single Product block template to verify correct template is displayed after correct password is introduced #44452

Merged
merged 2 commits into from
Feb 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ wp wc product update $tshirt_with_logo_product_id --in_stock=false --user=1
sunglasses_product_id=$(wp post list --post_type=product --field=ID --name="Sunglasses" --format=ids)
wp post update $sunglasses_product_id --post_password="password" --user=1


# Enable attribute archives.
attribute_ids=$(wp wc product_attribute list --fields=id --format=ids --user=1)
if [ -n "$attribute_ids" ]; then
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,13 @@ test.describe( 'Single Product template', async () => {
await expect(
page.getByText( 'This content is password protected.' ).first()
).toBeVisible();

// Verify after introducing the password, the page is visible.
await page.getByLabel( 'Password:' ).fill( 'password' );
await page.getByRole( 'button', { name: 'Enter' } ).click();
await expect(
page.getByRole( 'link', { name: 'Description' } )
).toBeVisible();
} );

test( 'loads the Single Product template for a specific product', async ( {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Significance: patch
Type: update
Comment: Improve password-protected Single Product block template to verify correct template is displayed after correct password is introduced.