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

Enabled progress and result view KANBAN-509 #284

Merged
merged 26 commits into from
Sep 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
e763365
Moved submit form under /submit path
mluypaert Sep 5, 2024
21bf867
Minor cleanup
mluypaert Sep 9, 2024
7cc3a9f
Moved primereact provider and style elements to root layout (for shar…
mluypaert Sep 9, 2024
88e4d86
Added job-progress tracking page
mluypaert Sep 9, 2024
e6dbf07
Updated API url to work on all environments
mluypaert Sep 10, 2024
3339ca6
Stop polling and update progressBar view on job completion
mluypaert Sep 10, 2024
08e8ce8
Added status retrieval timeout
mluypaert Sep 10, 2024
2b76db5
Fixed interval clearing from callback fn
mluypaert Sep 10, 2024
57a2af9
Enabled status check on page load
mluypaert Sep 10, 2024
58a9fac
Updated lastChecked message to include update interval when sheduled
mluypaert Sep 10, 2024
58d44a5
Added result page and redirect to it from progress on completion
mluypaert Sep 10, 2024
54cc51e
Moved undefined uuid redirects to page instead of component code
mluypaert Sep 10, 2024
ccf031a
Correct error handling on not receiving uuid on submit form completion
mluypaert Sep 10, 2024
8117288
Updated E2E testing to include progress and result reporting
mluypaert Sep 11, 2024
3c4e909
Updated progres report message on success or failure
mluypaert Sep 11, 2024
f6721e9
Delay redirect to result to enable reading completion message.
mluypaert Sep 11, 2024
4246547
ESLint exhaustive deps fixes
mluypaert Sep 12, 2024
a032bfa
Made jobState type more specific
mluypaert Sep 12, 2024
cdd53e5
Cleanup
mluypaert Sep 12, 2024
272d51a
Update progress page to fetch searchParams server-side.
mluypaert Sep 12, 2024
15865e6
Mock userRouter to fix unit tests (as not relevant to current test)
mluypaert Sep 12, 2024
d960163
Let cypress wait on API first + fix webUI URL to match submit form path
mluypaert Sep 12, 2024
9fe9069
Report container logs on GHA E2E test failure
mluypaert Sep 12, 2024
e6ee754
Always cleanup GHA E2E containers (even on failure)
mluypaert Sep 12, 2024
a145230
Added AWS authentication for GHA E2E testing
mluypaert Sep 12, 2024
75d4d75
Add forgotten permissions for OIDC autehntication to AWS
mluypaert Sep 12, 2024
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
22 changes: 21 additions & 1 deletion .github/workflows/PR-validation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -958,8 +958,18 @@ jobs:
- webui-update-dependency-lock-files
- webui-container-image-build
- api-container-image-build
permissions:
id-token: write # Required for OIDC authentication to AWS (to perform AWS actions / access AGR AWS resources)
runs-on: ubuntu-22.04
steps:
# Configure environment variables used for AWS interaction,
# required for API container interactions with pipeline resources
- name: AWS credentials configuration
uses: aws-actions/configure-aws-credentials@v4
with:
role-to-assume: ${{ secrets.GH_ACTIONS_AWS_ROLE }}
role-session-name: gh-actions-${{github.run_id}}.${{github.run_number}}.${{github.run_attempt}}-e2e-testing
aws-region: us-east-1
- name: Check out repository code
uses: actions/checkout@v4
- name: Download API image artifact
Expand Down Expand Up @@ -999,13 +1009,23 @@ jobs:
uses: cypress-io/github-action@v6
with:
working-directory: webui/
wait-on: 'http://localhost:3000, http://localhost:8080/api/health'
wait-on: 'http://localhost:8080/api/health, http://localhost:3000/submit'
env: 'API_BASE_URL=http://localhost:8080'
- name: Report API container logs on E2E test failure
if: failure()
run: |
docker logs agr.pavi.dev-local.api.server
- name: Report webUI container logs on E2E test failure
if: failure()
run: |
docker logs agr.pavi.dev-local.webui.server
- name: Cleanup webUI server (running container)
if: success() || failure()
working-directory: webui/
run: |
make stop-container-dev
- name: Cleanup API server (running container)
if: success() || failure()
working-directory: api/
run: |
make stop-container-dev
Expand Down
42 changes: 40 additions & 2 deletions webui/cypress/e2e/submit-workflow.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,11 +72,49 @@ describe('submit form behaviour', () => {
}
}

// Delete any records that had the delete flag set.
// Those records are deemed useful for submission form testing
// but require datasets too large for automated testing (too slow).
for(let i = 0, len = formInput.length; i < len; ++i){
if(formInput[i].delete){
cy.get('.p-inputgroup').eq(i).parents('tr').find('button#remove-record').click()
}
}

// Submit button should become active after completing all input
cy.get('@submitBtn').should('be.enabled')

// Submitting the analysis should report a UUID
// Submitting the analysis should route to the progress page
let jobUuid: string

cy.get('@submitBtn').click()
cy.contains('div#display-message', /^job .+ is now pending\.$/)
cy.location().should((loc: Location) => {
expect(loc.pathname).to.eq('/progress')

//queryparams should contain the job UUID
const uuidCaptureRegex = /^\?uuid=([A-Za-z0-9-]+)$/
expect(loc.search).to.match(uuidCaptureRegex)

jobUuid = uuidCaptureRegex.exec(loc.search)![1]
})

// Progress page should indicate job progress
cy.contains('p#progress-msg', /^Job .+ is running\.$/)

// Successful job completion should route to the results page (wait max 5 minutes)
cy.location({timeout: 300000}).should((loc: Location) => {
expect(loc.pathname).to.eq('/result')

//queryparams should contain the same UUID as progress page did
expect(loc.search).to.eq(`?uuid=${jobUuid}`)
})

// Result page should display the expected alignment results
cy.readFile('cypress/fixtures/test-submit-success-output.txt').then(function(txt){
expect(txt).to.be.a('string')

cy.get('textarea#alignment-result-text').should('have.text', txt)
});

})
})
14 changes: 8 additions & 6 deletions webui/cypress/fixtures/test-submit-success-input.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,21 @@
"transcripts": [
"ENST00000346798.8",
"ENST00000357903.7"
]
],
"delete": true
},
{
"gene": "RGD:2139",
"gene": "WB:WBGene00000149",
"transcripts": [
"NM_019288.2"
"C42D8.8a.1",
"C42D8.8b.1"
]
},
{
"gene": "WB:WBGene00000149",
"gene": "FB:FBgn0000108",
"transcripts": [
"C42D8.8a.1",
"C42D8.8b.1"
"Appl-RA",
"Appl-RB"
]
}
]
98 changes: 98 additions & 0 deletions webui/cypress/fixtures/test-submit-success-output.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
CLUSTAL O(1.2.4) multiple sequence alignment


Appl_Appl-RA -MCAALRRNLLLRSL-WVVLAIGTAQVQAASPRWEPQIAVLCEAGQIYQPQYLSEEGRWV 58
Appl_Appl-RB -MCAALRRNLLLRSL-WVVLAIGTAQVQAASPRWEPQIAVLCEAGQIYQPQYLSEEGRWV 58
apl-1_C42D8.8a.1 MTVGKLMIGLLIPILVATVYAEGSPAGSKRHEKFIPMVAFSC----GYRNQYMTEEGSWK 56
apl-1_C42D8.8b.1 MTVGKLMIGLLIPILVATVYAEGSPAGSKRHEKFIPMVAFSC----GYRNQYMTEEGSWK 56
. * .**: * .* * *: . :: * :*. * *: **::*** *

Appl_Appl-RA TDLSKKTTGPTCLRDKMDLLDYCKKAYPNRDITNIVESSHYQKIGGWCRQGALNAAKCKG 118
Appl_Appl-RB TDLSKKTTGPTCLRDKMDLLDYCKKAYPNRDITNIVESSHYQKIGGWCRQGALNAAKCKG 118
apl-1_C42D8.8a.1 TDDER---YATCFSGKLDILKYCRKAYPSMNITNIVEYSHEVSISDWCREEGS---PCKW 110
apl-1_C42D8.8b.1 TDDER---YATCFSGKLDILKYCRKAYPSMNITNIVEYSHEVSISDWCREEGS---PCKW 110
** .: **: .*:*:*.**:****. :****** ** .*..***: . **

Appl_Appl-RA SHRWIKPFRCL-GPFQSDALLVPEGCLFDHIHNASRCWPFVRWNQTGAAACQE------R 171
Appl_Appl-RB SHRWIKPFRCL-GPFQSDALLVPEGCLFDHIHNASRCWPFVRWNQTGAAACQE------R 171
apl-1_C42D8.8a.1 TH-SVRPYHCIDGEFHSEALQVPHDCQFSHVNSRDQCNDYQHWKDEAGKQCKTKKSKGNK 169
apl-1_C42D8.8b.1 TH-SVRPYHCIDGEFHSEALQVPHDCQFSHVNSRDQCNDYQHWKDEAGKQCKTKKSKGNK 169
:* ::*::*: * *:*:** **..* *.*::. .:* : :*:: .. *: :

Appl_Appl-RA GMQMRSFAMLLPCGISVFSGVEFVCCPKHFKTDEIHVKKTDLPVMPAAQINSANDELVMN 231
Appl_Appl-RB GMQMRSFAMLLPCGISVFSGVEFVCCPKHFKTDEIHVKKTDLPVMPAAQINSANDELVMN 231
apl-1_C42D8.8a.1 DMIVRSFAVLEPCALDMFTGVEFVCCPNDQTNKTD-VQKT------------------KE 210
apl-1_C42D8.8b.1 DMIVRSFAVLEPCALDMFTGVEFVCCPNDQTNKTD-VQKT------------------KE 210
.* :****:* **.:.:*:********:. ... *:** :

Appl_Appl-RA DEDDSNDSNYSKDANEDDLDDEDDLMGDDEEDDMVADEAATAGGSPNTGSSGDSNSGSLD 291
Appl_Appl-RB DEDDSNDSNYSKDANEDDLDDEDDLMGDDEEDDMVADEAATAGGSPNTGSSGDSNSGSLD 291
apl-1_C42D8.8a.1 --------------DEDDDDDEDDAYED-------------------------------- 224
apl-1_C42D8.8b.1 --------------DEDDDDDEDDAYED-------------------------------- 224
:*** ***** *

Appl_Appl-RA DINAEYDSGEEGDNYEEDGAGSESEAEVEASWDQSGGAKVVSLKSDSSSPSSAPVAPAPE 351
Appl_Appl-RB DINAEYDSGEEGDNYEEDGAGSESEAEVEASWDQSGGAKVVSLKSDSSSPSSAPVAPAPE 351
apl-1_C42D8.8a.1 -------------DYSEESDE--------------------------------------- 232
apl-1_C42D8.8b.1 -------------DYSEESDE--------------------------------------- 232
:*.*:.

Appl_Appl-RA KAPVKSESVTSTPQLSASAAAFVAANSGNSGTGAGAPPSTAQPTSDPYFTHFDPHYEHQS 411
Appl_Appl-RB KAPVKSESVTSTPQLSASAAAFVAANSGNSGTGAGAPPSTAQPTSDPYFTHFDPHYEHQS 411
apl-1_C42D8.8a.1 ------------------------------------KDEEEPSSQDPYFKIANWTNEHDD 256
apl-1_C42D8.8b.1 ------------------------------------KDEEEPSSQDPYFKIANWTNEHDD 256
. :.****. : **:.

Appl_Appl-RA YKVSQKRLEESHREKVTRVMKDWSDLEEKYQDMRLADPKAAQSFKQRMTARFQTSVQALE 471
Appl_Appl-RB YKVSQKRLEESHREKVTRVMKDWSDLEEKYQDMRLADPKAAQSFKQRMTARFQTSVQALE 471
apl-1_C42D8.8a.1 FKKAEMRMDEKHRKKVDKVMKEWGDLETRYNEQKAKDPKGAEKFKSQMNARFQKTVSSLE 316
apl-1_C42D8.8b.1 FKKAEMRMDEKHRKKVDKVMKEWGDLETRYNEQKAKDPKGAEKFKSQMNARFQKTVSSLE 316
:* :: *::*.**:** :***:*.*** :*:: : ***.*:.**.:*.****.:*.:**

Appl_Appl-RA EEGNAEKHQLAAMHQQRVLAHINQRKREAMTCYTQALTE--QPPNAHHVEKCLQKLLRAL 529
Appl_Appl-RB EEGNAEKHQLAAMHQQRVLAHINQRKREAMTCYTQALTE--QPPNAHHVEKCLQKLLRAL 529
apl-1_C42D8.8a.1 EEHKRMRKEIEAVHEERVQAMLNEKKRDATHDYRQALATHVNKPNKHSVLQSLKAYIRAE 376
apl-1_C42D8.8b.1 EEHKRMRKEIEAVHEERVQAMLNEKKRDATHDYRQALATHVNKPNKHSVLQSLKAYIRAE 376
** : :::: *:*::** * :*::**:* * ***: : ** * * :.*: :**

Appl_Appl-RA HKDRAHALAHYRHLLNSGGPGGLEAAASERPRTLERLIDIDRAVNQSMTMLKRYPELSAK 589
Appl_Appl-RB HKDRAHALAHYRHLLNSGGPGGLEAAASERPRTLERLIDIDRAVNQSMTMLKRYPELSAK 589
apl-1_C42D8.8a.1 EKDRMHTLNRYRHLLKADSK----EAAAYKPTVIHRLRYIDLRINGTLAMLRDFPDLEKY 432
apl-1_C42D8.8b.1 EKDRMHTLNRYRHLLKADSK----EAAAYKPTVIHRLRYIDLRINGTLAMLRDFPDLEKY 432
.*** *:* :*****::.. **: :* .:.** ** :* :::**: :*:*.

Appl_Appl-RA IAQLMNDYILALRSKDDIPGSSLGMSEEAEAGILDKYRVEIERKVAEKERLRLAEKQRKE 649
Appl_Appl-RB IAQLMNDYILALRSKDDIPGSSLGMSEEAEAGILDKYRVEIERKVAEKERLRLAEKQRKE 649
apl-1_C42D8.8a.1 VRPIAVTYWKDYRDEVS-PDISVE--DSELTPIIHDDEFSKNAKLDVKAPTTTA-KPVKE 488
apl-1_C42D8.8b.1 VRPIAVTYWKDYRDEVS-PDISVE--DSELTPIIHDDEFSKNAKLDVKAPTTTA-KPVKE 488
: : * *.: . *. *: :. : *:.. ... : *: * * * **

Appl_Appl-RA QRAAEREKLREEKLRLEAKKVDDMLKSQVAEQQSQPTQSSTQSQAQQQQQEKSLPGKELG 709
Appl_Appl-RB QRAAEREKLREEKLRLEAKKVDDMLKSQVAEQQSQPTQSSTQSQAQQQQQEKSLPGKELG 709
apl-1_C42D8.8a.1 ---TDNAKVLPTEASDSEEEADEYYEDEDDEQVKK-----------TPDMKKKVKVVDIK 534
apl-1_C42D8.8b.1 ---TDNAKVLPTEASDSEEEADEYYEDEDDEQVKK-----------TPDMKKKVKVVDIK 534
::. *: : . ::.*: :.: ** .: : :*.: ::

Appl_Appl-RA PDAALVTAA----NPNLETTKSEKDLSDTEYGEATVSSTKVQTVLPTVDDDAVQRAVEDV 765
Appl_Appl-RB PDAALVTAA----NPNLETTKSEKDLSDTEYGEATVS-TKVQTVLPTVDDDAVQRAVEDV 764
apl-1_C42D8.8a.1 PKEIKVTIEEEKKAPKLVETSVQTDDEDD--DEDSSSSTSS------ESDEDEDKNIKEL 586
apl-1_C42D8.8b.1 PKEV--TIEEEKKAPKLVETSVQTDDEDD--DEDSSSSTSS------ESDEDEDKNIKEL 584
*. * *:* *. :.* .* .* : * *. .*: :: ::::

Appl_Appl-RA AAAVAHQEAEPQVQHFMTHDLGHRESSFSLRREFAQHAHAAKEGRNVYFTLSFAGIALMA 825
Appl_Appl-RB AAAVAHQEAEPQVQHFMTHDLGHRESSFSLRREFAQHAHAAKEGRNVYFTLSFAGIALMA 824
apl-1_C42D8.8a.1 RV-----DIEPII---------DEPASFYRHDKLIQSPEVERSASSVFQPYVLASAMFIT 632
apl-1_C42D8.8b.1 RV-----DIEPII---------DEPASFYRHDKLIQSPEVERSASSVFQPYVLASAMFIT 630
. : ** : .. :** : :: * .. :.. .*: :*. :::

Appl_Appl-RA AVFVGVAVAKWRTSRSPHAQGFIEVDQ----NVTTHHPIVREEKIVPNMQINGYENPTYK 881
Appl_Appl-RB AVFVGVAVAKWRTSRSPHAQGFIEVDQVGCQNVTTHHPIVREEKIVPNMQINGYENPTYK 884
apl-1_C42D8.8a.1 AI-CIIAFAITNARRRRAMRGFIEVDVY-----------TPEERHVAGMQVNGYENPTYS 680
apl-1_C42D8.8b.1 AI-CIIAFAITNARRRRAMRGFIEVDVY-----------TPEERHVAGMQVNGYENPTYS 678
*: :*.* .: * :****** . **: * .**:********.

Appl_Appl-RA YFEVKE 887
Appl_Appl-RB YFEVKE 890
apl-1_C42D8.8a.1 FFDSKA 686
apl-1_C42D8.8b.1 FFDSKA 684
:*: *
32 changes: 27 additions & 5 deletions webui/package-lock.json

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

8 changes: 5 additions & 3 deletions webui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@
"primeicons": "^7.0.0",
"primereact": "~10.8.2",
"react": "^18",
"react-dom": "^18"
"react-dom": "^18",
"uuid": "^10.0.0"
},
"devDependencies": {
"@jest/globals": "^29.7.0",
Expand All @@ -31,14 +32,15 @@
"@tsconfig/next": "~2.0.3",
"@types/jest": "^29.5.12",
"@types/node": "^20",
"@types/react-dom": "^18",
"@types/react": "^18",
"@types/react-dom": "^18",
"@types/uuid": "^10.0.0",
"cypress": "^13.14.1",
"eslint-config-next": "14.2.7",
"eslint-plugin-cypress": "^3.5.0",
"eslint-plugin-jest": "^28.6.0",
"jest-environment-jsdom": "^29.7.0",
"jest": "^29.7.0",
"jest-environment-jsdom": "^29.7.0",
"postcss": "^8",
"ts-node": "^10.9.2",
"typescript": "~5.5"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -311,5 +311,6 @@ export const AlignmentEntry: FunctionComponent<AlignmentEntryProps> = (props: Al
} ))} />
<label htmlFor="transcripts">Transcripts</label>
</FloatLabel><br />
</div>)
</div>
)
}
Loading