Skip to content

Commit

Permalink
updated user journey test to include visualisation
Browse files Browse the repository at this point in the history
  • Loading branch information
Rodsy committed Sep 20, 2023
1 parent 9347448 commit e9b17b9
Show file tree
Hide file tree
Showing 2 changed files with 288 additions and 23 deletions.
69 changes: 46 additions & 23 deletions cypress/integration/user-journey.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,10 +73,11 @@ describe('User journey of login and upload abstracts, visualise then delete uplo
.invoke('text')
.should('equal', 'TeMMPo: Select exposure MeSH® terms')

// Lets tick some exposure terms in the checkbox tree then move on to mediators
// Lets add some exposure terms in the textarea, click add, then move on to mediators

cy.get('a')
.contains('Organisms', { matchCase: false })
cy.get('#term_names').type('Public Health Systems Research;Humans');

cy.contains('Add', { matchCase: false })
.click()

cy.contains('Save and move on to select mediators', { matchCase: false })
Expand All @@ -88,10 +89,11 @@ describe('User journey of login and upload abstracts, visualise then delete uplo
.invoke('text')
.should('equal', 'TeMMPo: Select mediator MeSH® terms')

// Lets tick mediator terms in the checkbox tree then move on to outcomes
// Lets add terms in the textarea, click add, then move on to outcomes

cy.get('#term_names').type('Genetic Markers; Penetrance');

cy.get('a')
.contains('Diseases', { matchCase: false })
cy.contains('Add', { matchCase: false })
.click()

cy.contains('Save and move on to select outcomes', { matchCase: false })
Expand All @@ -103,10 +105,11 @@ describe('User journey of login and upload abstracts, visualise then delete uplo
.invoke('text')
.should('equal', 'TeMMPo: Select outcome MeSH® terms')

// Lets tick an outcome term in the checkbox
// Lets add outcome term in the textarea, click add, move on to genes

cy.get('#term_names').type('Neoplasm Metastasis;Eryptosis');

cy.get('a')
.contains('Humanities', { matchCase: false })
cy.contains('Add', { matchCase: false })
.click()

cy.contains('Save and move on to select Genes and Filters', { matchCase: false })
Expand All @@ -118,15 +121,7 @@ describe('User journey of login and upload abstracts, visualise then delete uplo
.invoke('text')
.should('equal', 'TeMMPo: Select genes and filter')

// Lets click on the dropdown filter

cy.get('.selection')
.click()
cy.get('li')
.contains('Body Regions > Breast', { matchCase: false })
.click()

// Lets click on the search button...
// click the button to continue and get some results

cy.get('button.btn.btn-primary')
.contains('Search', { matchCase: false })
Expand All @@ -146,7 +141,7 @@ describe('User journey of login and upload abstracts, visualise then delete uplo
.eq(1)
.should('not.be.empty')

// now we are gonna wait a minute
// now we are gonna wait a minute...

cy.wait(60000)

Expand All @@ -157,15 +152,45 @@ describe('User journey of login and upload abstracts, visualise then delete uplo
// this is where we will do the visualiations...


// select sankey chart

cy.get('tbody')
.contains('View Sankey diagram')
.click()


// check sankey chart contains human....etc

cy.get('#sankey_multiple')
.should('include.text', 'Humans')
.and('include.text', 'Genetic Markers')
.and('include.text', 'Public Health Systems Research')


// now lets delete the file we uploaded
// go back to results tab

// goto results tab and check its empty
cy.get('#side-menu')
.contains('Results')
.click()

cy.get('.page-header')
.should('have.text', 'Results')

// select bubble chart

cy.get('tbody')
.contains('View bubble chart')
.click()

// should contain Genetic Markers on the page

cy.get('#bubble_chart')
.should('include.text', 'Genetic Markers')


// thats the end of visualiations test, now lets delete the file we uploaded...

// goto results tab...

cy.get('#side-menu')
.contains('Results')
Expand All @@ -179,8 +204,6 @@ describe('User journey of login and upload abstracts, visualise then delete uplo
cy.get('.controls')
.find('a.btn.btn-danger.btn-sm')
.contains('Delete', { matchCase: false })

// have to force because possible bug where delete button is sometimes hidden in the table?
.click({force:true})

// now check we go the the delete search page
Expand Down
242 changes: 242 additions & 0 deletions test-abstract-ovid-test-sample-5.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,242 @@
<1>
Unique Identifier
999991
Record Owner
From MEDLINE, a database of the U.S. National Library of Medicine.
Status
MEDLINE
Authors
Smith J, Chang Y
Authors Full Name
Smith, Jane. Chang, Yi.
Institution
College of Bioinformatics Science and Technology, Harbin Medical University, Harbin 150081, PR China.
Title
Subpathway-GM: identification of metabolic subpathways via joint power of interesting genes and metabolites and their topologies within pathways.
Source
Nucleic Acids Research. 41(9):e101, 2013 May.
Other ID
Source: NLM. PMC3643575
MeSH Subject Headings
Cells
Colorectal Neoplasms/ge [Genetics]
Colorectal Neoplasms/me [Metabolism]
Eryptosis
Fictional MeSH Term AA
Fictional MeSH Term B
Genetic Markers
Genetic Pleiotropy
Histamine/me [Metabolism]
Humans
Male
*Metabolic Networks and Pathways/ge [Genetics]
*Metabolomics
Neoplasm Metastasis
Prostatic Neoplasms/ge [Genetics]
Prostatic Neoplasms/me [Metabolism]
Prostatic Neoplasms/pa [Pathology]
Public Health Systems Research
Serogroup
*Transcriptome
Abstract
Example Gene B, A1BG is in this absctrast, A2M, A2MP1; NAT2 Lorem ipsum LBM180, ABCA3 dolor sit amet, consectetur adipiscing elit. Duis in turpis aliquet, cursus nisi id, mattis augue. Pellentesque vehicula at ligula vel porta. Fusce suscipit malesuada justo. Cras convallis odio nec dolor elementum facilisis. Donec vel lobortis felis, ut gravida risus. Vivamus interdum ex libero. Phasellus id pharetra tortor. Mauris euismod convallis augue, sit amet aliquet metus hendrerit ac. Duis mattis leo maximus nisi sagittis, a pulvinar turpis fringilla. Ut pellentesque ligula purus, ut iaculis metus finibus nec. Suspendisse diam felis, aliquam sed nisl at, luctus rhoncus magna. Nullam porttitor neque eget sem sagittis rhoncus. Praesent accumsan fermentum odio, ac pellentesque dui feugiat at. In metus nisl, scelerisque eget velit at, pulvinar placerat ex.
Registry Number/Name of Substance
51-45-6 (Histamine).
Publication Type
Journal Article. Research Support, Non-U.S. Gov't.
Date Created
20130506
Year of Publication
2013
Link to the Ovid Full Text or citation
http://ovidsp.ovid.com/ovidweb.cgi?T=JS&CSC=Y&NEWS=N&PAGE=fulltext&D=medl&AN=23482392
Link to the External Link Resolver
http://linkserver.bristol.ac.uk:9003/prod?sid=OVID:medline&id=pmid:23482392&id=doi:10.1093%2Fnar%2Fgkt161&issn=0305-1048&isbn=&volume=41&issue=9&spage=e101&pages=e101&date=2013&title=Nucleic+Acids+Research&atitle=Subpathway-GM%3A+identification+of+metabolic+subpathways+via+joint+power+of+interesting+genes+and+metabolites+and+their+topologies+within+pathways.&aulast=Li&pid=%3Cauthor%3ELi+C%3C%2Fauthor%3E%3CAN%3E23482392%3C%2FAN%3E%3CDT%3EJournal+Article%3C%2FDT%3E

<2>
Unique Identifier
999992
Record Owner
From MEDLINE, a database of the U.S. National Library of Medicine.
Status
MEDLINE
Authors
Smith J, Chang Y
Authors Full Name
Smith, Jane. Chang, Yi.
Institution
College of Bioinformatics Science and Technology, Harbin Medical University, Harbin 150081, PR China.
Title
Subpathway-GM: identification of metabolic subpathways via joint power of interesting genes and metabolites and their topologies within pathways.
Source
Nucleic Acids Research. 41(9):e101, 2013 May.
Other ID
Source: NLM. PMC3643575
MeSH Subject Headings
Colorectal Neoplasms/ge [Genetics]
Colorectal Neoplasms/me [Metabolism]
Genetic Pleiotropy
Histamine/me [Metabolism]
Humans
Male
*Metabolic Networks and Pathways/ge [Genetics]
*Metabolomics
Neoplasm Metastasis
Prostatic Neoplasms/ge [Genetics]
Prostatic Neoplasms/me [Metabolism]
Prostatic Neoplasms/pa [Pathology]
Pyroptosis
Serogroup
*Transcriptome
Abstract
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Duis in turpis aliquet, cursus nisi id, mattis augue. Pellentesque vehicula at ligula vel porta. Fusce suscipit malesuada justo. Cras convallis odio nec dolor elementum facilisis. Donec vel lobortis felis, ut gravida risus. Vivamus interdum ex libero. Phasellus id pharetra tortor. Mauris euismod convallis augue, sit amet aliquet metus hendrerit ac. Duis mattis leo maximus nisi sagittis, a pulvinar turpis fringilla. Ut pellentesque ligula purus, ut iaculis metus finibus nec. Suspendisse diam felis, aliquam sed nisl at, luctus rhoncus magna. Nullam porttitor neque eget sem sagittis rhoncus. Praesent accumsan fermentum odio, ac pellentesque dui feugiat at. In metus nisl, scelerisque eget velit at, pulvinar placerat exexex.
Registry Number/Name of Substance
51-45-6 (Histamine).
Publication Type
Journal Article. Research Support, Non-U.S. Gov't.
Date Created
20130506
Year of Publication
2013
Link to the Ovid Full Text or citation
http://ovidsp.ovid.com/ovidweb.cgi?T=JS&CSC=Y&NEWS=N&PAGE=fulltext&D=medl&AN=23482392
Link to the External Link Resolver
http://linkserver.bristol.ac.uk:9003/prod?sid=OVID:medline&id=pmid:23482392&id=doi:10.1093%2Fnar%2Fgkt161&issn=0305-1048&isbn=&volume=41&issue=9&spage=e101&pages=e101&date=2013&title=Nucleic+Acids+Research&atitle=Subpathway-GM%3A+identification+of+metabolic+subpathways+via+joint+power+of+interesting+genes+and+metabolites+and+their+topologies+within+pathways.&aulast=Li&pid=%3Cauthor%3ELi+C%3C%2Fauthor%3E%3CAN%3E23482392%3C%2FAN%3E%3CDT%3EJournal+Article%3C%2FDT%3E

<3>
Unique Identifier
999993
Record Owner
From MEDLINE, a database of the U.S. National Library of Medicine.
Status
MEDLINE
Authors
Smith J, Chang Y
Authors Full Name
Smith, Jane. Chang, Yi.
Institution
College of Bioinformatics Science and Technology, Harbin Medical University, Harbin 150081, PR China.
Title
Subpathway-GM: identification of metabolic subpathways via joint power of interesting genes and metabolites and their topologies within pathways.
Source
Nucleic Acids Research. 41(9):e101, 2013 May.
Other ID
Source: NLM. PMC3643575
MeSH Subject Headings
Colorectal Neoplasms/ge [Genetics]
Colorectal Neoplasms/me [Metabolism]
Genetic Markers
Histamine/me [Metabolism]
Humans
Male
*Metabolic Networks and Pathways/ge [Genetics]
*Metabolomics
Neoplasm Metastasis
Prostatic Neoplasms/ge [Genetics]
Prostatic Neoplasms/me [Metabolism]
Prostatic Neoplasms/pa [Pathology]
Serogroup
*Transcriptome
Abstract
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Duis in turpis aliquet, cursus nisi id, mattis augue. Pellentesque vehicula at ligula vel porta. Fusce suscipit malesuada justo. Cras convallis odio nec dolor elementum facilisis. Donec vel lobortis felis, ut gravida risus. Vivamus interdum ex libero. Phasellus id pharetra tortor. Mauris euismod convallis augue, sit amet aliquet metus hendrerit ac. Duis mattis leo maximus nisi sagittis, a pulvinar turpis fringilla. Ut pellentesque ligula purus, ut iaculis metus finibus nec. Suspendisse diam felis, aliquam sed nisl at, luctus rhoncus magna. Nullam porttitor neque eget sem sagittis rhoncus. Praesent accumsan fermentum odio, ac pellentesque dui feugiat at. In metus nisl, scelerisque eget velit at, pulvinar placerat ex.
Registry Number/Name of Substance
51-45-6 (Histamine).
Publication Type
Journal Article. Research Support, Non-U.S. Gov't.
Date Created
20130506
Year of Publication
2013
Link to the Ovid Full Text or citation
http://ovidsp.ovid.com/ovidweb.cgi?T=JS&CSC=Y&NEWS=N&PAGE=fulltext&D=medl&AN=23482392
Link to the External Link Resolver
http://linkserver.bristol.ac.uk:9003/prod?sid=OVID:medline&id=pmid:23482392&id=doi:10.1093%2Fnar%2Fgkt161&issn=0305-1048&isbn=&volume=41&issue=9&spage=e101&pages=e101&date=2013&title=Nucleic+Acids+Research&atitle=Subpathway-GM%3A+identification+of+metabolic+subpathways+via+joint+power+of+interesting+genes+and+metabolites+and+their+topologies+within+pathways.&aulast=Li&pid=%3Cauthor%3ELi+C%3C%2Fauthor%3E%3CAN%3E23482392%3C%2FAN%3E%3CDT%3EJournal+Article%3C%2FDT%3E

<4>
Unique Identifier
999994
Record Owner
From MEDLINE, a database of the U.S. National Library of Medicine.
Status
MEDLINE
Authors
Smith J, Chang Y
Authors Full Name
Smith, Jane. Chang, Yi.
Institution
College of Bioinformatics Science and Technology, Harbin Medical University, Harbin 150081, PR China.
Title
Subpathway-GM: identification of metabolic subpathways via joint power of interesting genes and metabolites and their topologies within pathways.
Source
Nucleic Acids Research. 41(9):e101, 2013 May.
Other ID
Source: NLM. PMC3643575
MeSH Subject Headings
Fictional MeSH Term A
Fictional MeSH Term B
Fictional MeSH Term C
Abstract
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Duis in turpis aliquet, cursus nisi id, mattis augue. Pellentesque vehicula at ligula vel porta. Fusce suscipit malesuada justo. Cras convallis odio nec dolor elementum facilisis. Donec vel lobortis felis, ut gravida risus. Vivamus interdum ex libero. Phasellus id pharetra tortor. Mauris euismod convallis augue, sit amet aliquet metus hendrerit ac. Duis mattis leo maximus nisi sagittis, a pulvinar turpis fringilla. Ut pellentesque ligula purus, ut iaculis metus finibus nec. Suspendisse diam felis, aliquam sed nisl at, luctus rhoncus magna. Nullam porttitor neque eget sem sagittis rhoncus. Praesent accumsan fermentum odio, ac pellentesque dui feugiat at. In metus nisl, scelerisque eget velit at, pulvinar placerat ex. Example Gene X, Example Gene B2, Example Gene A, Example Gene Sym C
Registry Number/Name of Substance
51-45-6 (Histamine).
Publication Type
Journal Article. Research Support, Non-U.S. Gov't.
Date Created
20130506
Year of Publication
2013
Link to the Ovid Full Text or citation
http://ovidsp.ovid.com/ovidweb.cgi?T=JS&CSC=Y&NEWS=N&PAGE=fulltext&D=medl&AN=23482392
Link to the External Link Resolver
http://linkserver.bristol.ac.uk:9003/prod?sid=OVID:medline&id=pmid:23482392&id=doi:10.1093%2Fnar%2Fgkt161&issn=0305-1048&isbn=&volume=41&issue=9&spage=e101&pages=e101&date=2013&title=Nucleic+Acids+Research&atitle=Subpathway-GM%3A+identification+of+metabolic+subpathways+via+joint+power+of+interesting+genes+and+metabolites+and+their+topologies+within+pathways.&aulast=Li&pid=%3Cauthor%3ELi+C%3C%2Fauthor%3E%3CAN%3E23482392%3C%2FAN%3E%3CDT%3EJournal+Article%3C%2FDT%3E

<5>
Unique Identifier
999995
Record Owner
From MEDLINE, a database of the U.S. National Library of Medicine.
Status
MEDLINE
Authors
Smith J, Chang Y
Authors Full Name
Smith, Jane. Chang, Yi.
Institution
College of Bioinformatics Science and Technology, Harbin Medical University, Harbin 150081, PR China.
Title
Subpathway-GM: identification of metabolic subpathways via joint power of interesting genes and metabolites and their topologies within pathways.
Source
Nucleic Acids Research. 41(9):e101, 2013 May.
Other ID
Source: NLM. PMC3643575
MeSH Subject Headings
Colorectal Neoplasms/ge [Genetics]
Colorectal Neoplasms/me [Metabolism]
Eryptosis
Genetic Markers
Histamine/me [Metabolism]
Humans
Male
*Metabolic Networks and Pathways/ge [Genetics]
*Metabolomics
Neoplasm Metastasis
Penetrance
Prostatic Neoplasms/ge [Genetics]
Prostatic Neoplasms/me [Metabolism]
Prostatic Neoplasms/pa [Pathology]
Serogroup
*Transcriptome
Abstract
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Duis in turpis aliquet, cursus nisi id, mattis augue. Pellentesque vehicula at ligula vel porta. Fusce suscipit malesuada justo. Cras convallis odio nec dolor elementum facilisis. Donec vel lobortis felis, ut gravida risus. Vivamus interdum ex libero. Phasellus id pharetra tortor. Mauris euismod convallis augue, sit amet aliquet metus hendrerit ac. Duis mattis leo maximus nisi sagittis, a pulvinar turpis fringilla. Ut pellentesque ligula purus, ut iaculis metus finibus nec. Suspendisse diam felis, aliquam sed nisl at, luctus rhoncus magna. Nullam porttitor neque eget sem sagittis rhoncus. Praesent accumsan fermentum odio, ac pellentesque dui feugiat at. In metus nisl, scelerisque eget velit at, pulvinar placerat ex.
Registry Number/Name of Substance
51-45-6 (Histamine).
Publication Type
Journal Article. Research Support, Non-U.S. Gov't.
Date Created
20130506
Year of Publication
2013
Link to the Ovid Full Text or citation
http://ovidsp.ovid.com/ovidweb.cgi?T=JS&CSC=Y&NEWS=N&PAGE=fulltext&D=medl&AN=23482392
Link to the External Link Resolver
http://linkserver.bristol.ac.uk:9003/prod?sid=OVID:medline&id=pmid:23482392&id=doi:10.1093%2Fnar%2Fgkt161&issn=0305-1048&isbn=&volume=41&issue=9&spage=e101&pages=e101&date=2013&title=Nucleic+Acids+Research&atitle=Subpathway-GM%3A+identification+of+metabolic+subpathways+via+joint+power+of+interesting+genes+and+metabolites+and+their+topologies+within+pathways.&aulast=Li&pid=%3Cauthor%3ELi+C%3C%2Fauthor%3E%3CAN%3E23482392%3C%2FAN%3E%3CDT%3EJournal+Article%3C%2FDT%3E

0 comments on commit e9b17b9

Please sign in to comment.