Commit 7c557a96602 for woocommerce
commit 7c557a9660258459e149c0586656747bf6d73608
Author: Vlad Olaru <vlad.olaru@automattic.com>
Date: Mon Sep 14 11:23:08 2026 +0300
[tests] Remove 4 duplicate Blocks role smoke E2E tests (#68578)
test(blocks): Remove 4 duplicate Blocks role smoke E2E tests
The Blocks E2E project kept basic.block_theme.spec.ts: four page-load
titles, each checking one storage state (the admin dashboard, the admin
post editor, the customer My Account page, and the guest home page).
Those titles only proved that a session authenticates. Every other
Blocks spec runs under one of the same three storage states and does
real work there, so a broken admin, customer, or guest session already
fails a retained journey, with a more useful error than a missing
heading. The spec was redundant with other browser tests, not with a
lower layer.
Delete the spec. Role coverage stays with retained Blocks titles that
use the same states: the admin post-editor journey in
handpicked-products.block_theme.spec.ts, the logged-in shopper My
Account journey in additional-fields.shopper.block_theme.spec.ts, and
the guest checkout journey in
checkout-block-locale-hide-country.block_theme.spec.ts.
Consolidates the mega-branch slices:
- Slice blocks-top-01-basic-duplicates: test(blocks): remove duplicate
role smoke coverage
Refs TESTOPS-234
Refs #68046
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
diff --git a/plugins/woocommerce/changelog/testops-234-remove-role-smoke-duplicate b/plugins/woocommerce/changelog/testops-234-remove-role-smoke-duplicate
new file mode 100644
index 00000000000..2ea9f3b53b9
--- /dev/null
+++ b/plugins/woocommerce/changelog/testops-234-remove-role-smoke-duplicate
@@ -0,0 +1,4 @@
+Significance: patch
+Type: dev
+Comment: Remove the duplicate Blocks role smoke E2E spec. The admin, customer, and guest sessions it loaded are already exercised by the retained Blocks editor, My Account, and storefront journeys.
+
diff --git a/plugins/woocommerce/tests/e2e/tests/blocks/basic.block_theme.spec.ts b/plugins/woocommerce/tests/e2e/tests/blocks/basic.block_theme.spec.ts
deleted file mode 100644
index 3a96fd42bf9..00000000000
--- a/plugins/woocommerce/tests/e2e/tests/blocks/basic.block_theme.spec.ts
+++ /dev/null
@@ -1,55 +0,0 @@
-/**
- * External dependencies
- */
-import { test, expect, customerFile, guestFile } from '@woocommerce/e2e-utils';
-
-test.describe( 'Basic role-based functionality tests', () => {
- test.describe( 'As admin', () => {
- // Admin is the default user, so no need to set storage state.
- test( 'Load Dashboard page', async ( { page } ) => {
- await page.goto( '/wp-admin' );
-
- await expect(
- page.getByRole( 'heading', { name: 'Dashboard' } )
- ).toHaveText( 'Dashboard' );
- } );
-
- test( 'Load iframed post editor', async ( { admin, editor } ) => {
- await admin.createNewPost();
- await expect( editor.canvas.owner() ).toBeVisible();
- } );
- } );
-
- test.describe( 'As customer', () => {
- test.use( {
- storageState: customerFile,
- } );
-
- test( 'Load My Account page', async ( { page } ) => {
- await page.goto( '/my-account' );
-
- await expect(
- page.getByRole( 'heading', { name: 'My Account' } )
- ).toBeVisible();
- await expect(
- page.getByText( 'Hello Jane Smith (not Jane Smith? Log out)' )
- ).toBeVisible();
- } );
- } );
-
- test.describe( 'As guest', () => {
- test.use( {
- storageState: guestFile,
- } );
-
- test( 'Load home page', async ( { page } ) => {
- await page.goto( '/' );
-
- await expect(
- page.getByRole( 'banner' ).getByRole( 'link', {
- name: 'WooCommerce Blocks E2E Test',
- } )
- ).toBeVisible();
- } );
- } );
-} );