Skip to content

Commit

Permalink
Merge pull request #18 from andreynav/18-add-grep-plugin
Browse files Browse the repository at this point in the history
18 add grep plugin
  • Loading branch information
andreynav committed Jul 13, 2023
2 parents 89d9f04 + aea6626 commit 640bb80
Show file tree
Hide file tree
Showing 7 changed files with 1,609 additions and 52 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -33,3 +33,6 @@ dist
npm-debug.log*
yarn-debug.log*
yarn-error.log*

# cypress
cypress/videos
9 changes: 7 additions & 2 deletions cypress.config.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@
const { defineConfig } = require("cypress");
const { defineConfig } = require("cypress")

module.exports = defineConfig({
e2e: {
setupNodeEvents(on, config) {
// implement node event listeners here
require('@cypress/grep/src/plugin')(on, config)
return config
},
env: {
grepOmitFiltered: true,
grepFilterSpecs: true
},
specPattern: 'cypress/e2e/tests/*/*.{js,jsx,ts,tsx}',
baseUrl: 'http://localhost:3000/',
Expand Down
6 changes: 3 additions & 3 deletions cypress/e2e/tests/ui/signup.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ describe('Sign up - sign in suite', () => {
common.openPage('/')
})

it('should register a new user', () => {
it('should register a new user', { tags: '@smoke' },() => {
signup.openSignupPage()
signup.registerUser(name, email, password)
})
Expand All @@ -26,7 +26,7 @@ describe('Sign up - sign in suite', () => {
login.verifyLoginPageIsOpened()
})

it('should login as an existing user', () => {
it('should login as an existing user',() => {
login.openLoginPage()
login.loginUser(userName, userEmail, userPassword)
})
Expand All @@ -43,7 +43,7 @@ describe('Sign up - sign in suite', () => {
login.verifyErrorAuthMessage()
})

it('should logout a user', () => {
it('should logout a user',() => {
loginAPI.userLogin(userEmail, userPassword)
common.reloadPage()
login.logoutUser(userName)
Expand Down
2 changes: 2 additions & 0 deletions cypress/support/e2e.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@

// Import commands.js using ES2015 syntax:
import './commands'
import cypressGrep from '@cypress/grep'
cypressGrep()

// Alternatively you can use CommonJS syntax:
// require('./commands')
2 changes: 2 additions & 0 deletions cypress/support/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
const registerCypressGrep = require('@cypress/grep')
registerCypressGrep()
Loading

0 comments on commit 640bb80

Please sign in to comment.