Skip to content

Commit

Permalink
Remove old tests, add missing checks
Browse files Browse the repository at this point in the history
  • Loading branch information
tpaksu committed Jan 10, 2025
1 parent 36dff35 commit efcefb6
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 75 deletions.
4 changes: 4 additions & 0 deletions tests/e2e-pw/specs/merchant/merchant-admin-analytics.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ test.describe( 'Admin order analytics', () => {
test( 'should load without any errors', async ( { browser } ) => {
const { merchantPage } = await getMerchant( browser );
await goToOrderAnalytics( merchantPage );
expect( merchantPage.getByText( 'Orders' ) ).toBe( 'h2:text="Orders"' );

Check failure on line 48 in tests/e2e-pw/specs/merchant/merchant-admin-analytics.spec.ts

View workflow job for this annotation

GitHub Actions / WC - latest

[merchant] › merchant/merchant-admin-analytics.spec.ts:45:6 › Admin order analytics › should load without any errors

1) [merchant] › merchant/merchant-admin-analytics.spec.ts:45:6 › Admin order analytics › should load without any errors Error: expect(received).toBe(expected) // Object.is equality Expected: "h2:text=\"Orders\"" Received: {"_frame": {"_guid": "frame@3ae84752d547b2b82d1ef792bbd69acc", "_type": "Frame"}, "_selector": "internal:text=\"Orders\"i"} 46 | const { merchantPage } = await getMerchant( browser ); 47 | await goToOrderAnalytics( merchantPage ); > 48 | expect( merchantPage.getByText( 'Orders' ) ).toBe( 'h2:text="Orders"' ); | ^ 49 | await expect( merchantPage ).toHaveScreenshot(); 50 | } ); 51 | test( 'orders table should have the customer currency column', async ( { at /home/runner/work/woocommerce-payments/woocommerce-payments/tests/e2e-pw/specs/merchant/merchant-admin-analytics.spec.ts:48:48

Check failure on line 48 in tests/e2e-pw/specs/merchant/merchant-admin-analytics.spec.ts

View workflow job for this annotation

GitHub Actions / WC - latest

[merchant] › merchant/merchant-admin-analytics.spec.ts:45:6 › Admin order analytics › should load without any errors

1) [merchant] › merchant/merchant-admin-analytics.spec.ts:45:6 › Admin order analytics › should load without any errors Retry #1 ─────────────────────────────────────────────────────────────────────────────────────── Error: expect(received).toBe(expected) // Object.is equality Expected: "h2:text=\"Orders\"" Received: {"_frame": {"_guid": "frame@127d91513aaee72c09e2fb64736bdb61", "_type": "Frame"}, "_selector": "internal:text=\"Orders\"i"} 46 | const { merchantPage } = await getMerchant( browser ); 47 | await goToOrderAnalytics( merchantPage ); > 48 | expect( merchantPage.getByText( 'Orders' ) ).toBe( 'h2:text="Orders"' ); | ^ 49 | await expect( merchantPage ).toHaveScreenshot(); 50 | } ); 51 | test( 'orders table should have the customer currency column', async ( { at /home/runner/work/woocommerce-payments/woocommerce-payments/tests/e2e-pw/specs/merchant/merchant-admin-analytics.spec.ts:48:48

Check failure on line 48 in tests/e2e-pw/specs/merchant/merchant-admin-analytics.spec.ts

View workflow job for this annotation

GitHub Actions / WC - latest

[merchant] › merchant/merchant-admin-analytics.spec.ts:45:6 › Admin order analytics › should load without any errors

1) [merchant] › merchant/merchant-admin-analytics.spec.ts:45:6 › Admin order analytics › should load without any errors Retry #2 ─────────────────────────────────────────────────────────────────────────────────────── Error: expect(received).toBe(expected) // Object.is equality Expected: "h2:text=\"Orders\"" Received: {"_frame": {"_guid": "frame@0d06b45f1749eea698b6e09100ad3038", "_type": "Frame"}, "_selector": "internal:text=\"Orders\"i"} 46 | const { merchantPage } = await getMerchant( browser ); 47 | await goToOrderAnalytics( merchantPage ); > 48 | expect( merchantPage.getByText( 'Orders' ) ).toBe( 'h2:text="Orders"' ); | ^ 49 | await expect( merchantPage ).toHaveScreenshot(); 50 | } ); 51 | test( 'orders table should have the customer currency column', async ( { at /home/runner/work/woocommerce-payments/woocommerce-payments/tests/e2e-pw/specs/merchant/merchant-admin-analytics.spec.ts:48:48
await expect( merchantPage ).toHaveScreenshot();
} );
test( 'orders table should have the customer currency column', async ( {
Expand All @@ -55,6 +56,9 @@ test.describe( 'Admin order analytics', () => {
const customerCurrencyColumn = merchantPage.getByText(
'Customer Currency'
);
expect( customerCurrencyColumn ).toBe(

Check failure on line 59 in tests/e2e-pw/specs/merchant/merchant-admin-analytics.spec.ts

View workflow job for this annotation

GitHub Actions / WC - latest

[merchant] › merchant/merchant-admin-analytics.spec.ts:51:6 › Admin order analytics › orders table should have the customer currency column

2) [merchant] › merchant/merchant-admin-analytics.spec.ts:51:6 › Admin order analytics › orders table should have the customer currency column Error: expect(received).toBe(expected) // Object.is equality Expected: "span:text=\"Customer Currency\"" Received: {"_frame": {"_guid": "frame@cba86093152eda5a29eda83858cd5092", "_type": "Frame"}, "_selector": "internal:text=\"Customer Currency\"i"} 57 | 'Customer Currency' 58 | ); > 59 | expect( customerCurrencyColumn ).toBe( | ^ 60 | 'span:text="Customer Currency"' 61 | ); 62 | await expect( customerCurrencyColumn ).toHaveScreenshot(); at /home/runner/work/woocommerce-payments/woocommerce-payments/tests/e2e-pw/specs/merchant/merchant-admin-analytics.spec.ts:59:36

Check failure on line 59 in tests/e2e-pw/specs/merchant/merchant-admin-analytics.spec.ts

View workflow job for this annotation

GitHub Actions / WC - latest

[merchant] › merchant/merchant-admin-analytics.spec.ts:51:6 › Admin order analytics › orders table should have the customer currency column

2) [merchant] › merchant/merchant-admin-analytics.spec.ts:51:6 › Admin order analytics › orders table should have the customer currency column Retry #1 ─────────────────────────────────────────────────────────────────────────────────────── Error: expect(received).toBe(expected) // Object.is equality Expected: "span:text=\"Customer Currency\"" Received: {"_frame": {"_guid": "frame@0300830cec7978ba6298a156e2ad3f0f", "_type": "Frame"}, "_selector": "internal:text=\"Customer Currency\"i"} 57 | 'Customer Currency' 58 | ); > 59 | expect( customerCurrencyColumn ).toBe( | ^ 60 | 'span:text="Customer Currency"' 61 | ); 62 | await expect( customerCurrencyColumn ).toHaveScreenshot(); at /home/runner/work/woocommerce-payments/woocommerce-payments/tests/e2e-pw/specs/merchant/merchant-admin-analytics.spec.ts:59:36

Check failure on line 59 in tests/e2e-pw/specs/merchant/merchant-admin-analytics.spec.ts

View workflow job for this annotation

GitHub Actions / WC - latest

[merchant] › merchant/merchant-admin-analytics.spec.ts:51:6 › Admin order analytics › orders table should have the customer currency column

2) [merchant] › merchant/merchant-admin-analytics.spec.ts:51:6 › Admin order analytics › orders table should have the customer currency column Retry #2 ─────────────────────────────────────────────────────────────────────────────────────── Error: expect(received).toBe(expected) // Object.is equality Expected: "span:text=\"Customer Currency\"" Received: {"_frame": {"_guid": "frame@b45eac82b2f43ec36b8cf409ed309ff4", "_type": "Frame"}, "_selector": "internal:text=\"Customer Currency\"i"} 57 | 'Customer Currency' 58 | ); > 59 | expect( customerCurrencyColumn ).toBe( | ^ 60 | 'span:text="Customer Currency"' 61 | ); 62 | await expect( customerCurrencyColumn ).toHaveScreenshot(); at /home/runner/work/woocommerce-payments/woocommerce-payments/tests/e2e-pw/specs/merchant/merchant-admin-analytics.spec.ts:59:36
'span:text="Customer Currency"'
);
await expect( customerCurrencyColumn ).toHaveScreenshot();
} );
} );
4 changes: 2 additions & 2 deletions tests/e2e-pw/utils/merchant-navigation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ export const goToWooPaymentsSettings = async ( page: Page ) => {

export const goToActionScheduler = async (
page: Page,
status: string,
search: string
status?: string,
search?: string
) => {
let pageUrl = '/wp-admin/tools.php?page=action-scheduler';
if ( status ) {
Expand Down
73 changes: 0 additions & 73 deletions tests/e2e/specs/wcpay/merchant/merchant-admin-analytics.spec.js

This file was deleted.

0 comments on commit efcefb6

Please sign in to comment.