Skip to content

Commit 7f2a30a

Browse files
committed
fix home page test for fully loaded page
1 parent a289849 commit 7f2a30a

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

cypress/e2e/home.cy.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,17 +51,17 @@ describe('Viewing Home page', () => {
5151
error = false
5252
})
5353
it('should show the search bar.', () => {
54-
cy.get("[data-cy='search-bar']").should('exist').then(() => {
54+
cy.get("form[data-cy='search-bar']").should('exist').then(() => {
5555
cy.log('Search bar renders successfully.')
5656
})
5757
})
5858
it('should show the about text.', () => {
59-
cy.get('TitledTextBox[data-cy="about-us"]').should('exist').then(() => {
59+
cy.get("section[data-cy='about-us-section']").should('exist').then(() => {
6060
cy.log('Abouttext renders successfully.')
6161
})
6262
})
6363
it('should show the featured services cards.', () => {
64-
cy.get("row[data-cy='item-group']").should('exist').then(() => {
64+
cy.get("div[data-cy='item-group']").should('exist').then(() => {
6565
cy.log('Status bar renders successfully.')
6666
})
6767
})

pages/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ const Home = () => {
4444
/>
4545
<div className='container'>
4646
<SearchBar onSubmit={handleOnSubmit} />
47-
<TitledTextBox title={ABOUT_US_TITLE} text={ABOUT_US_TEXT} data-cy='about-us'/>
47+
<TitledTextBox title={ABOUT_US_TITLE} text={ABOUT_US_TEXT} dataCy='about-us-section'/>
4848
{isError ? (
4949
<Notice
5050
alert={configureErrors([isError])}

0 commit comments

Comments
 (0)