-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
14 changed files
with
192 additions
and
200 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"name": "Using fixtures to represent data", | ||
"email": "hello@cypress.io", | ||
"body": "Fixtures are a great way to mock data for responses to routes" | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,74 @@ | ||
describe('Clicking N should turn button green', function() { | ||
it('finds N, clicks it and it should turn green', function() { | ||
cy.visit('http://localhost:3000/') | ||
describe("Clicking N should turn button green", function() { | ||
it("finds N, clicks it and it should turn green", function() { | ||
cy.visit("http://localhost:3000/"); | ||
|
||
cy.get('.grid') | ||
.contains('N') | ||
.should('not.have.class', 'green') | ||
cy.get(".grid") | ||
.contains("N") | ||
.should("not.have.class", "green"); | ||
|
||
cy.get('.grid') | ||
.contains('N') | ||
cy.get(".grid") | ||
.contains("N") | ||
.click() | ||
.should('have.class', 'green') | ||
}) | ||
}) | ||
.should("have.class", "green"); | ||
}); | ||
|
||
describe('First clicking O should turn button orange', function() { | ||
it('finds O, clicks it and it should turn orange', function() { | ||
cy.visit('http://localhost:3000/') | ||
it("finds O R A, clicks them", function() { | ||
cy.get(".grid") | ||
.contains("O") | ||
.click() | ||
.should("have.class", "green"); | ||
|
||
cy.get(".grid") | ||
.contains("R") | ||
.click() | ||
.should("have.class", "green"); | ||
|
||
cy.get(".grid") | ||
.contains("A") | ||
.click() | ||
.should("have.class", "green"); | ||
}); | ||
|
||
it("clicks new game button, starts new game", function() { | ||
cy.get(".overlay-content > .button").click(); | ||
|
||
cy.get(".grid") | ||
.contains("N") | ||
.should("not.have.class", "green"); | ||
|
||
cy.get(".grid") | ||
.contains("N") | ||
.click() | ||
.should("have.class", "green"); | ||
}); | ||
}); | ||
|
||
describe("First clicking O should turn button orange", function() { | ||
it("finds O, clicks it and it should turn orange", function() { | ||
cy.visit("http://localhost:3000/"); | ||
|
||
cy.get(".grid") | ||
.contains("O") | ||
.should("not.have.class", "green"); | ||
|
||
cy.get(".grid") | ||
.contains("O") | ||
.click() | ||
.should("have.class", "orange"); | ||
}); | ||
}); | ||
|
||
describe("First clicking O should turn button orange", function() { | ||
it("finds O, clicks it and it should turn orange", function() { | ||
cy.visit("http://localhost:3000/"); | ||
|
||
cy.get('.grid') | ||
.contains('O') | ||
.should('not.have.class', 'green') | ||
cy.get(".grid") | ||
.contains("O") | ||
.should("not.have.class", "green"); | ||
|
||
cy.get('.grid') | ||
.contains('O') | ||
cy.get(".grid") | ||
.contains("O") | ||
.click() | ||
.should('have.class', 'orange') | ||
}) | ||
}) | ||
.should("have.class", "orange"); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Binary file not shown.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.