Skip to content

Commit

Permalink
Merge pull request #9 from rodmatola/percy
Browse files Browse the repository at this point in the history
Percy
  • Loading branch information
rodmatola authored Dec 12, 2023
2 parents f2f6709 + 1eeacd8 commit 3112ee8
Show file tree
Hide file tree
Showing 5 changed files with 478 additions and 11 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/cypress_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ on:
- main
workflow_dispatch:

env:
PERCY_TOKEN: ${{ secrets.PERCY_TOKEN }}

jobs:
cypress_tests:
runs-on: ubuntu-latest
Expand Down
25 changes: 25 additions & 0 deletions cypress/e2e/visualRegression.cy.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
import { computersListPage, addNewComputerPage, editComputerPage } from "../support/pageElements/computerDatabase.elements"
import { computerRandomInfo, myComputerInfo } from "../fixtures/computerInfo"
import { ComputerInfo } from "../support/types/ComputerInfo"

describe('Computer database', () => {
beforeEach(() => {
cy.step('Given I am on computers page')
cy.visit('/')
})

it('verifies computers page', () => {
cy.get(computersListPage.computersFound).should('be.visible')
cy.percySnapshot()
})

it('verifies adds a new computer page', () => {
cy.get(computersListPage.addNewComputerBtn).click()
cy.percySnapshot()
})

it('verifies delete a computer page', () => {
cy.get(computersListPage.tableComputerNames).first().click()
cy.percySnapshot()
})
})
1 change: 1 addition & 0 deletions cypress/support/e2e.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
import './commands'
import 'cypress-plugin-steps'
import '@percy/cypress';
Loading

0 comments on commit 3112ee8

Please sign in to comment.