Skip to content

Commit ca16c78

Browse files
author
Your Name
committed
Angular Testing Course
1 parent afed82e commit ca16c78

File tree

1 file changed

+42
-2
lines changed

1 file changed

+42
-2
lines changed

cypress/integration/home.test.js

+42-2
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
describe('Home Page', () => {
55

6-
it('should display a list of courses', () => {
6+
beforeEach(() => {
77

88
cy.fixture('courses.json').as("coursesJSON");
99

@@ -13,6 +13,10 @@ describe('Home Page', () => {
1313

1414
cy.visit('/');
1515

16+
});
17+
18+
it('should display a list of courses', () => {
19+
1620
cy.contains("All Courses");
1721

1822
cy.wait('@courses');
@@ -21,4 +25,40 @@ describe('Home Page', () => {
2125

2226
});
2327

24-
});
28+
it('should display the advanced courses', () => {
29+
30+
cy.get('.mat-tab-label').should("have.length", 2);
31+
32+
cy.get('.mat-tab-label').last().click();
33+
34+
cy.get('.mat-tab-body-active .mat-card-title').its('length').should('be.gt', 1);
35+
36+
cy.get('.mat-tab-body-active .mat-card-title').first()
37+
.should('contain', "Angular Security Course");
38+
39+
});
40+
41+
42+
});
43+
44+
45+
46+
47+
48+
49+
50+
51+
52+
53+
54+
55+
56+
57+
58+
59+
60+
61+
62+
63+
64+

0 commit comments

Comments
 (0)