Skip to content

Commit

Permalink
Remove "Details" popover test & related actions
Browse files Browse the repository at this point in the history
The "Details" popover doesn't exist since v14.5. See WordPress/gutenberg#44788
  • Loading branch information
WunderBart authored and fullofcaffeine committed Jan 18, 2023
1 parent 12ca2ca commit febb404
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 63 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -337,25 +337,6 @@ export class EditorToolbarComponent {
await locator.click();
}

/* Details popover */

/**
* Opens the post details popover (i.e. number of character, words, etc.).
*/
async openDetailsPopover(): Promise< void > {
if ( envVariables.VIEWPORT_NAME === 'mobile' ) {
// Details are not available on mobile!
return;
}

if ( await this.targetIsOpen( selectors.detailsButton ) ) {
return;
}

const locator = this.editor.locator( selectors.detailsButton );
await locator.click();
}

/**
* Click the editor undo button. Throws an error if the button is not enabled.
*
Expand Down
7 changes: 0 additions & 7 deletions packages/calypso-e2e/src/lib/pages/editor-page.ts
Original file line number Diff line number Diff line change
Expand Up @@ -797,13 +797,6 @@ export class EditorPage {
} );
}

/**
* Opens the post details popover (i.e. number of character, words, etc.).
*/
async openDetailsPopover(): Promise< void > {
await this.editorToolbarComponent.openDetailsPopover();
}

/**
* Checks whether the editor has any block warnings/errors displaying.
*
Expand Down
37 changes: 0 additions & 37 deletions test/e2e/specs/editor-tracking/editor-tracking__toolbar-events.ts
Original file line number Diff line number Diff line change
Expand Up @@ -97,43 +97,6 @@ skipDescribeIf( envVariables.VIEWPORT_NAME === 'mobile' )(
} );
} );

describe( 'wpcom_block_editor_details_open', function () {
let page: Page;
let editorPage: EditorPage;
let editorTracksEventManager: EditorTracksEventManager;
beforeAll( async () => {
page = await browser.newPage();

const accountName = getTestAccountByFeature( features );
const testAccount = new TestAccount( accountName );
await testAccount.authenticate( page );

editorTracksEventManager = new EditorTracksEventManager( page );
editorPage = new EditorPage( page, { target: features.siteType } );
} );

it( 'Start a new post', async function () {
await editorPage.visit( 'post' );
await editorPage.waitUntilLoaded();
} );

// Needed to enable the details button.
it( 'Enter some text', async function () {
await editorPage.enterText( 'The actual text does not matter for this test either.' );
} );

it( 'Click details button', async function () {
await editorPage.openDetailsPopover();
} );

it( '"wpcom_block_editor_details_open" event fires', async function () {
const eventDidFire = await editorTracksEventManager.didEventFire(
'wpcom_block_editor_details_open'
);
expect( eventDidFire ).toBe( true );
} );
} );

describe( 'wpcom_block_editor_undo/redo_performed', function () {
let page: Page;
let fullSiteEditorPage: FullSiteEditorPage;
Expand Down

0 comments on commit febb404

Please sign in to comment.