Skip to content

Commit

Permalink
test: adjust things to accomodate moving the cypress stuff to its own…
Browse files Browse the repository at this point in the history
… .htm
  • Loading branch information
readytotest committed Feb 7, 2025
1 parent 0a83cda commit ae018ea
Showing 1 changed file with 16 additions and 11 deletions.
27 changes: 16 additions & 11 deletions cypress/tests/ready-to-test-github-page/readyToTestSmoke.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,25 +10,30 @@ describe('Smoke Test GitHub Page', () => {

beforeEach(() => {

cy.visit('/html/cypress.htm')
cy.log('Visit Cypress Page')
cy.visit('/')
cy.log('Visit Home Page')

})

it('Check for text on page, go to reports page, check for HTML elements', () => {
// Check text on the main page
cy.get('body').should('include.text', 'National Weather Service API')
cy.get('body').should('include.text', 'Postman API Testing')
cy.get('body').should('include.text', 'Most Recent Earthquake')
cy.get('earthquake-place').should('exist')
cy.get('body').should('include.text', 'Repository Last Commit')
cy.get('repo-update-timestamp').should('exist')

// Go to the Cypress page and open the reports page
cy.get('[href="/html/cypress.htm"]').click()
cy.get('[data-cy="cypress-report"]').click()
cy.get('center').should('include.text', 'Click on the test results above ^^ to expand it and view the video')
cy.get('[href="/html/cypress.htm"]').click()
cy.get('body').should('include.text', 'Ready to Test (QA) GitHub Profile')

// Go back to the Cypress page and check some text
cy.get('[href="/html/cypress.htm"]').click()
cy.get('body').should('include.text', 'UI Test Automation with Cypress')
cy.get('body').should('include.text', 'Cypress Cloud')
cy.get('body').should('include.text', 'GitHub Actions')
cy.get('body').should('include.text', 'National Weather Service API')
cy.get('body').should('include.text', 'Postman API Testing')
cy.get('body').should('include.text', 'Most Recent Earthquake')
cy.get('earthquake-place').should('exist')
cy.get('body').should('include.text', 'Repository Last Commit')
cy.get('repo-update-timestamp').should('exist')
cy.get('body').should('include.text', 'GitHub Actions')


})
Expand Down

0 comments on commit ae018ea

Please sign in to comment.