Add basic test for landing page
This commit is contained in:
parent
ea22c57f41
commit
5a4c64ed21
9 changed files with 1135 additions and 86 deletions
25
cypress/e2e/home_page.cy.ts
Normal file
25
cypress/e2e/home_page.cy.ts
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
describe('The Home Page', () => {
|
||||
beforeEach(() => {
|
||||
cy.visit('/');
|
||||
});
|
||||
|
||||
it('Successfully load', () => {
|
||||
cy.get('h1')
|
||||
.should('have.length', 1)
|
||||
.should('have.text', 'Alexander Navarro');
|
||||
});
|
||||
|
||||
it('Card components have content', () => {
|
||||
cy.get('.card')
|
||||
.should('have.length', 3)
|
||||
.each(($card) => {
|
||||
cy.wrap($card)
|
||||
.find('li')
|
||||
.should(($li) => expect($li).to.have.lengthOf.at.most(3))
|
||||
.find('a')
|
||||
.should('have.attr', 'href');
|
||||
|
||||
cy.wrap($card).contains('See more...');
|
||||
});
|
||||
});
|
||||
});
|
||||
Loading…
Add table
Add a link
Reference in a new issue