Skip to content

Commit

Permalink
test: fix e2e
Browse files Browse the repository at this point in the history
  • Loading branch information
davidyuk committed Jul 16, 2024
1 parent 2c1d333 commit 8c0485a
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 3 deletions.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 8 additions & 1 deletion tests/e2e/specs/browser/index.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,14 @@ describe('Browser', () => {
cy
.viewport('iphone-se2')
.visit('/browser', { login: true });
cy.getIframeBody().find('img').should('be.visible').should('length.gte', 3);
cy.get('.progress-fake').should('not.exist');
cy.getIframeBody()
.find('img')
.should('be.visible')
.and('length', 4)
.and(($imgs) => Array.from($imgs).forEach((img) => {
expect(img.naturalWidth).to.be.greaterThan(0)

Check failure on line 12 in tests/e2e/specs/browser/index.cy.js

View workflow job for this annotation

GitHub Actions / validate / build_test

Missing semicolon
}));
cy.matchImage();
});
});
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 2 additions & 1 deletion tests/e2e/specs/names/index.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ describe('Names', () => {
cy
.viewport('iphone-se2')
.visit('/names', { login: true })
.get('.list-item').should('be.visible');
.get('.list-item').should('length', 4)
.should('be.visible');
cy.matchImage();

cy.get('[href="/names/ending-soonest"]').should('be.visible');
Expand Down
2 changes: 1 addition & 1 deletion tests/e2e/specs/transfer/sign-transaction.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ describe('Sign transaction', () => {
.viewport('iphone-se2')
.visit(url.href.replace('http://localhost', ''), { login: 'wallet-empty' });
cy.get('button').contains('Confirm').click();
const skipButton = cy.get('.modal-plain .ae-button.primary');
const skipButton = cy.get('.modal-plain .ae-button.primary').should('be.visible');
cy.matchImage();
skipButton.click();

Expand Down

0 comments on commit 8c0485a

Please sign in to comment.