Skip to content

Commit b223621

Browse files
authored
Task 108196: cypress tags for filtering tests (#413)
* Task 108196: Cypress Tags Cypress grep: - Cypress 10.0^ dependency - Grep Module import to /plugins/index.js & /support/e2e.js - Tags in use: @dev,@ stage, @integration - For more recipes: https://github.com/cypress-io/cypress-grep Cypress upgrade: - Cypress package version: 10.9.0 - Folder where tests live is renamed: from 'integration', to 'e2e' - Test files renamed: from '.spec.js', now '.cy.js' - Support files renamed from: /support/index.js, now support/e2e.js - Cypress config files changed: from cypress.json, now cypress.config.ts - Latest changes: https://docs.cypress.io/guides/references/changelog Cypress 10.9.0 known issues: - Unable to run all tests at once via Cypress GUI: cypress-io/cypress#21628 - Error Log each time tests run in terminal: cypress-io/cypress#22273 README: - grep run command - grep recipes * Task 108196: Cypress Tags - updates to README * Task 108196: Cypress Tags - fix typo - Fix typo on README
1 parent 438809f commit b223621

File tree

37 files changed

+3921
-2319
lines changed

37 files changed

+3921
-2319
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
import { defineConfig } from 'cypress'
2+
3+
export default defineConfig({
4+
video: false,
5+
screenshots: false,
6+
retries: 2,
7+
e2e: {
8+
// We've imported your old cypress plugins here.
9+
// You may want to clean this up later by importing these.
10+
setupNodeEvents(on, config) {
11+
return require('./cypress/plugins/index.js')(on, config)
12+
},
13+
},
14+
})

ApplyToBecomeInternal/ApplyToBecomeCypressTests/cypress.json

-5
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/// <reference types ='Cypress'/>
22

33
Cypress._.each(['iphone-x'], (viewport) => {
4-
describe(`84596 Error handling should present correctly to the user on ${viewport}`, () => {
4+
describe(`84596 Error handling should present correctly to the user on ${viewport}`, { tags: ['@dev', '@stage']}, () => {
55
after(function () {
66
cy.clearLocalStorage()
77
});
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/// <reference types ='Cypress'/>
22

33
Cypress._.each(['iphone-x'], (viewport) => {
4-
describe(`86296 Check mark should reflect status correctly on ${viewport}`, () => {
4+
describe(`86296 Check mark should reflect status correctly on ${viewport}`, { tags: ['@dev', '@stage']}, () => {
55
beforeEach(() => {
66
cy.login()
77
cy.selectSchoolListing(1)
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/// <reference types ='Cypress'/>
22

33
Cypress._.each(['iphone-x'], (viewport) => {
4-
describe(`86342 Error message link should redirect correctly on ${viewport}`, () => {
4+
describe(`86342 Error message link should redirect correctly on ${viewport}`, { tags: ['@dev', '@stage']}, () => {
55
beforeEach(() => {
66
cy.viewport(viewport)
77
cy.login()
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/// <reference types ='Cypress'/>
22

33
Cypress._.each(['iphone-x'], (viewport) => {
4-
describe(`86316 Submit and view MP details ${viewport}`, () => {
4+
describe(`86316 Submit and view MP details ${viewport}`, { tags: ['@dev', '@stage']}, () => {
55
before(() => {
66
cy.viewport(viewport)
77
});
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/// <reference types ='Cypress'/>
22

33
Cypress._.each(['iphone-x'], (viewport) => {
4-
describe(`86858 Modify viability fields on ${viewport}`, () => {
4+
describe(`86858 Modify viability fields on ${viewport}`, { tags: ['@dev', '@stage']}, () => {
55
afterEach(() => {
66
cy.storeSessionData()
77
});
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/// <reference types ='Cypress'/>
22
Cypress._.each(['iphone-x'], (viewport) => {
3-
describe(`86859 Modify viability fields on ${viewport}`, () => {
3+
describe(`86859 Modify viability fields on ${viewport}`, { tags: ['@dev', '@stage']}, () => {
44
afterEach(() => {
55
cy.storeSessionData()
66
});
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/// <reference types ='Cypress'/>
22

33
Cypress._.each(['iphone-x'], (viewport) => {
4-
describe(`92796 Modify Distance from School Info ${viewport}`, () => {
4+
describe(`92796 Modify Distance from School Info ${viewport}`, { tags: ['@dev', '@stage']}, () => {
55
beforeEach(() => {
66
cy.login()
77
cy.viewport(viewport)
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/// <reference types ='Cypress'/>
22

33
Cypress._.each(['iphone-x'], (viewport) => {
4-
describe(`86339 validate advisory board urls on ${viewport}`, () => {
4+
describe(`86339 validate advisory board urls on ${viewport}`, { tags: ['@dev', '@stage']}, () => {
55
let selectedSchool = ''
66

77
afterEach(() => {
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/// <reference types ='Cypress'/>
22

33
Cypress._.each(['iphone-x'], (viewport) => {
4-
describe(`86462: "Date you sent/return the template" are reflected in preview on ${viewport}`, () => {
4+
describe(`86462: "Date you sent/return the template" are reflected in preview on ${viewport}`, { tags: ['@dev', '@stage']}, () => {
55
beforeEach(() => {
66
cy.login()
77
cy.viewport(viewport)
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/// <reference types ='Cypress'/>
22

33
Cypress._.each(['iphone-x'], (viewport) => {
4-
describe(`86856 Comments should accept alphanumeric inputs on ${viewport}`, () => {
4+
describe(`86856 Comments should accept alphanumeric inputs on ${viewport}`, { tags: ['@dev', '@stage']}, () => {
55
beforeEach(() => {
66
cy.login()
77

Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/// <reference types ='Cypress'/>
22

33
Cypress._.each(['iphone-x'], (viewport) => {
4-
describe(`87641 Check mark should reflect status correctly on LA Information preview page on ${viewport}`, () =>{
4+
describe(`87641 Check mark should reflect status correctly on LA Information preview page on ${viewport}`, { tags: ['@dev', '@stage']}, () =>{
55
beforeEach(() => {
66
cy.login()
77
cy.viewport(viewport)
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/// <reference types ='Cypress'/>
22

33
Cypress._.each(['iphone-x'], (viewport) => {
4-
describe(`86317 Submit and view project notes on ${viewport}`, () => {
4+
describe(`86317 Submit and view project notes on ${viewport}`, { tags: ['@dev', '@stage']}, () => {
55
beforeEach(() => {
66
cy.login()
77
cy.viewport(viewport)
@@ -11,7 +11,7 @@ Cypress._.each(['iphone-x'], (viewport) => {
1111
let date
1212
let dateText
1313

14-
it('TC01: Should display the project notes input', () => {
14+
it('TC01: Should display the project notes input', () => {
1515
cy.get('[href*="/project-notes/"').click()
1616
cy.get('[href*="/new-note"').click()
1717
});
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/// <reference types ='Cypress'/>
22

33
Cypress._.each(['iphone-x'], (viewport) => {
4-
describe(`86314 Cookie consent details on ${viewport}`, () => {
4+
describe(`86314 Cookie consent details on ${viewport}`, { tags: ['@dev', '@stage']}, () => {
55
beforeEach(() => {
66
cy.login()
77
cy.viewport(viewport)
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/// <reference types ='Cypress'/>
22

33
Cypress._.each(['iphone-x'], (viewport) => {
4-
describe(`86341: Error messaging should be correct on ${viewport}`, () => {
4+
describe(`86341: Error messaging should be correct on ${viewport}`, { tags: ['@dev', '@stage']}, () => {
55
beforeEach(() => {
66
cy.viewport(viewport)
77
cy.login()
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/// <reference types ='Cypress'/>
22

33
Cypress._.each(['iphone-x'], (viewport) => {
4-
describe(`91489: Apply-to-become GET application types on ${viewport}`, () => {
4+
describe(`91489: Apply-to-become GET application types on ${viewport}`, { tags: ['@dev', '@stage']}, () => {
55
beforeEach(() => {
66
cy.login()
77

Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/// <reference types ='Cypress'/>
22
import {data} from "../../fixtures/cath121-body.json"
33

4-
describe('91489: Apply-to-becom GET data application types', () => {
4+
describe('91489: Apply-to-becom GET data application types', { tags: ['@dev', '@stage']}, () => {
55
let dataAppSch = data.applyingSchools[0]
66

77
beforeEach(() => {

0 commit comments

Comments
 (0)