Skip to content

Instantly share code, notes, and snippets.

@yvesbou
Last active June 3, 2022 13:27
Show Gist options
  • Save yvesbou/0fbe5078049f4b2b5a1a098e6a605bfa to your computer and use it in GitHub Desktop.
Save yvesbou/0fbe5078049f4b2b5a1a098e6a605bfa to your computer and use it in GitHub Desktop.
describe('Test User Login', () => {
it('Connects with Metamask', () => {
cy.visit('https://dappify.com')
cy.contains('Sign').click();
cy.contains('Confirm').click();
// look for Button that says "Connect Wallet" and click it
cy.contains('Connect Wallet').click();
cy.contains('Metamask').click();
// always important to switch between metamask and cypress window
cy.switchToMetamaskWindow();
// connect to dapp
cy.acceptMetamaskAccess().should("be.true");
cy.confirmMetamaskSignatureRequest();
// switch back to cypress window
cy.switchToCypressWindow();
// check UI change
cy.contains('Add Project').should('be.visible');
})
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment