blob: 4e563ee8ac8f8384e235704f126e43ef38413b6a [file] [log] [blame]
ys969316a9fce2020-01-19 13:50:02 +02001import {initCommonFixtures} from "../common/init";
2
3describe('Home (Dashboard) Screen', () => {
4 beforeEach(() => {
5 cy.server();
6 initCommonFixtures(cy);
7
8 // Followed Resources for the dashboard screen
9 cy.fixture('home/followed').as('followed');
10 cy.route('GET', '**/followed', '@followed');
11 });
12
13 it('Test that only Certify and Distributed appear in followed projects filter', function () {
14 const homePageUrl = '#!/dashboard';
15 cy.visit(homePageUrl);
16
17 // Test that tiles are sorted
18 cy.get('ui-tile .multiline-ellipsis-content').
19 first().should('include.text', 'MyVSP1').
20 last().should('include.text', 'MyVSP1');
21
22 // Test that there are 5 components tiles
23 cy.get('ui-tile .multiline-ellipsis-content').should('have.length', 5);
24
25
26 cy.get('[data-tests-id="filter-CERTIFIED"]').should('be.visible');
27 cy.get('[data-tests-id="filter-DISTRIBUTED"]').should('be.visible'); // Ready for Testing
28 cy.get('[data-tests-id="count-DISTRIBUTED"]').should('have.text', '1');
29 cy.get('[data-tests-id="filter-CERTIFICATION_IN_PROGRESS"]').should('not.be.visible'); // In Testing
30 cy.get('[data-tests-id="filter-READY_FOR_CERTIFICATION"]').should('not.be.visible'); // Ready for Testing
31 });
32});