Skip to content

Commit

Permalink
Set up cypress screenshots
Browse files Browse the repository at this point in the history
  • Loading branch information
rmanaem committed Aug 8, 2024
1 parent b9ea575 commit 215adcd
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 0 deletions.
6 changes: 6 additions & 0 deletions .github/workflows/compatibility.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,12 @@ jobs:
with:
wait-on: http://localhost:3000
component: false

- name: Upload Cypress screenshots as artifacts
uses: actions/upload-artifact@v2
with:
name: cypress-screenshots
path: cypress/screenshots

- name: Latest failed, tell someone
if: ${{ failure() }}
Expand Down
2 changes: 2 additions & 0 deletions cypress.config.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
const { defineConfig } = require("cypress");

module.exports = defineConfig({
screenshotsFolder: 'cypress/screenshots',
screenshotOnRunFailure: true,
e2e: {
experimentalStudio: true,
setupNodeEvents(on, config) {
Expand Down
2 changes: 2 additions & 0 deletions cypress/e2e/simple-test.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@ describe('Full stack e2e', () => {
'local graph 1{downarrow}{enter}'
);
cy.get('[data-cy="submit-query-button"]').click();
cy.screenshot()
cy.get('[data-cy="result-container"]').contains("from Local graph 1",{matchCase: false});
cy.screenshot()
})
it('API', () => {
cy.request("localhost:8000/query").as("query");
Expand Down

0 comments on commit 215adcd

Please sign in to comment.