Skip to content

Commit

Permalink
Fix e2e test
Browse files Browse the repository at this point in the history
  • Loading branch information
CodeyGuyDylan committed Sep 27, 2024
1 parent 5a7b3e8 commit 5617b06
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ export class DashConnections extends Component {
}

if ( ! this.props.isLinked ) {
cardContent = maybeShowLinkUnlinkBtn;
cardContent = <div className="jp-connection-settings__info">{ maybeShowLinkUnlinkBtn }</div>;
} else if ( this.props.isFetchingUserData ) {
cardContent = __( 'Loading…', 'jetpack' );
} else if ( ! this.props.wpComConnectedUser?.email ) {
Expand Down
5 changes: 1 addition & 4 deletions tools/e2e-commons/pages/wp-admin/jetpack-dashboard.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,7 @@ export default class JetpackDashboardPage extends WpPage {
async isNotUserConnected() {
logger.step( 'Checking that WordPress.com user is not connected' );
const selector = `${ this.#connectionInfoContainerSel } >> nth=1`;
const locator = this.page.locator( selector );
const elementText = await locator.textContent();

return elementText.includes(
return ( await this.page.locator( selector ).innerText() ).includes(
'Get the most out of Jetpack by connecting your WordPress.com account'
);
}
Expand Down

0 comments on commit 5617b06

Please sign in to comment.