Skip to content

Commit

Permalink
fix: tests descriptions fixed (#587)
Browse files Browse the repository at this point in the history
* fix: tests descriptions fixed

* fix: fixing wording
  • Loading branch information
ArthurEncr authored Nov 9, 2023
1 parent edcf3a6 commit e85d91f
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 17 deletions.
19 changes: 9 additions & 10 deletions frontend/cypress/e2e/smoke-test/dashboard-page.cy.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { NavigationLabels } from '../../utils/labels';
import prefix from '../../../src/styles/classPrefix';
import { HALF_SECOND, ONE_SECOND } from '../../constants';

describe('Dashboard page test', () => {
let dashboardPageData: {
Expand All @@ -19,7 +18,7 @@ describe('Dashboard page test', () => {
cy.url().should('contains', '/dashboard');
});

it('dashboard page is displayed and loads correctly', () => {
it('should load and display dashboard page correctly', () => {
cy.isPageTitle(NavigationLabels.Dashboard);
cy.get('.title-section')
.find('.subtitle-section')
Expand All @@ -32,7 +31,7 @@ describe('Dashboard page test', () => {
.should('have.text', dashboardPageData.secondSectionSubtitle);
});

it('seedlots favourite activity is working properly', () => {
it('should be able to favourite the seedlots page', () => {
// Navigate to Seedlot page
cy.navigateTo(NavigationLabels.Seedlots);
// Favourite Seedlot page
Expand All @@ -50,7 +49,7 @@ describe('Dashboard page test', () => {
cy.isPageTitle(NavigationLabels.Seedlots);
});

it('a class seedlot favourite activity is working properly', () => {
it('should be able to favourite the a class seedlot page', () => {
// Navigate to Seedlot page
cy.navigateTo(NavigationLabels.Seedlots);

Expand All @@ -76,7 +75,7 @@ describe('Dashboard page test', () => {
cy.isPageTitle('Create A class seedlot');
});

it('my Seedlots favourite activity is working properly', () => {
it('should be able to favourite my seedlot page', () => {
// Navigate to My seedlot page
cy.navigateTo(NavigationLabels.Seedlots);
cy.get('.seedlot-activities-cards')
Expand All @@ -103,7 +102,7 @@ describe('Dashboard page test', () => {
cy.isPageTitle('My Seedlots');
});

it('highlight favourite activity is working', () => {
it('should be able to highlight favourite cards at dashboard', () => {
// Highlight Seedlots Card
cy.get('.favourite-activities-cards')
.find('.fav-card-main:first')
Expand Down Expand Up @@ -133,7 +132,7 @@ describe('Dashboard page test', () => {
.should('contain.text', 'Create A class seedlot');
});

it('check if delete my seedlots favourite card is working', () => {
it('should delete my seedlots card from favourite activities', () => {
// Delete My Seedlots card
cy.get('.favourite-activities-cards')
.find('.fav-card-main:first')
Expand All @@ -146,7 +145,7 @@ describe('Dashboard page test', () => {
.should('have.length', 1);
});

it('check if delete create a class seedlot favourite card is working', () => {
it('should delete a class seedlot card from favourite activities', () => {
// Delete Create A Class Seedlot card
cy.get('.fav-card-main-highlighted')
.find('.fav-card-overflow')
Expand All @@ -158,7 +157,7 @@ describe('Dashboard page test', () => {
.should('have.length', 0);
});

it('check if delete seedlots favourite card is working', () => {
it('should delete seedlots card from favourite activities', () => {
// Delete Seedlots card
cy.get('.favourite-activities-cards')
.find('.fav-card-main:first')
Expand All @@ -171,7 +170,7 @@ describe('Dashboard page test', () => {
.should('have.length', 0);
});

it('check if the empty section is correctly appearing', () => {
it('should display empty section', () => {
cy.get('.empty-section-title')
.should('contain.text', "You don't have any favourites to show yet!");
});
Expand Down
12 changes: 6 additions & 6 deletions frontend/cypress/e2e/smoke-test/login-page.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,14 @@ describe('Login page test', () => {
});
});

it('login page is displayed and loads correctly', () => {
it('should load and display login page correctly', () => {
cy.visit('/');
cy.getByDataTest('landing-title').should('have.text', loginPageData.title);
cy.getByDataTest('landing-subtitle').should('have.text', loginPageData.subtitle);
cy.getByDataTest('landing-desc').should('have.text', loginPageData.description);
});

it('navigate to the user form page IDIR', () => {
it('should navigate to the user form page IDIR', () => {
cy.visit('/');
cy.getByDataTest('landing-button__idir').click();
cy.url().then((url) => {
Expand All @@ -35,7 +35,7 @@ describe('Login page test', () => {
});
});

it('navigate to the user form page BCeID', () => {
it('should navigate to the user form page BCeID', () => {
cy.visit('/');
cy.getByDataTest('landing-button__bceid').click();
cy.url().then((url) => {
Expand All @@ -49,12 +49,12 @@ describe('Login page test', () => {
});
});

it('try to access system using a link without user connected', () => {
it('should try to access system using a link without user connected', () => {
cy.visit('/dashboard');
cy.getByDataTest('landing-title').should('have.text', loginPageData.title);
});

it('log in with BCeID and validate user role', () => {
it('can log in with BCeID and validate user role', () => {
cy.login();
cy.visit('/dashboard');
cy.url().should('contains', '/dashboard');
Expand All @@ -63,7 +63,7 @@ describe('Login page test', () => {
cy.get('.user-data').find('p').contains('IDIR: undefined');
});

it('log in with BCeID and validate user information', () => {
it('can log in with BCeID and validate user information', () => {
cy.login();
cy.visit('/dashboard');
cy.url().should('contains', '/dashboard');
Expand Down
2 changes: 1 addition & 1 deletion frontend/cypress/e2e/smoke-test/seedlot-main-page.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ describe('Seedlot Main page test', () => {
cy.url().should('contains', '/seedlots');
});

it('seedlot main page is displayed and loads correctly', () => {
it('should load and display seedlot main page correctly', () => {
cy.isPageTitle(NavigationLabels.Seedlots);
cy.get('.title-section')
.find('.subtitle-section')
Expand Down

0 comments on commit e85d91f

Please sign in to comment.