Skip to content

Commit 7d51fdb

Browse files
committed
Updated test
1 parent 4da25d5 commit 7d51fdb

File tree

1 file changed

+14
-3
lines changed

1 file changed

+14
-3
lines changed

src/cypress/e2e/app.cy.ts

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,24 @@
33
// If you're using ESLint on your project, we recommend installing the ESLint Cypress plugin instead:
44
// https://github.com/cypress-io/eslint-plugin-cypress
55

6-
describe('Navigation', () => {
6+
describe('App', () => {
77
it('should have Pets header', () => {
88
// Start from the index page
99
cy.visit('http://localhost:3000/')
1010

11-
// Find a link with an href attribute containing "about" and click it
12-
cy.get('h1').contains('Pets')
11+
// check the h1 tag to contain shelter
12+
cy.get('h1').contains('Adoption shelter')
13+
})
14+
15+
it('should display todays day', () => {
16+
// start from the index page
17+
cy.visit('http://localhost:3000/')
18+
19+
// get today's long day name
20+
const today = new Date().toLocaleDateString('en-US', { weekday: 'long' })
21+
22+
// confirm div with id of hours has today's day
23+
cy.get('#hours').contains(today)
1324
})
1425
})
1526

0 commit comments

Comments
 (0)