Skip to content

Commit

Permalink
Fix cypress config for v13 (#1209)
Browse files Browse the repository at this point in the history
### Changes

Our e2e tests were broken due to incorrectly configured cypress as of a
certain version. Our CI didnt report this, but locally the issue was
clear.

I also removed the migration tests. They were added to help test when we
released v2, but thats been a while now so we can drop those.

### Testing

- [x] This change adds unit test coverage
- [x] This change adds integration test coverage
- [x] This change has been tested on the latest version of the
platform/language

### Checklist

- [x] I have read the [Auth0 general contribution
guidelines](https://github.com/auth0/open-source-template/blob/master/GENERAL-CONTRIBUTING.md)
- [x] I have read the [Auth0 Code of
Conduct](https://github.com/auth0/open-source-template/blob/master/CODE-OF-CONDUCT.md)
- [x] All code quality tools/guidelines have been run/followed

---------

Co-authored-by: Ewan Harris <[email protected]>
  • Loading branch information
frederikprijck and ewanharris authored Dec 7, 2023
1 parent baa3c8f commit b99f535
Show file tree
Hide file tree
Showing 12 changed files with 26 additions and 148 deletions.
18 changes: 12 additions & 6 deletions browserstack.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,22 +3,28 @@
{
"browser": "chrome",
"os": "Windows 10",
"versions": ["latest"]
"versions": [
"latest"
]
},
{
"browser": "firefox",
"os": "Windows 10",
"versions": ["latest"]
"versions": [
"latest"
]
},
{
"browser": "edge",
"os": "Windows 10",
"versions": ["latest"]
"versions": [
"latest"
]
}
],
"run_settings": {
"cypress_config_file": "./cypress.json",
"cypress-version": "7",
"cypress_config_file": "./cypress.config.js",
"cypress-version": "13",
"project_name": "Auth0 SPA SDK",
"exclude": [],
"parallels": "5",
Expand All @@ -33,4 +39,4 @@
"local_mode": "always-on"
},
"disable_usage_reporting": false
}
}
14 changes: 14 additions & 0 deletions cypress.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
const { defineConfig } = require('cypress');

module.exports = defineConfig({
chromeWebSecurity: false,
viewportWidth: 1000,
viewportHeight: 1000,
e2e: {
// We've imported your old cypress plugins here.
// You may want to clean this up later by importing these.
setupNodeEvents(on, config) {
return require('./cypress/plugins/index.js')(on, config)
},
},
})
6 changes: 0 additions & 6 deletions cypress.json

This file was deleted.

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ const login = instanceId => {

describe('using multiple clients in the app', () => {
beforeEach(() => {
cy.server();
cy.visit('http://127.0.0.1:3000/multiple_clients.html');
get('client-logout-1').click();
cy.window().then(win => win.localStorage.clear());
Expand Down
134 changes: 0 additions & 134 deletions cypress/integration/migration.js

This file was deleted.

1 change: 0 additions & 1 deletion cypress/support/commands.js
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,6 @@ Cypress.Commands.add('loginNoCallback', () => {
});

Cypress.Commands.add('resetTests', () => {
cy.server();
cy.visit('http://127.0.0.1:3000');
cy.get('#reset-config').click();
cy.window().then(win => win.localStorage.clear());
Expand Down
File renamed without changes.

0 comments on commit b99f535

Please sign in to comment.