diceware/cypress/e2e/diceware.cy.js
2022-12-11 22:44:57 -05:00

37 lines
719 B
JavaScript

describe('Diceware', () => {
it('Roll 2 dice and check results', () => {
cy.visit('/');
cy.get('[data-test="button-2"]').click();
cy.get('[data-test="button"]').click();
cy.get('.results > .results_phrase_key').should("exist").contains("passphrase");
cy.get('[data-test-num-dice]')
.should("exist")
.contains(2)
;
})
it('Roll 4 dice and check results', () => {
cy.visit('/');
cy.get('[data-test="button-4"]').click();
cy.get('[data-test="button"]').click();
cy.get('.results > .results_phrase_key').should("exist").contains("passphrase");
cy.get('[data-test-num-dice]')
.should("exist")
.contains(4)
;
})
})