Skip to content

Commit

Permalink
feat: Cypress updated to latest version and with .ts files (#27)
Browse files Browse the repository at this point in the history
  • Loading branch information
RezaRahemtola committed Jun 26, 2022
1 parent 1239951 commit 735dd13
Show file tree
Hide file tree
Showing 12 changed files with 80 additions and 16 deletions.
13 changes: 13 additions & 0 deletions cypress.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import { defineConfig } from 'cypress'

export default defineConfig({
watchForFileChanges: false,
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)
},
baseUrl: 'http://localhost:8080',
},
})
4 changes: 0 additions & 4 deletions cypress.json

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ describe('Create account for DashboardView tests', () => {
cy.get('#ipc-signupView-text-area')
.invoke('val')
.then((input) => {
dashboardSpecMnemonic = input;
dashboardSpecMnemonic = input as string;
});
cy.get('#ipc-modal-close-button').click();
});
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
let dashboardSpecMnemonic = '';

describe('Create account for DashboardView tests', () => {
it('Connect', () => {
cy.visit('/signup');
Expand All @@ -8,7 +6,7 @@ describe('Create account for DashboardView tests', () => {
cy.get('#ipc-signupView-text-area')
.invoke('val')
.then((input) => {
dashboardSpecMnemonic = input;
dashboardSpecMnemonic = input as string;
});
cy.get('#ipc-modal-close-button').click();
});
Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ describe('Signup with credentials Button for SignupView', () => {
cy.visit('/signup');
cy.wait(1000);
cy.get('#ipc-signupView-credentials-signup-button').click();
cy.get(1000);
cy.wait(1000);
cy.get('#ipc-signupView-copy-mnemonics-button').click();
});

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
let dashboardSpecMnemonic = '';

describe('Create account for DashboardView tests', () => {
it('Connect', () => {
cy.visit('/signup');
Expand All @@ -8,7 +6,7 @@ describe('Create account for DashboardView tests', () => {
cy.get('#ipc-signupView-text-area')
.invoke('val')
.then((input) => {
dashboardSpecMnemonic = input;
dashboardSpecMnemonic = input as string;
});
cy.get('#ipc-modal-close-button').click();
});
Expand Down Expand Up @@ -37,4 +35,4 @@ describe('Upload a program modal for DashboardView', () => {
cy.get('#ipc-modal-close-button').click();
cy.get('button').should('have.length', 10);
});
});
});
2 changes: 1 addition & 1 deletion cypress/support/index.js → cypress/support/e2e.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
// ***********************************************************

// Import commands.js using ES2015 syntax:
import './commands'
import './commands';

// Alternatively you can use CommonJS syntax:
// require('./commands')
11 changes: 11 additions & 0 deletions cypress/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"compilerOptions": {
"target": "es5",
"lib": ["es5", "dom"],
"types": ["cypress", "node"]
},
"include": [
"**/*.ts",
"../node_modules/cypress-file-upload",
]
}
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
"@types/react-dom": "^17.0.8",
"@typescript-eslint/eslint-plugin": "^5.29.0",
"@typescript-eslint/parser": "^5.29.0",
"cypress": "^9.1.1",
"cypress": "^10.2.0",
"cypress-file-upload": "^5.0.8",
"eslint": "^8.18.0",
"eslint-config-airbnb": "^19.0.4",
Expand Down
50 changes: 49 additions & 1 deletion yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3205,7 +3205,55 @@ cypress-file-upload@^5.0.8:
resolved "https://registry.yarnpkg.com/cypress-file-upload/-/cypress-file-upload-5.0.8.tgz#d8824cbeaab798e44be8009769f9a6c9daa1b4a1"
integrity sha512-+8VzNabRk3zG6x8f8BWArF/xA/W0VK4IZNx3MV0jFWrJS/qKn8eHfa5nU73P9fOQAgwHFJx7zjg4lwOnljMO8g==

cypress@^9.1.1, cypress@^9.3.1:
cypress@^10.2.0:
version "10.2.0"
resolved "https://registry.yarnpkg.com/cypress/-/cypress-10.2.0.tgz#ca078abfceb13be2a33cbba6e0e80ded770f542a"
integrity sha512-+i9lY5ENlfi2mJwsggzR+XASOIgMd7S/Gd3/13NCpv596n3YSplMAueBTIxNLcxDpTcIksp+9pM3UaDrJDpFqA==
dependencies:
"@cypress/request" "^2.88.10"
"@cypress/xvfb" "^1.2.4"
"@types/node" "^14.14.31"
"@types/sinonjs__fake-timers" "8.1.1"
"@types/sizzle" "^2.3.2"
arch "^2.2.0"
blob-util "^2.0.2"
bluebird "^3.7.2"
buffer "^5.6.0"
cachedir "^2.3.0"
chalk "^4.1.0"
check-more-types "^2.24.0"
cli-cursor "^3.1.0"
cli-table3 "~0.6.1"
commander "^5.1.0"
common-tags "^1.8.0"
dayjs "^1.10.4"
debug "^4.3.2"
enquirer "^2.3.6"
eventemitter2 "^6.4.3"
execa "4.1.0"
executable "^4.1.1"
extract-zip "2.0.1"
figures "^3.2.0"
fs-extra "^9.1.0"
getos "^3.2.1"
is-ci "^3.0.0"
is-installed-globally "~0.4.0"
lazy-ass "^1.6.0"
listr2 "^3.8.3"
lodash "^4.17.21"
log-symbols "^4.0.0"
minimist "^1.2.6"
ospath "^1.2.2"
pretty-bytes "^5.6.0"
proxy-from-env "1.0.0"
request-progress "^3.0.0"
semver "^7.3.2"
supports-color "^8.1.1"
tmp "~0.2.1"
untildify "^4.0.0"
yauzl "^2.10.0"

cypress@^9.3.1:
version "9.7.0"
resolved "https://registry.yarnpkg.com/cypress/-/cypress-9.7.0.tgz#bf55b2afd481f7a113ef5604aa8b693564b5e744"
integrity sha512-+1EE1nuuuwIt/N1KXRR2iWHU+OiIt7H28jJDyyI4tiUftId/DrXYEwoDa5+kH2pki1zxnA0r6HrUGHV5eLbF5Q==
Expand Down

0 comments on commit 735dd13

Please sign in to comment.