Skip to content

Commit

Permalink
test: add select demo file
Browse files Browse the repository at this point in the history
  • Loading branch information
shikanime committed Apr 2, 2019
1 parent ce8c800 commit 44cb734
Show file tree
Hide file tree
Showing 5 changed files with 33 additions and 13 deletions.
32 changes: 19 additions & 13 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@
"@types/sketchapp": "^1.0.3",
"codelyzer": "~4.5.0",
"conventional-changelog-cli": "^2.0.12",
"cypress-file-upload": "^3.0.6",
"cypress-testing-library": "^2.3.6",
"husky": "^1.3.1",
"jest": "^24.1.0",
Expand Down
Binary file added tests/e2e/fixtures/md-components.sketch
Binary file not shown.
12 changes: 12 additions & 0 deletions tests/e2e/specs/editor.spec.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
describe("Editor page", () => {
beforeEach(() => {
cy.visit("/");
cy.getByText(/^get started$/i).click();
});

it("the editor should open demo file", () => {
cy.getByText("Select A Demo File").click();
cy.getByText("md-components-cards-welcome-back").click();
cy.location("hash").should("eq", "#/editor/preview");
});
});
1 change: 1 addition & 0 deletions tests/e2e/support/commands.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,4 @@
// -- This is will overwrite an existing command --
// Cypress.Commands.overwrite("visit", (originalFn, url, options) => { ... })
import "cypress-testing-library/add-commands";
import 'cypress-file-upload';

0 comments on commit 44cb734

Please sign in to comment.