Created
March 2, 2023 18:13
-
-
Save slawekradzyminski/228ac47119114e34406aff1c88f73fe2 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/// <reference types="cypress" /> | |
describe('Awesome tests', () => { | |
beforeEach(() => { | |
cy.visit('https://www.awesome-testing.com/') | |
cy.viewport(1920, 1080) | |
console.log('This will be logged before cy.visit') | |
}) | |
it('should find Cypress posts', () => { | |
cy.get('.gsc-input input').type('Cypress') | |
cy.get('.gsc-search-button input').then(($btn) => { | |
console.log('This will be logged after typing Cypress') | |
}) | |
cy.get('.post-title').should('have.length.above', 1) | |
console.log('This will be logged after cy.visit') | |
}) | |
afterEach(() => { | |
cy.wait(2000) | |
cy.log('This is Cypress logging hence it will log after waiting') | |
console.log('This will log after test before waiting') | |
}) | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment