diff --git a/CHANGELOG.md b/CHANGELOG.md index 23b103e..d2c29dd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +## [3.4.1] - 2021-03-10 + +### Fixed +- Move cypress to the src path. + ### Added - Extensible commands, utils and generic tests for cypress/e2e. diff --git a/cypress.js b/cypress.js index 03fcac4..c2ff72e 100644 --- a/cypress.js +++ b/cypress.js @@ -1,17 +1 @@ -const utils = require('./dist/cypress/utils') -const vtexCommands = require('./dist/cypress/support/commands.js') - -module.exports = { - goToSearchPage: utils.goToSearchPage, - goToProductPageByShelf: utils.goToProductPageByShelf, - checkText: utils.checkText, - openCart: utils.openCart, - closeCart: utils.closeCart, - clearCart: utils.clearCart, - fillAndCheckShippingSimulator: utils.fillAndCheckShippingSimulator, - resolveIdentifier: utils.resolveIdentifier, - identifierExists: utils.identifierExists, - checkIfElementExists: utils.checkIfElementExists, - scrollToId: utils.scrollToId, - vtexCommands, -} +module.exports = require('./dist/cypress.js') diff --git a/package.json b/package.json index d065994..a530c97 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@vtex/test-tools", - "version": "3.4.0", + "version": "3.4.1", "description": "VTEX IO testing tools", "repository": { "type": "git", diff --git a/src/cypress.tsx b/src/cypress.tsx new file mode 100644 index 0000000..b8707e3 --- /dev/null +++ b/src/cypress.tsx @@ -0,0 +1,17 @@ +import * as utils from './cypress/utils' +import vtexCommands from './cypress/support/commands.js' + +export default { + goToSearchPage: utils.goToSearchPage, + goToProductPageByShelf: utils.goToProductPageByShelf, + checkText: utils.checkText, + openCart: utils.openCart, + closeCart: utils.closeCart, + clearCart: utils.clearCart, + fillAndCheckShippingSimulator: utils.fillAndCheckShippingSimulator, + resolveIdentifier: utils.resolveIdentifier, + identifierExists: utils.identifierExists, + checkIfElementExists: utils.checkIfElementExists, + scrollToId: utils.scrollToId, + vtexCommands, +} diff --git a/cypress/plugins/index.js b/src/cypress/plugins/index.js similarity index 100% rename from cypress/plugins/index.js rename to src/cypress/plugins/index.js diff --git a/cypress/support/commands.ts b/src/cypress/support/commands.ts similarity index 98% rename from cypress/support/commands.ts rename to src/cypress/support/commands.ts index d238eb3..42be5be 100644 --- a/cypress/support/commands.ts +++ b/src/cypress/support/commands.ts @@ -70,4 +70,4 @@ const vtexCommands = () => { ) } -module.exports = vtexCommands +export default vtexCommands diff --git a/cypress/support/index.js b/src/cypress/support/index.js similarity index 100% rename from cypress/support/index.js rename to src/cypress/support/index.js diff --git a/cypress/utils/assertion.ts b/src/cypress/utils/assertion.ts similarity index 100% rename from cypress/utils/assertion.ts rename to src/cypress/utils/assertion.ts diff --git a/cypress/utils/cart.ts b/src/cypress/utils/cart.ts similarity index 100% rename from cypress/utils/cart.ts rename to src/cypress/utils/cart.ts diff --git a/cypress/utils/fill.ts b/src/cypress/utils/fill.ts similarity index 100% rename from cypress/utils/fill.ts rename to src/cypress/utils/fill.ts diff --git a/cypress/utils/find.ts b/src/cypress/utils/find.ts similarity index 100% rename from cypress/utils/find.ts rename to src/cypress/utils/find.ts diff --git a/cypress/utils/index.ts b/src/cypress/utils/index.ts similarity index 100% rename from cypress/utils/index.ts rename to src/cypress/utils/index.ts diff --git a/cypress/utils/navigation.ts b/src/cypress/utils/navigation.ts similarity index 100% rename from cypress/utils/navigation.ts rename to src/cypress/utils/navigation.ts diff --git a/tsconfig.json b/tsconfig.json index 145e493..057be1e 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -9,5 +9,5 @@ "allowJs": true, "types": ["cypress", "jest", "node"] }, - "include": ["./src/**/*", "./cypress/**/*"] + "include": ["./src/**/*"] }