Skip to content

Commit

Permalink
Merge pull request #48 from vtex/fix/update-cypress-path
Browse files Browse the repository at this point in the history
Fix/update cypress path
  • Loading branch information
vitorflg authored Mar 10, 2021
2 parents 72951ed + de30588 commit 64bb3c0
Show file tree
Hide file tree
Showing 14 changed files with 26 additions and 20 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down
18 changes: 1 addition & 17 deletions cypress.js
Original file line number Diff line number Diff line change
@@ -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')
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@vtex/test-tools",
"version": "3.4.0",
"version": "3.4.1",
"description": "VTEX IO testing tools",
"repository": {
"type": "git",
Expand Down
17 changes: 17 additions & 0 deletions src/cypress.tsx
Original file line number Diff line number Diff line change
@@ -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,
}
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -70,4 +70,4 @@ const vtexCommands = () => {
)
}

module.exports = vtexCommands
export default vtexCommands
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@
"allowJs": true,
"types": ["cypress", "jest", "node"]
},
"include": ["./src/**/*", "./cypress/**/*"]
"include": ["./src/**/*"]
}

0 comments on commit 64bb3c0

Please sign in to comment.