generated from bcgov/quickstart-openshift
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #20 from bcgov/EMSEDT-194_Dry_Run_File_Error_Check
EMSEDT-194: Dry Run
- Loading branch information
Showing
8 changed files
with
149 additions
and
33 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,93 @@ | ||
/// <reference types="cypress" /> | ||
const testData = [ | ||
{ | ||
numFiles: 1, | ||
filepath: 'cypress/testUploadFiles/cypressTestTxt.txt', | ||
description: 'drag and drop one text file', | ||
filename: ['cypressTestTxt.txt'], | ||
}, | ||
{ | ||
numFiles: 1, | ||
filepath: 'cypress/testUploadFiles/cypressTestCSV.csv', | ||
description: 'drag and drop one csv file', | ||
filename: ['cypressTestCSV.csv'], | ||
}, | ||
{ | ||
numFiles: 1, | ||
filepath: 'cypress/testUploadFiles/cypressTestXLSX.xlsx', | ||
description: 'drag and drop one xlsx file', | ||
filename: ['cypressTestXLSX.xlsx'], | ||
}, | ||
{ | ||
numFiles: 3, | ||
filepath: [ | ||
'cypress/testUploadFiles/cypressTestTxt.txt', | ||
'cypress/testUploadFiles/cypressTestCSV.csv', | ||
'cypress/testUploadFiles/cypressTestXLSX.xlsx', | ||
], | ||
description: 'drag and drop one text file, csv and xlsx file', | ||
filename: [ | ||
'cypressTestTxt.txt', | ||
'cypressTestCSV.csv', | ||
'cypressTestXLSX.xlsx', | ||
], | ||
}, | ||
] | ||
|
||
describe('File Upload page functionality', () => { | ||
beforeEach(function () { | ||
cy.viewport('macbook-16') | ||
cy.kcLogout().kcLogin() | ||
}) | ||
|
||
it('should be on the submit page', () => { | ||
cy.get('.MuiTypography-h3').should( | ||
'have.text', | ||
'Electronic Data Transfer - Upload', | ||
) | ||
}) | ||
|
||
testData.forEach((data) => { | ||
it('should ' + data.description, () => { | ||
cy.get('#file-upload').selectFile(data.filepath, { | ||
action: 'drag-drop', | ||
}) | ||
|
||
if (data.numFiles == 1) { | ||
cy.get('#file-list-dropdown > label').should( | ||
'have.text', | ||
'1 files selected', | ||
) | ||
} else if (data.numFiles == 3) { | ||
cy.get('#file-list-dropdown > label').should( | ||
'have.text', | ||
'3 files selected', | ||
) | ||
} | ||
|
||
cy.get('#select-all-checkbox').should('be.checked') | ||
cy.get('#select-all-text').should('have.text', 'Select All') | ||
|
||
for (var i = 0; i < data.numFiles; i++) { | ||
cy.get('#selected-file-' + i) | ||
.children() | ||
.first() | ||
.should('have.text', data.filename[i]) | ||
cy.get('#delete-file-' + i).should('exist') | ||
cy.get('#selected-file-' + i + '-checkbox').should('be.checked') | ||
cy.get('#selected-file-' + i + '-text').should( | ||
'have.text', | ||
'Receive Email Conformation', | ||
) | ||
cy.get('#selected-file-' + i + '-validate').should( | ||
'have.text', | ||
'Validate', | ||
) | ||
cy.get('#selected-file-' + i + '-submit').should('have.text', 'Submit') | ||
|
||
cy.get('#all-files-validate').should('have.text', 'Validate All') | ||
cy.get('#all-files-submit').should('have.text', 'Submit All') | ||
} | ||
}) | ||
}) | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,5 +2,6 @@ | |
declare namespace Cypress { | ||
interface Chainable { | ||
kcLogin(): Chainable<Element>; | ||
kcLogout(): Chainable<any>; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
Observation ID,Location ID,Observed Property ID,Observed DateTime,Analyzed DateTime,Depth,Depth Unit,Data Classification,Result Value,Result Unit,Source of Rounded Value,Rounded Value,Rounding Specification,Result Status,Result Grade,Medium,Activity ID,Activity Name,Collection Method,Field: Device ID,Field: Device Type,Field: Comment,Lab: Specimen Name,Lab: Analysis Method,Lab: Detection Condition,Lab: Limit Type,Lab: MDL,Lab: MRL,Lab: Quality Flag,Lab: Received DateTime,Lab: Prepared DateTime,Lab: Sample Fraction,Lab: From Laboratory,Lab: Sample ID,Lab: Dilution Factor,Lab: Comment,QC: Type,QC: Source Sample ID,EA_DELETE - Depth Lower,EA_DELETE - Laboratory Name,EA_DELETE - Project,EA_DELETE - Sample Detail,EA_DELETE - Sampler,EA_Statistic,EA_TissueType | ||
,DemoImportLoc001,Alkalinity,2015-01-01 12:00,2015-01-02 12:00,5,m,LAB,13.4,mg/l,PROVIDED_BY_USER,5.12,,Preliminary,Ok,Water,,SA-20150101-01,GRAB,,,,Loc001_Bottle_01,2320;Alkalinity in Water by Titration;APHA,,LOWER,0.1,0.5,,2015-01-02 12:00,2015-01-02 12:00,DISSOLVED,,,,,,,,,,,,, | ||
,DemoImportLoc001,Alkalinity,2015-01-01 12:01,2015-01-02 12:01,10,m,LAB,11.4,mg/l,PROVIDED_BY_USER,6.12,,Preliminary,Ok,Other,,SA-20150101-02,,,,,Loc001_Bottle_01,2320;Alkalinity in Water by Titration;APHA,,LOWER,0.1,0.5,,2015-01-02 12:00,2015-01-02 12:00,,,,,,,,,,,,,, | ||
,DemoImportLoc001,Alkalinity,2015-01-01 12:00,2015-01-02 12:00,5,m,LAB,13.4,mg/l,PROVIDED_BY_USER,7.12,,Preliminary,Ok,Water,,SA-20150101-01_REP,GRAB,,,,Loc001_Bottle_01,2320;Alkalinity in Water by Titration;APHA,,LOWER,0.1,0.5,,2015-01-02 12:00,2015-01-02 12:00,DISSOLVED,,,,,Replicate,SA-20150101-01,,,,,,, | ||
,DemoImportLoc001,Alkalinity,2015-01-01 12:01,2015-01-02 12:01,10,m,LAB,11.4,mg/l,PROVIDED_BY_USER,8.12,,Preliminary,Ok,Other,,SA-20150101-02_REP,,,,,Loc001_Bottle_01,2320;Alkalinity in Water by Titration;APHA,,LOWER,0.1,0.5,,2015-01-02 12:00,2015-01-02 12:00,,,,,,Replicate,SA-20150101-02,,,,,,, | ||
,DemoImportLoc001,Alkalinity,2015-01-01 12:00,2015-01-02 12:00,5,m,LAB,,,PROVIDED_BY_USER,9.12,,Preliminary,Ok,Water,,SA-20150101-01_TB,GRAB,,,,Loc001_Bottle_01,2320;Alkalinity in Water by Titration;APHA,,,,,,,,,,,,,Blank,,,,,,,, | ||
,DemoImportLoc002,Alkalinity,2015-01-01 12:05,2015-01-02 12:05,12,m,LAB,46.3,mg/l,PROVIDED_BY_USER,10.12,,Preliminary,Ok,Biological,,,GRAB,,,,Loc001_Bottle_01,2320;Alkalinity in Water by Titration;APHA,,LOWER,0.1,0.5,,2015-01-02 12:05,2015-01-02 12:05,DISSOLVED,,,,,,,,,,,,, | ||
,DemoImportLoc002,Alkalinity,2015-01-01 12:30,2015-01-02 12:30,8,m,LAB,,mg/l,PROVIDED_BY_USER,11.12,,Preliminary,Ok,Soil,,,GRAB,,,,Loc001_Bottle_01,2320;Alkalinity in Water by Titration;APHA,Not detected,LOWER,0.1,0.5,"X,P",2015-01-02 12:30,2015-01-02 12:30,TOTAL,,,,,,,,,,,,, | ||
,DemoImportLoc002,Alkalinity,2015-01-01 12:45,2015-01-02 13:15,15,m,LAB,,mg/l,PROVIDED_BY_USER,12.2,,Preliminary,Ok,Soil,,,GRAB,,,,Loc001_Bottle_01,2320;Alkalinity in Water by Titration;APHA,Not detected,LOWER,0.1,0.5,"X,P",2015-01-02 12:30,2015-01-02 12:30,TOTAL,,,,,,,,,,,,, | ||
,DemoImportLoc003,Temperature,2015-06-01 09:00,,3,m,FIELD_RESULT,7,degC,PROVIDED_BY_USER,13.12,,Preliminary,Ok,Water,,,,M001-A,Multimeter Type M,muddy,,,,,,,,,,,,,,,,,,,,,,,,, | ||
,DemoImportLoc004,Temperature,2015-06-01 10:00,,2,m,FIELD_RESULT,8,degC,PROVIDED_BY_USER,14.12,,Preliminary,Ok,Water,,,,M001-A,Multimeter Type M,,,,,,,,,,,,,,,,,,,,,,,,,, | ||
,DemoImportLoc004,Temperature,2015-06-01 11:00,,2,m,FIELD_RESULT,9,degC,PROVIDED_BY_USER,15.12,,Preliminary,Ok,Water,,,,M001-A,Multimeter Type M,attacking squirrels!,,,,,,,,,,,,,,,,,,,,,,,,, | ||
,DemoImportLoc004,Taxon,2016-09-01 12:00,,,,FIELD_SURVEY,Salmonidae,,PROVIDED_BY_USER,16.12,,Preliminary,Ok,Water,,Activity_id_123,,,,,specimen0001,,,,,,,,,,,,,,,,,,,,,,,, | ||
,DemoImportLoc004,Length,2016-09-01 12:00,,,,FIELD_SURVEY,28,in,PROVIDED_BY_USER,17.12,,Preliminary,Ok,Water,,Activity_id_123,,,,,specimen0001,,,,,,,,,,,,,,,,,,,,,,,, | ||
,DemoImportLoc004,Color,2016-09-01 12:00,,,,FIELD_SURVEY,Silver,,PROVIDED_BY_USER,18.12,,Preliminary,Ok,Water,,Activity_id_123,,,,,specimen0001,,,,,,,,,,,,,,,,,,,,,,,, | ||
,DemoImportLoc004,Taxon,2016-09-01 12:00,,,,FIELD_SURVEY,Ephemeroptera,,PROVIDED_BY_USER,19.12,,Preliminary,Ok,Water,,Activity_id_124,,,,,specimen0002,,,,,,,,,,,,,,,,,,,,,,,, | ||
,DemoImportLoc004,Count,2016-09-01 12:00,,,,FIELD_SURVEY,65,#,PROVIDED_BY_USER,20.12,,Preliminary,Ok,Water,,Activity_id_124,,,,,specimen0002,,,,,,,,,,,,,,,,,,,,,,,, | ||
,DemoImportLoc004,Taxon,2016-09-01 12:00,,,,FIELD_SURVEY,Diptera,,PROVIDED_BY_USER,21.12,,Preliminary,Ok,Water,,Activity_id_124,,,,,specimen0003,,,,,,,,,,,,,,,,,,,,,,,, | ||
,DemoImportLoc004,Count,2016-09-01 12:00,,,,FIELD_SURVEY,99,#,ROUNDING_SPECIFICATION,22.12,SIG(4),Preliminary,Ok,Water,,Activity_id_124,,,,,specimen0003,,,,,,,,,,,,,,,,,,,,,,,, | ||
,DemoImportLoc004,EPT Index,2016-09-01 12:00,,,,ACTIVITY_RESULT,39.6,%,ROUNDING_SPECIFICATION,23.12,SIG(4),Reviewed,Ok,Water,,Activity_id_124,,,,(EPT Taxa / Total Taxa) * 100%,,,,,,,,,,,,,,,,,,,,,,,,, | ||
,DemoImportLoc002,Alkalinity,2015-01-01T12:01:00.000-07:00,,10,m,VERTICAL_PROFILE,19.4,mg/l,ROUNDING_SPECIFICATION,24.12,SIG(4),Preliminary,OK,Other,,profile_id_456,GRAB,PQR,AZXCV,top profile measurement,,,,,,,,,,,,,,,,,,,,,,,,, | ||
,DemoImportLoc002,Alkalinity,2015-01-01T12:02:00.000-07:00,,13,m,VERTICAL_PROFILE,12.4,mg/l,ROUNDING_SPECIFICATION,25.12,SIG(4),Preliminary,OK,Other,,profile_id_456,GRAB,ZXC,,,,,,,,,,,,,,,,,,,,,,,,,,, | ||
,DemoImportLoc002,Alkalinity,2015-01-01T12:03:00.000-07:00,,14,m,VERTICAL_PROFILE,13.4,mg/l,ROUNDING_SPECIFICATION,26.12,SIG(4),Preliminary,OK,Other,,profile_id_456,GRAB,VDS,,,,,,,,,,,,,,,,,,,,,,,,,,, | ||
,DemoImportLoc002,Alkalinity,2015-01-03T12:04:00.000-07:00,,16,m,VERTICAL_PROFILE,14.4,mg/l,ROUNDING_SPECIFICATION,27.12,SIG(4),Preliminary,OK,Other,,profile_id_789,GRAB,QFA,,top profile measurement,,,,,,,,,,,,,,,,,,,,,,,,, |
Empty file.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters