Skip to content

Commit

Permalink
feat: CQDG-659 Implement Landing Page V2 (#262)
Browse files Browse the repository at this point in the history
* feat: CQDG-659 implement landing page V2
  • Loading branch information
aperron-ferlab authored Apr 4, 2024
1 parent 38c8db5 commit 7bbaaed
Show file tree
Hide file tree
Showing 59 changed files with 1,816 additions and 649 deletions.
121 changes: 121 additions & 0 deletions cypress/e2e/Consultation/Landing.cy.ts

Large diffs are not rendered by default.

27 changes: 0 additions & 27 deletions cypress/e2e/Consultation/Login.cy.ts

This file was deleted.

4 changes: 2 additions & 2 deletions cypress/e2e/Consultation/PageStudy.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -105,10 +105,10 @@ describe('Page d\'une étude - Vérifier les informations affichées', () => {
cy.get('[id="dataset"]').eq(0).find('[id="dataset"]').eq(0).find('[class="ant-descriptions-item-label"]').eq(2).contains('Strategy').should('exist');
cy.get('[id="dataset"]').eq(0).find('[id="dataset"]').eq(0).find('[class="ant-descriptions-item-content"]').eq(2).contains('WGS').should('exist');
cy.get('[id="dataset"]').eq(0).find('[id="dataset"]').eq(0).find('[class="ant-descriptions-item-content"]').eq(2).find('[class*="StudyEntity_tag_"]').should('exist');
cy.get('[id="dataset"]').eq(0).find('[id="dataset"]').eq(0).find('[class*="EntityDataset_rowCountCard"]').eq(0).find('svg[data-icon="user"]').should('exist');
cy.get('[id="dataset"]').eq(0).find('[id="dataset"]').eq(0).find('[class*="EntityDataset_rowCountCard"]').eq(0).find('g[id="family"]').should('exist');
cy.get('[id="dataset"]').eq(0).find('[id="dataset"]').eq(0).find('[class*="EntityDataset_rowCountCard"]').eq(0).contains(/^3$/).should('exist');
cy.get('[id="dataset"]').eq(0).find('[id="dataset"]').eq(0).find('[class*="EntityDataset_rowCountCard"]').eq(0).contains('Participants').should('exist');
cy.get('[id="dataset"]').eq(0).find('[id="dataset"]').eq(0).find('[class*="EntityDataset_rowCountCard"]').eq(1).find('svg[data-icon="file-text"]').should('exist');
cy.get('[id="dataset"]').eq(0).find('[id="dataset"]').eq(0).find('[class*="EntityDataset_rowCountCard"]').eq(1).find('g[id="file"]').should('exist');
cy.get('[id="dataset"]').eq(0).find('[id="dataset"]').eq(0).find('[class*="EntityDataset_rowCountCard"]').eq(1).contains(/^12$/).should('exist');
cy.get('[id="dataset"]').eq(0).find('[id="dataset"]').eq(0).find('[class*="EntityDataset_rowCountCard"]').eq(1).contains('Files').should('exist');
});
Expand Down
6 changes: 3 additions & 3 deletions cypress/e2e/Facettes/PageDataExploration.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ describe('Page Data Exploration (Participants) - Filtrer avec les facettes', ()
cy.get('[data-cy="Tag_PT0000010"]').should('exist');
cy.get('[class*="QueryBar_selected"]').find('[class*="QueryPill_field"]').contains('Participant ID').should('exist');
cy.get('[class*="QueryBar_selected"]').find('[class*="QueryValues_value"]').contains('PT0000010').should('exist');
cy.validateTableResultsCount(/^1 Results$/);
cy.validateTableResultsCount(/^1 Result$/);

cy.get('[data-icon="close-circle"]').click({force: true});
cy.get('[data-cy="Tag_PT0000010"]').should('not.exist');
Expand Down Expand Up @@ -133,7 +133,7 @@ describe('Page Data Exploration (Biospecimens) - Filtrer avec les facettes', ()
cy.get('[data-cy="Tag_SR0000214"]').should('exist');
cy.get('[class*="QueryBar_selected"]').find('[class*="QueryPill_field"]').contains('Sample ID').should('exist');
cy.get('[class*="QueryBar_selected"]').find('[class*="QueryValues_value"]').contains('SR0000214').should('exist');
cy.validateTableResultsCount(/^1 Results$/);
cy.validateTableResultsCount(/^1 Result$/);

cy.get('[data-icon="close-circle"]').click({force: true});
cy.get('[data-cy="Tag_SR0000214"]').should('not.exist');
Expand Down Expand Up @@ -184,7 +184,7 @@ describe('Page Data Exploration (Data Files) - Filtrer avec les facettes', () =>
cy.get('[data-cy="Tag_FI0000572"]').should('exist');
cy.get('[class*="QueryBar_selected"]').find('[class*="QueryPill_field"]').contains('File ID').should('exist');
cy.get('[class*="QueryBar_selected"]').find('[class*="QueryValues_value"]').contains('FI0000572').should('exist');
cy.validateTableResultsCount(/^1 Results$/);
cy.validateTableResultsCount(/^1 Result$/);

cy.get('[data-icon="close-circle"]').click({force: true});
cy.get('[data-cy="Tag_FI0000572"]').should('not.exist');
Expand Down
6 changes: 3 additions & 3 deletions cypress/e2e/Facettes/PageStudies.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ describe('Page des études - Filtrer avec les facettes', () => {
cy.get('[data-cy="Search_Dropdown"]').find('div[class*="ant-select-item"]').eq(0).click({force: true});

cy.get('[data-cy="Tag_STUDY1"]').should('exist');
cy.validateTableResultsCount(/^1 Results$/);
cy.validateTableResultsCount(/^1 Result$/);

cy.get('[data-icon="close-circle"]').click({force: true});
cy.get('[data-cy="Tag_STUDY1"]').should('not.exist');
Expand All @@ -51,14 +51,14 @@ describe('Page des études - Filtrer avec les facettes', () => {
cy.get('[data-cy="Search_Dropdown"]').find('div[class*="ant-select-item"]').eq(0).click({force: true});

cy.get('[data-cy="Tag_T-DEE"]').should('exist');
cy.validateTableResultsCount(/^1 Results$/);
cy.validateTableResultsCount(/^1 Result$/);

cy.get('[data-icon="close-circle"]').click({force: true});
cy.get('[data-cy="Tag_T-DEE"]').should('not.exist');
});

it('Domain - Rare Diseases', () => {
cy.validateFacetFilter('Domain', 'Rare diseases', 'rare diseases', /^1 Results$/, false);
cy.validateFacetFilter('Domain', 'Rare diseases', 'rare diseases', /^1 Result$/, false);
cy.validateFacetRank(0, 'Domain');
});

Expand Down
2 changes: 1 addition & 1 deletion cypress/e2e/Facettes/PageVariants.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ describe('Page des variants (Variant) - Filtrer avec les facettes', () => {
cy.get('[data-cy="Tag_1-11846011-A-G"]').should('exist');
cy.get('[class*="QueryBar_selected"]').find('[class*="QueryPill_field"]').contains('Variant ID').should('exist');
cy.get('[class*="QueryBar_selected"]').find('[class*="QueryValues_value"]').contains('1-11846011-A-G').should('exist');
cy.validateTableResultsCount(/^1 Results$/);
cy.validateTableResultsCount(/^1 Result$/);

cy.get('[data-icon="close-circle"]').click({force: true});
cy.get('[data-cy="Tag_1-11846011-A-G"]').should('not.exist');
Expand Down
43 changes: 25 additions & 18 deletions cypress/e2e/Navigation/Logout.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,23 +11,30 @@ describe('Page Logout', () => {
it('Vérifier les informations affichées', () => {
cy.logout();

cy.contains('Available Data').should('exist');
cy.get('[data-cy="DataRelease_Study"]').contains(/\d{1}/).should('exist');
cy.get('[data-cy="DataRelease_Study"]').contains('Stud').should('exist');
cy.get('[data-cy="DataRelease_Participant"]').contains(/\d{1}/).should('exist');
cy.get('[data-cy="DataRelease_Participant"]').contains('Participants').should('exist');
cy.get('[data-cy="DataRelease_Biospecimen"]').contains(/\d{1}/).should('exist');
cy.get('[data-cy="DataRelease_Biospecimen"]').contains('Biospecimens').should('exist');
cy.get('[data-cy="DataRelease_File"]').contains(/\.\d{1,2}(T|G)B/).should('exist');
cy.get('[data-cy="DataRelease_File"]').contains('Data Files').should('exist');

cy.contains('Data Portal').should('exist');
cy.contains('The Quebec Genomic Data Center is a data harmonization and sharing platform for genomic datasets produced by Quebec\'s clinical and research studies.').should('exist');
cy.get('[data-cy="Login"]').contains('Login').should('exist');
cy.get('[data-cy="Signup"]').contains('Sign up').should('exist');

cy.get('img[src*="/static/media/genome_qc."]').should('exist');
cy.get('img[src*="/static/media/FRQS."]').should('exist');
cy.get('img[src*="/static/media/FCI."]').should('exist');
cy.get('[class*="TopBanner_title"]').contains(/(Portail de données|Data Portal)/).should('exist');
cy.get('[class*="Studies_container"] [class*="Summary"] [id="study"]').should('exist');
cy.get('[class*="Studies_container"] [class*="ant-carousel"] [class*="Carousel_dots"]').should('exist');
cy.get('[class*="Studies_container"] [class*="ant-carousel"] [class*="Carousel_title"] [src*="/static/media/cartagene."]').should('exist');
cy.get('[class*="Studies_container"] [class*="ant-carousel"] [class*="Carousel_title"]').contains('DEE').should('exist');
cy.get('[class*="Studies_container"] [class*="ant-carousel"] [class*="Carousel_title"]').contains('BACQ').should('exist');
cy.get('[class*="Studies_container"] [class*="ant-carousel"] [class*="Carousel_title"]').contains('PRAGMatIQ').should('exist');
cy.get('[class*="Studies_container"] [class*="ant-carousel"] [class*="Carousel_title"]').contains('NeuroDev').should('exist');
cy.get('[class*="Stats_wrapper"] [class*="ant-card-head"]').contains(/(Édition|Release)/).should('exist');
cy.get('[class*="Stats_wrapper"] [class*="ant-card-body"] [class*="TextIcon_layout"]').eq(0).find('[id="study"]').should('exist');
cy.get('[class*="Stats_wrapper"] [class*="ant-card-body"] [class*="TextIcon_layout"]').eq(1).find('[id="participant"]').should('exist');
cy.get('[class*="Stats_wrapper"] [class*="ant-card-body"] [class*="TextIcon_layout"]').eq(2).find('[id="biospecimen"]').should('exist');
cy.get('[class*="Stats_wrapper"] [class*="ant-card-body"] [class*="TextIcon_layout"]').eq(3).find('[id="file"]').should('exist');
cy.get('[class*="Stats_wrapper"] [class*="ant-card-body"] [class*="TextIcon_layout"]').eq(4).find('[id="gene"]').should('exist');
cy.get('[class*="Stats_wrapper"] [class*="ant-card-body"] [class*="TextIcon_layout"]').eq(5).find('[id="exomes"]').should('exist');
cy.get('[class*="Rare_container"] [src*="/static/media/RARE."]').should('exist');
cy.get('[class*="SecureData_container"] [src*="data:image/png"]').should('exist');
cy.get('[class*="Variants_container"] [id="gene"]').should('exist');
cy.get('[class*="BannerItem_container"]').eq(0).find('[id="information"]').should('exist');
cy.get('[class*="BannerItem_container"]').eq(1).find('[id="cloud-database"]').should('exist');
cy.get('[src*="/static/media/logos-genome_qc."]').should('exist');
cy.get('[src*="/static/media/logos-chusj-color."]').should('exist');
cy.get('[src*="/static/media/logos-FRQS-color."]').should('exist');
cy.get('[src*="/static/media/logos-FCI-color."]').should('exist');
cy.get('[src*="/static/media/logos-ferlab-color."]').should('exist');
});
});
14 changes: 7 additions & 7 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
"@apollo/client": "^3.7.11",
"@dnd-kit/core": "^4.0.3",
"@dnd-kit/sortable": "^5.1.0",
"@ferlab/ui": "^8.2.2",
"@ferlab/ui": "^9.9.7",
"@loadable/component": "^5.15.2",
"@nivo/bar": "^0.84.0",
"@nivo/pie": "^0.84.0",
Expand Down
6 changes: 1 addition & 5 deletions src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,8 @@ import ErrorPage from 'views/Error';
import Login from 'views/Login';

import { LANG } from 'common/constants';
import MainSideImage from 'components/assets/side-img-svg.svg';
import ErrorBoundary from 'components/ErrorBoundary';
import PageLayout from 'components/Layout';
import SideImageLayout from 'components/Layout/SideImage';
import Spinner from 'components/uiKit/Spinner';
import NotificationContextHolder from 'components/utils/NotificationContextHolder';
import { useLang } from 'store/global';
Expand Down Expand Up @@ -62,9 +60,7 @@ const App = () => {
<Router>
<Switch>
<Route exact path={STATIC_ROUTES.LOGIN}>
<SideImageLayout sideImgSrc={MainSideImage} theme="light">
<Login />
</SideImageLayout>
<Login />
</Route>
<Route
path={DYNAMIC_ROUTES.ERROR}
Expand Down
Loading

0 comments on commit 7bbaaed

Please sign in to comment.