Add basic test for landing page

This commit is contained in:
Alexander Navarro 2023-11-27 19:52:08 -03:00
parent ea22c57f41
commit 5a4c64ed21
9 changed files with 1135 additions and 86 deletions

View 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...');
});
});
});