Skip to content

Commit

Permalink
Videos done. Overall cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
edro15 committed Mar 6, 2024
1 parent 89d9d47 commit a7bceee
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 23 deletions.
11 changes: 4 additions & 7 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -121,28 +121,24 @@ jobs:
cd test
rm -rf package-lock.json
npm install
echo "Checking installation"
cat package-lock.json
- name: Cypress run
uses: cypress-io/github-action@v6
# Set timeout to prevent hanging tasks
timeout-minutes: 5
env:
ELECTRON_EXTRA_LAUNCH_ARGS: --disable-gpu
# DEBUG: '@cypress/github-action'
with:
# Run 'npm start' using npm 14 instead of 18 since package-lock generated with npm 14 (see @types/node)
start: npm run test
wait-on: 'http://localhost:8000'
# browser: chrome
# No videos can be recorded w/ ff as per https://github.com/cypress-io/cypress/issues/18415
# browser: firefox
working-directory: test

- name: Verify results availability
run: |
ls -la test/cypress/results
# - name: Verify results availability
# run: |
# ls -la test/cypress/results

- name: Upload Test Results
uses: actions/upload-artifact@v4
Expand All @@ -153,6 +149,7 @@ jobs:
test/cypress/videos
test/cypress/screenshots
# Add a job in the page to visualize test result reports
- name: JUnit Report
uses: dorny/test-reporter@v1
if: always()
Expand Down
12 changes: 8 additions & 4 deletions test/cypress/e2e/graph_examples.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ describe('Graph Examples', {

it("renders without errors", () => {
cy.get('.dashboard-header-title', { timeout: 10000 }).should('have.text', 'Graph Analysis Example for Bitcoin Transactions');
cy.get('div.alert.alert-error').should('not.exist');
// FIXME Checked too soon. Page has not been loaded yet, so it will always succeds
cy.get('div.alert.alert-error', { timeout: 10000 }).should('not.exist');
});
});

Expand All @@ -29,7 +30,8 @@ describe('Graph Examples', {

it("renders without errors", () => {
cy.get('.dashboard-header-title', { timeout: 10000 }).should('have.text', 'Graph Analysis Example for Network Traffic');
cy.get('div.alert.alert-error').should('not.exist');
// FIXME Checked too soon. Page has not been loaded yet, so it will always succeds
cy.get('div.alert.alert-error', { timeout: 10000 }).should('not.exist');
});
});

Expand All @@ -44,7 +46,8 @@ describe('Graph Examples', {

it("renders without errors", () => {
cy.get('.dashboard-header-title', { timeout: 10000 }).should('have.text', 'Graph Analysis Example: Connected Components');
cy.get('div.alert.alert-error').should('not.exist');
// FIXME Checked too soon. Page has not been loaded yet, so it will always succeds
cy.get('div.alert.alert-error', { timeout: 10000 }).should('not.exist');
});
});

Expand All @@ -59,7 +62,8 @@ describe('Graph Examples', {

it("renders without errors", () => {
cy.get('.dashboard-header-title', { timeout: 10000 }).should('have.text', 'Graph Analysis Example: Label Propagation');
cy.get('div.alert.alert-error').should('not.exist');
// FIXME Checked too soon. Page has not been loaded yet, so it will always succeds
cy.get('div.alert.alert-error', { timeout: 10000 }).should('not.exist');
});
});
});
25 changes: 13 additions & 12 deletions test/cypress/support/e2e.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,16 @@ import './commands'

// Alternatively you can use CommonJS syntax:
// require('./commands')
Cypress.on('uncaught:exception', (err, runnable) => {
// we expect a 3rd party library error with message 'window.locale_name is not a function'
// and don't want to fail the test so we return false
if (err.message.includes('window.locale_name is not a function')) {
return false;
}
if (err.message.includes('t.data is undefined')) {
return false;
}
// we still want to ensure there are no other unexpected
// errors, so we let them fail the test
})

// Cypress.on('uncaught:exception', (err, runnable) => {
// // we expect a 3rd party library error with message 'window.locale_name is not a function'
// // and don't want to fail the test so we return false
// if (err.message.includes('window.locale_name is not a function')) {
// return false;
// }
// if (err.message.includes('t.data is undefined')) {
// return false;
// }
// // we still want to ensure there are no other unexpected
// // errors, so we let them fail the test
// })

0 comments on commit a7bceee

Please sign in to comment.