We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 26ca12c commit 2717d7eCopy full SHA for 2717d7e
cypress/integration/home.test.js
@@ -0,0 +1,22 @@
1
+describe('Home Page', () => {
2
+
3
+ beforeEach(() => {
4
+ cy.fixture('courses.json').as("coursesJSON");
5
+ cy.server();
6
+ cy.route('/api/courses', '@coursesJSON').as('courses')
7
+ cy.visit('/');
8
+ });
9
10
+ it('should display a list of courses', () => {
11
+ cy.contains('All Courses');
12
+ cy.wait('@courses')
13
+ cy.get("mat-card").should("have.length", 9)
14
15
16
+ it('should display the advanced courses', () => {
17
+ cy.get('.mat-tab-label').should('have.length', 2);
18
+ cy.get('.mat-tab-label').last().click();
19
+ cy.get('.mat-tab-body-active .mat-card-title').its('length').should('be.gt', 1)
20
+ cy.get('.mat-tab-body-active .mat-card-title').first().should('contain', "Angular Security Course")
21
22
+});
0 commit comments