Skip to content

Commit ff65f8d

Browse files
committed
fixing integration tests
1 parent 26001c1 commit ff65f8d

File tree

2 files changed

+18
-12
lines changed

2 files changed

+18
-12
lines changed

cypress/e2e/hermes/hermes-upload.cy.js

Lines changed: 16 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -9,20 +9,25 @@ describe('Hermes Upload', {retries: 0}, () => {
99
cy.wait('@loginRequest');
1010
cy.visit('/hermes/new', { timeout: 10000 });
1111
cy.get('#dataSetName').type('Cypress dataset');
12-
cy.get('#genomeBuild').type('GRCh38').type('{enter}');
13-
cy.get('#cohort').type('My Hermes Cohort');
14-
cy.get('#acknowledgements').type('My Hermes Acknowledgements');
15-
cy.get("#cases").type("1000{enter}");
12+
// cy.get('#genomeBuild').type('GRCh38').type('{enter}');
13+
cy.get('[data-cy="cohort"]').type('UKBio').type('{enter}');
14+
cy.get('#contactPerson').type('Point of Contact');
15+
cy.get('#dataCollectionStart').type('2006/01/01');
16+
cy.get('[data-cy="sex"]').type('Male').type('{enter}');
17+
cy.get('#dataCollectionEnd').type('2006/01/31');
1618
cy.get('[data-cy="ancestry"]').type('European').type('{enter}');
1719
cy.get('[data-cy="case-ascertainment"]').eq(0).type('Electronic').type('{enter}');
18-
cy.get('[data-cy="case-type"]').type('Prevalent').type('{enter}');
1920
cy.get("#phenotype").type('T2D');
20-
cy.get("#participants").type('20');
21-
cy.get("#sexProportion").type('20');
22-
cy.get("#age").type('20');
23-
cy.get("#analysisSoftware").type('Big Analysis Software');
24-
cy.get("#statisticalModel").type('Complex Model');
25-
cy.get("#covariates").type('Here are some covariates');
21+
cy.get("#caseDefinition").type("My case definition");
22+
cy.get("#totalSampleSize").type("989");
23+
cy.get("#maleProportionCohort").type("1");
24+
25+
// cy.get("#participants").type('20');
26+
// cy.get("#sexProportion").type('20');
27+
// cy.get("#age").type('20');
28+
// cy.get("#analysisSoftware").type('Big Analysis Software');
29+
// cy.get("#statisticalModel").type('Complex Model');
30+
// cy.get("#covariates").type('Here are some covariates');
2631
cy.get('input[type="file"]').attachFile('sample-gwas.csv');
2732
cy.get('[data-cy="column-dropdown"]').eq(1).type('chromosome').type('{enter}');
2833
cy.get('[data-cy="column-dropdown"]').eq(2).type('position').type('{enter}');

pages/hermes/new.vue

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -429,7 +429,7 @@ async function uploadSubmit(){
429429
<div v-tooltip="'e.g. “UKBiobank”'">
430430
<Dropdown placeholder="Select Cohort" v-model="cohort" :options="cohortOptions" id="cohort" optionLabel="name"
431431
optionValue="value" :class="{ 'p-invalid': errors.cohort }"
432-
aria-describedby="cohort-help"
432+
aria-describedby="cohort-help" data-cy="cohort"
433433
434434
/>
435435
</div>
@@ -545,6 +545,7 @@ async function uploadSubmit(){
545545
optionLabel="name" optionValue="value"
546546
placeholder="Select Sex Stratification"
547547
aria-describedby="sex-help"
548+
data-cy="sex"
548549
:class="{'p-invalid': errors.sex}"
549550
/>
550551
<small id="sex-help" class="p-error">

0 commit comments

Comments
 (0)