Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: tests descriptions fixed #587

Merged
merged 5 commits into from
Nov 9, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading