Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions .github/workflows/cypress.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,15 @@ jobs:
# re-enable PR comment bot
COMMIT_INFO_SHA: ${{github.event.pull_request.head.sha}}

- name: E2E tests - Upload test artifacts
if: ${{ failure() }}
uses: actions/upload-artifact@v3
with:
name: cypress-artifacts
path: |
cypress/screenshots/
cypress/videos/

- name: Components tests
uses: cypress-io/github-action@v5.6.1
with:
Expand All @@ -60,3 +69,12 @@ jobs:
COMMIT_INFO_MESSAGE: ${{github.event.pull_request.title}}
# re-enable PR comment bot
COMMIT_INFO_SHA: ${{github.event.pull_request.head.sha}}

- name: Components tests - Upload test artifacts
if: ${{ failure() }}
uses: actions/upload-artifact@v3
with:
name: cypress-artifacts
path: |
cypress/screenshots/
cypress/videos/
4 changes: 4 additions & 0 deletions cypress.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ export const config: Parameters<typeof defineConfig>[0] = {
setupNodeEvents,
baseUrl: "http://localhost:5050",
specPattern: "cypress/e2e/**/*.cy.ts",
video: true,
videosFolder: "cypress/videos",
screenshotOnRunFailure: true,
screenshotsFolder: "cypress/screenshots",
},
component: {
devServer: {
Expand Down
2 changes: 1 addition & 1 deletion cypress/e2e/topNavigation.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ describe("Top navigation test", () => {
["Projects", "Talks", "Blog"].forEach((page) => {
it(`Should go to ${page} and back`, () => {
cy.get(`@${page.toLowerCase()}`).click();
cy.location("pathname").should("eq", `/${page.toLowerCase()}`);
cy.location("pathname").should("eq", `/reksio-${page.toLowerCase()}`);
cy.get("h2").invoke("text").should("include", page);
goBackToHome();
});
Expand Down