mirror of
https://github.com/theoludwig/theoludwig.git
synced 2025-12-12 20:46:52 +01:00
test: add cypress e2e (#159)
This commit is contained in:
19
cypress/integration/pages/index.spec.ts
Normal file
19
cypress/integration/pages/index.spec.ts
Normal file
@@ -0,0 +1,19 @@
|
||||
describe('Page /', () => {
|
||||
beforeEach(() => cy.visit('/'))
|
||||
|
||||
it('should reveals the sections while scrolling except the about section', () => {
|
||||
const sectionsReveals = [
|
||||
'#interests',
|
||||
'#skills',
|
||||
'#portfolio',
|
||||
'#open-source'
|
||||
]
|
||||
cy.get('#about').should('be.visible')
|
||||
for (const section of sectionsReveals) {
|
||||
cy.get(section)
|
||||
.should('not.be.visible')
|
||||
.scrollIntoView()
|
||||
.should('be.visible')
|
||||
}
|
||||
})
|
||||
})
|
||||
Reference in New Issue
Block a user