Skip to content

Commit

Permalink
test(extension): unify assertions
Browse files Browse the repository at this point in the history
  • Loading branch information
wklos-iohk committed Feb 19, 2025
1 parent 222f8d4 commit cd468fb
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions packages/e2e-tests/src/assert/VotingCenterPageAssert.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,15 @@ class VotingCenterPageAssert {
async assertSeeVotingCenterBanner() {
await VotingCenterPage.banner.waitForDisplayed();
await VotingCenterPage.title.waitForDisplayed();
expect(await VotingCenterPage.title.getText()).to.be.eq(await t('browserView.voting-beta.modal.title'));
expect(await VotingCenterPage.title.getText()).to.equal(await t('browserView.voting-beta.modal.title'));
await VotingCenterPage.description.waitForDisplayed();
const expectedDescriptionKey = (await isPopupMode())
? 'browserView.voting-beta.modal.description-popup'
: 'browserView.voting-beta.modal.description';
const expectedDescription = (await t(expectedDescriptionKey)).replaceAll('<br /><br />', '\n\n');
expect(await VotingCenterPage.description.getProperty('innerText')).to.be.eq(expectedDescription);
expect(await VotingCenterPage.description.getProperty('innerText')).to.equal(expectedDescription);
await VotingCenterPage.govToolButton.waitForClickable();
expect(await VotingCenterPage.govToolButton.getText()).to.be.eq(await t('browserView.voting-beta.modal.cta'));
expect(await VotingCenterPage.govToolButton.getText()).to.equal(await t('browserView.voting-beta.modal.cta'));
}
}

Expand Down

0 comments on commit cd468fb

Please sign in to comment.