mirror of
https://github.com/dmuth/diceware.git
synced 2024-11-28 11:32:10 -05:00
38 lines
719 B
JavaScript
38 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)
|
||
|
;
|
||
|
|
||
|
})
|
||
|
|
||
|
|
||
|
})
|