Skip to content

Commit

Permalink
adjust play component tests
Browse files Browse the repository at this point in the history
  • Loading branch information
electrofLy committed May 25, 2023
1 parent 4e29787 commit 18497bc
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/app/pages/play/play.component.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ describe('PlayComponent', () => {
it('should be able to guess correctly a flag', () => {
cy.mount(PlayComponent, generateConfig('FLAG'));
cy.get(`[data-test="country-input"]`).click();
cy.get(`[data-test="country-input"] input`).type('Dominican Republic');
cy.get(`[data-test="country-input"] input`).type('Dominica');
cy.get(`[data-test="country-input"] input`).blur();
cy.get(`[data-test="submit-guess"]`).click();
cy.get(`[data-test="success-guess"]`).should('exist');
Expand All @@ -50,8 +50,8 @@ describe('PlayComponent', () => {
it('should be able to guess correctly a by clicking mat option', () => {
cy.mount(PlayComponent, generateConfig('FLAG'));
cy.get(`[data-test="country-input"]`).click();
cy.get(`[data-test="country-input"] input`).type('Dominican Rep');
cy.get(`mat-option`).should('contain.text', 'Dominican Republic').click();
cy.get(`[data-test="country-input"] input`).type('Domini');
cy.get(`mat-option`).should('contain.text', 'Dominica').first().click();
cy.get(`[data-test="submit-guess"]`).click();
cy.get(`[data-test="success-guess"]`).should('exist');
});
Expand All @@ -77,7 +77,7 @@ describe('PlayComponent', () => {
it('should be able to guess correctly a shape', () => {
cy.mount(PlayComponent, generateConfig('SHAPE'));
cy.get(`[data-test="country-input"]`).click();
cy.get(`[data-test="country-input"] input`).type('Suriname');
cy.get(`[data-test="country-input"] input`).type('Sudan');
cy.get(`[data-test="country-input"] input`).blur();
cy.get(`[data-test="submit-guess"]`).click();
cy.get(`[data-test="success-guess"]`).should('exist');
Expand Down Expand Up @@ -115,7 +115,7 @@ describe('PlayComponent', () => {
it('should be able to get a new country after submission and time up', () => {
cy.mount(PlayComponent, generateConfig('FLAG'));
cy.get(`[data-test="country-input"]`).click();
cy.get(`[data-test="country-input"] input`).type('Dominican Republic');
cy.get(`[data-test="country-input"] input`).type('Dominica');
cy.get(`[data-test="country-input"] input`).blur();
cy.get(`[data-test="submit-guess"]`).click();
cy.get(`[data-test="success-guess"]`).should('exist');
Expand All @@ -125,7 +125,7 @@ describe('PlayComponent', () => {
cy.mount(PlayComponent, generateConfig('FLAG'));

cy.get(`[data-test="country-input"]`).click();
cy.get(`[data-test="country-input"] input`).type('Dominican Republic');
cy.get(`[data-test="country-input"] input`).type('Dominica');
cy.get(`[data-test="country-input"] input`).blur();
cy.get(`[data-test="submit-guess"]`).click();
cy.get(`[data-test="country-input"] input`).should('exist');
Expand Down

0 comments on commit 18497bc

Please sign in to comment.