Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Ihor Oliinyk committed Dec 1, 2020
1 parent a4b37e2 commit 5698386
Showing 1 changed file with 2 additions and 10 deletions.
12 changes: 2 additions & 10 deletions cypress/integration/js2048Game.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ Cypress.Commands.add('shuffleBoxes', (arrow1, arrow2, times) => {
cy.get('body').type(arrow1);
cy.get('body').type(arrow2);
}
cy.get('.game-score').invoke('text').then(parseFloat).should('be.gt', 1);
});

describe('2048 game', () => {
Expand Down Expand Up @@ -47,15 +46,8 @@ describe('2048 game', () => {
cy.get('.game-score').should('have.value', '');
});

it.only('should show message in case of the loss', () => {
cy.get('.button.start').click();

for (let n = 0; n < 100; n++) {
cy.get('body').type('{rightArrow}');
cy.get('body').type('{downArrow}');
cy.get('body').type('{leftArrow}');
cy.get('body').type('{upArrow}');
}
it('should show message in case of the loss', () => {
cy.shuffleBoxes('{leftArrow}', '{downArrow}', 100);

cy.contains('You lose! Restart the game?')
.should('be.visible');
Expand Down

0 comments on commit 5698386

Please sign in to comment.