|
@@ -1,6 +1,5 @@
|
|
|
describe("Homepage", () => {
|
|
|
beforeEach(() => {
|
|
|
- cy.viewport(1000, 600);
|
|
|
cy.visit("/games");
|
|
|
});
|
|
|
|
|
@@ -12,7 +11,7 @@ describe("Homepage", () => {
|
|
|
});
|
|
|
|
|
|
it("should show both default games if searching for 'test' string", () => {
|
|
|
- cy.get('input[name="game-search"').type('test');
|
|
|
+ cy.get('input[name="game-search"').type("test");
|
|
|
cy.contains("0 Test game").should("be.visible");
|
|
|
cy.contains("1 Performance game to test strange things and other").should(
|
|
|
"be.visible"
|
|
@@ -20,7 +19,7 @@ describe("Homepage", () => {
|
|
|
});
|
|
|
|
|
|
it("should show only game 1 if searching for 'Performance' string", () => {
|
|
|
- cy.get('input[name="game-search"').type('Performance');
|
|
|
+ cy.get('input[name="game-search"').type("Performance");
|
|
|
cy.contains("0 Test game").should("not.exist");
|
|
|
cy.contains("1 Performance game to test strange things and other").should(
|
|
|
"be.visible"
|
|
@@ -28,10 +27,14 @@ describe("Homepage", () => {
|
|
|
});
|
|
|
|
|
|
it("should not show any game for 'thisisafancystring' string", () => {
|
|
|
- cy.get('input[name="game-search"').type('thisisafancystring');
|
|
|
+ cy.get('input[name="game-search"').type("thisisafancystring");
|
|
|
cy.contains("0 Test game").should("not.exist");
|
|
|
cy.contains("1 Performance game to test strange things and other").should(
|
|
|
"not.exist"
|
|
|
);
|
|
|
});
|
|
|
+
|
|
|
+ it("should not show unpublished game by default", () => {
|
|
|
+ cy.contains("2 Unpublished game").should("not.exist");
|
|
|
+ });
|
|
|
});
|