-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #597 from CalCorbin/e2e-landing
Add e2e test for landing page links
- Loading branch information
Showing
3 changed files
with
45 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
# Portfolio Task List | ||
|
||
- Upgrade eslint | ||
- Create hover state for cards that shows a description of the project | ||
- Create a new page for the blog | ||
- Create automated package versioning that informs me of errors | ||
- Create a websocket project that allows users to draw together | ||
- Add 'no .only' rule to eslint |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
describe('Landing Page', () => { | ||
beforeEach(() => { | ||
cy.visit('/'); | ||
|
||
// Load the page | ||
cy.findByText('cal corbin').should('be.visible'); | ||
}); | ||
|
||
it('should go to landing page and open the LinkedIn link', () => { | ||
// Click on the LinkedIn link | ||
cy.get('a[href="https://www.linkedin.com/in/calcorbin/"]').click(); | ||
|
||
// Verify the LinkedIn link opens | ||
cy.origin('https://www.linkedin.com/in/calcorbin/', () => { | ||
cy.on('uncaught:exception', (e) => { | ||
if (e.message.includes('Things went bad')) { | ||
// we expected this error, so let's ignore it | ||
// and let the test continue | ||
return false; | ||
} | ||
}); | ||
cy.contains('Experience & Education').should('be.visible'); | ||
}); | ||
}); | ||
|
||
it('should go to landing page and open the GitHub link', () => { | ||
// Click on the GitHub link | ||
cy.get('a[href="https://github.com/CalCorbin"]').click(); | ||
|
||
// Verify the GitHub link opens | ||
cy.origin('https://github.com', () => { | ||
cy.contains("When I'm not coding").should('be.visible'); | ||
}); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters