Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🐞 fix(cypress): bump to v10 #841

Merged
merged 4 commits into from
Jul 5, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
2 changes: 1 addition & 1 deletion .eslintignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
generators/app/templates/specs/integration/landing_spec.js
generators/app/templates/specs/e2e/landing.cy.js
generators/app/templates/specs/mocha/rest_spec.js
generators/app/templates/specs/xqs/xqSuite.js

Expand Down
12 changes: 6 additions & 6 deletions generators/app/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -498,8 +498,8 @@ module.exports = class extends Generator {
)

this.fs.copy(
this.templatePath('specs/cypress.json'),
this.destinationPath('cypress.json')
this.templatePath('specs/cypress.config.js'),
this.destinationPath('cypress.config.js')
)

this.fs.copy(
Expand All @@ -513,8 +513,8 @@ module.exports = class extends Generator {
)

this.fs.copyTpl(
this.templatePath('specs/integration/landing_spec.js'),
this.destinationPath('test/cypress/integration/landing_spec.js'), {
this.templatePath('specs/e2e/landing.cy.js'),
this.destinationPath('test/cypress/e2e/landing.cy.js'), {
apptype: this.props.apptype[0],
short: this.props.short,
defcoll: this.props.defcoll,
Expand Down Expand Up @@ -681,8 +681,8 @@ module.exports = class extends Generator {
this.destinationPath('templates/')
)
this.fs.copyTpl(
this.templatePath('specs/integration/login-*_spec.js'),
this.destinationPath('test/cypress/integration/'), {
this.templatePath('specs/e2e/login-*.cy.js'),
this.destinationPath('test/cypress/e2e/'), {
defcoll: this.props.defcoll,
short: this.props.short
})
Expand Down
16 changes: 16 additions & 0 deletions generators/app/templates/specs/cypress.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
const { defineConfig } = require('cypress')

module.exports = defineConfig({
screenshotsFolder: 'reports/screenshots',
videosFolder: 'reports/videos',
fixturesFolder: 'test/cypress/fixtures',
e2e: {
setupNodeEvents (on, config) {
// implement node event listeners here
},
baseUrl: 'http://localhost:8080',
includeShadowDom: true,
specPattern: 'test/cypress/e2e/**/*.cy.{js,jsx,ts,tsx}',
supportFile: 'test/cypress/support/index.js'
}
})
9 changes: 0 additions & 9 deletions generators/app/templates/specs/cypress.json

This file was deleted.

17 changes: 0 additions & 17 deletions generators/app/templates/specs/cypress/plugins/index.js

This file was deleted.

10 changes: 5 additions & 5 deletions generators/app/templates/specs/cypress/support/commands.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,16 @@
//
//
// -- This is a parent command --
// Cypress.Commands.add("login", (email, password) => { ... })
// Cypress.Commands.add('login', (email, password) => { ... })
//
//
// -- This is a child command --
// Cypress.Commands.add("drag", { prevSubject: 'element'}, (subject, options) => { ... })
// Cypress.Commands.add('drag', { prevSubject: 'element'}, (subject, options) => { ... })
//
//
// -- This is a dual command --
// Cypress.Commands.add("dismiss", { prevSubject: 'optional'}, (subject, options) => { ... })
// Cypress.Commands.add('dismiss', { prevSubject: 'optional'}, (subject, options) => { ... })
//
//
// -- This is will overwrite an existing command --
// Cypress.Commands.overwrite("visit", (originalFn, url, options) => { ... })
// -- This will overwrite an existing command --
// Cypress.Commands.overwrite('visit', (originalFn, url, options) => { ... })
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// ***********************************************************
// This example support/index.js is processed and
// This example support/e2e.js is processed and
// loaded automatically before your test files.
//
// This is a great place to put global configuration and
Expand Down
2 changes: 1 addition & 1 deletion test/generated-pkg/app-eXide-plain.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ describe('eXide plain app', function () {
admin: 'admin',
adminpw: 'pw123'
})
assert.noFile(['resources/images/bold.gif', 'pre-install.xq', 'test/cypress/integration/secure_spec.js', '.travis.yml', 'resources/css/exist-2.2.css'])
assert.noFile(['resources/images/bold.gif', 'pre-install.xq', 'test/cypress/e2e/secure.cy.js', '.travis.yml', 'resources/css/exist-2.2.css'])
})

describe('plain package has', function () {
Expand Down
2 changes: 1 addition & 1 deletion test/generated-pkg/app-empty.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ describe('empty package', function () {
github: false,
atom: false
})
assert.noFile(['modules/app.xqm', 'templates/page.html', 'test/cypress/integration/login-ok_spec.js', 'index.html'])
assert.noFile(['modules/app.xqm', 'templates/page.html', 'test/cypress/e2e/login-ok.cy.js', 'index.html'])
})

describe('empty has', function () {
Expand Down
2 changes: 1 addition & 1 deletion test/generated-pkg/app-mysec.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ describe('eXide style …', function () {

describe('secure exist design has …', function () {
it('default files and restricted area', function (done) {
assert.file(['admin/controller.xq', 'admin/index.html', 'templates/login-panel.html', 'pre-install.xq', 'test/cypress/integration/login-ok_spec.js'])
assert.file(['admin/controller.xq', 'admin/index.html', 'templates/login-panel.html', 'pre-install.xq', 'test/cypress/e2e/login-ok.cy.js'])
done()
})

Expand Down
2 changes: 1 addition & 1 deletion test/util/meta-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ exports.metaTest = function () {
})

it('integration-tests', function (done) {
assert.file(['cypress.json', 'test/cypress/integration/landing_spec.js', 'reports/videos/.gitkeep'])
assert.file(['cypress.config.js', 'test/cypress/e2e/landing.cy.js', 'reports/videos/.gitkeep'])
done()
})
}