Skip to content

Commit

Permalink
Task 108196: cypress tags for filtering tests (#413)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
Lisa-V-Sau authored Oct 7, 2022
1 parent 438809f commit b223621
Show file tree
Hide file tree
Showing 37 changed files with 3,921 additions and 2,319 deletions.
14 changes: 14 additions & 0 deletions ApplyToBecomeInternal/ApplyToBecomeCypressTests/cypress.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import { defineConfig } from 'cypress'

export default defineConfig({
video: false,
screenshots: false,
retries: 2,
e2e: {
// We've imported your old cypress plugins here.
// You may want to clean this up later by importing these.
setupNodeEvents(on, config) {
return require('./cypress/plugins/index.js')(on, config)
},
},
})
5 changes: 0 additions & 5 deletions ApplyToBecomeInternal/ApplyToBecomeCypressTests/cypress.json

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/// <reference types ='Cypress'/>

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

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

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

Cypress._.each(['iphone-x'], (viewport) => {
describe(`86316 Submit and view MP details ${viewport}`, () => {
describe(`86316 Submit and view MP details ${viewport}`, { tags: ['@dev', '@stage']}, () => {
before(() => {
cy.viewport(viewport)
});
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/// <reference types ='Cypress'/>

Cypress._.each(['iphone-x'], (viewport) => {
describe(`86858 Modify viability fields on ${viewport}`, () => {
describe(`86858 Modify viability fields on ${viewport}`, { tags: ['@dev', '@stage']}, () => {
afterEach(() => {
cy.storeSessionData()
});
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/// <reference types ='Cypress'/>
Cypress._.each(['iphone-x'], (viewport) => {
describe(`86859 Modify viability fields on ${viewport}`, () => {
describe(`86859 Modify viability fields on ${viewport}`, { tags: ['@dev', '@stage']}, () => {
afterEach(() => {
cy.storeSessionData()
});
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/// <reference types ='Cypress'/>

Cypress._.each(['iphone-x'], (viewport) => {
describe(`92796 Modify Distance from School Info ${viewport}`, () => {
describe(`92796 Modify Distance from School Info ${viewport}`, { tags: ['@dev', '@stage']}, () => {
beforeEach(() => {
cy.login()
cy.viewport(viewport)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/// <reference types ='Cypress'/>

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

afterEach(() => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/// <reference types ='Cypress'/>

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

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

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/// <reference types ='Cypress'/>

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

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

it('TC01: Should display the project notes input', () => {
it('TC01: Should display the project notes input', () => {
cy.get('[href*="/project-notes/"').click()
cy.get('[href*="/new-note"').click()
});
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/// <reference types ='Cypress'/>

Cypress._.each(['iphone-x'], (viewport) => {
describe(`86314 Cookie consent details on ${viewport}`, () => {
describe(`86314 Cookie consent details on ${viewport}`, { tags: ['@dev', '@stage']}, () => {
beforeEach(() => {
cy.login()
cy.viewport(viewport)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/// <reference types ='Cypress'/>

Cypress._.each(['iphone-x'], (viewport) => {
describe(`86341: Error messaging should be correct on ${viewport}`, () => {
describe(`86341: Error messaging should be correct on ${viewport}`, { tags: ['@dev', '@stage']}, () => {
beforeEach(() => {
cy.viewport(viewport)
cy.login()
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/// <reference types ='Cypress'/>

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

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/// <reference types ='Cypress'/>
import {data} from "../../fixtures/cath121-body.json"

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

beforeEach(() => {
Expand Down
Loading

0 comments on commit b223621

Please sign in to comment.