Skip to content

Commit

Permalink
Reuse utils from @wordpress/e2e-test-utils-playwright
Browse files Browse the repository at this point in the history
  • Loading branch information
tyxla committed Dec 30, 2024
1 parent ec89f65 commit 47f9e94
Show file tree
Hide file tree
Showing 5 changed files with 797 additions and 286 deletions.
1 change: 0 additions & 1 deletion packages/calypso-e2e/src/lib/utils/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ export * from './validate-translations';
export * from './get-test-account-by-feature';
export * from './translate';
export * from './social-connections-manager';
export * from './metrics';

// Other items are exported for unit testing, we only care about the manager class.
export { EditorTracksEventManager } from './editor-tracks-event-manager';
Expand Down
234 changes: 0 additions & 234 deletions packages/calypso-e2e/src/lib/utils/metrics.ts

This file was deleted.

4 changes: 2 additions & 2 deletions test/e2e/metrics/editor.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ import {
getTestAccountByFeature,
envToFeatureKey,
PostsPage,
Metrics,
} from '@automattic/calypso-e2e';
import { Metrics } from '@wordpress/e2e-test-utils-playwright';
import { Browser, Page } from 'playwright';

declare const browser: Browser;
Expand Down Expand Up @@ -41,7 +41,7 @@ describe( DataHelper.createSuiteTitle( 'Metrics: Editor' ), function () {

it( 'Start and fill a test post', async function () {
postsPage = new PostsPage( page );
const metrics = new Metrics( page );
const metrics = await new Metrics( { page } );
await postsPage.visit();
await postsPage.newPost();
editorPage = new EditorPage( page );
Expand Down
2 changes: 2 additions & 0 deletions test/e2e/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,9 @@
"@automattic/jest-circus-allure-reporter": "workspace:^",
"@automattic/languages": "workspace:^",
"@playwright/browser-chromium": "1.48.2",
"@playwright/test": "1.48.2",
"@types/archiver": "^5.3.1",
"@wordpress/e2e-test-utils-playwright": "1.14.0",
"archiver": "^5.3.0",
"asana-phrase": "^0.0.8",
"babel-jest": "^29.6.1",
Expand Down
Loading

0 comments on commit 47f9e94

Please sign in to comment.