-
Notifications
You must be signed in to change notification settings - Fork 2
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 #165 from CSCfi/develop
bump to 0.8.0
- Loading branch information
Showing
39 changed files
with
26,104 additions
and
549 deletions.
There are no files selected for viewing
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,34 @@ | ||
<STUDY_SET> | ||
<STUDY alias="GSE10966" center_name="GEO"> | ||
<IDENTIFIERS> | ||
<PRIMARY_ID>SRP000539</PRIMARY_ID> | ||
<EXTERNAL_ID label="primary" namespace="BioProject">PRJNA108793</EXTERNAL_ID> | ||
<EXTERNAL_ID namespace="GEO">GSE10966</EXTERNAL_ID> | ||
</IDENTIFIERS> | ||
<DESCRIPTOR> | ||
<STUDY_TITLE>Different title for testing purposes | ||
</STUDY_TITLE> | ||
<STUDY_TYPE existing_study_type="Other" /> | ||
<STUDY_ABSTRACT>Part of a set of highly integrated epigenome maps for Arabidopsis thaliana. Keywords: | ||
Illumina high-throughput bisulfite sequencing Overall design: Whole genome shotgun bisulfite sequencing | ||
of wildtype Arabidopsis plants (Columbia-0), and met1, drm1 drm2 cmt3, and ros1 dml2 dml3 null mutants | ||
using the Illumina Genetic Analyzer. | ||
</STUDY_ABSTRACT> | ||
<CENTER_PROJECT_NAME>GSE10966</CENTER_PROJECT_NAME> | ||
</DESCRIPTOR> | ||
<STUDY_LINKS> | ||
<STUDY_LINK> | ||
<XREF_LINK> | ||
<DB>pubmed</DB> | ||
<ID>18423832</ID> | ||
</XREF_LINK> | ||
</STUDY_LINK> | ||
</STUDY_LINKS> | ||
<STUDY_ATTRIBUTES> | ||
<STUDY_ATTRIBUTE> | ||
<TAG>parent_bioproject</TAG> | ||
<VALUE>PRJNA107265</VALUE> | ||
</STUDY_ATTRIBUTE> | ||
</STUDY_ATTRIBUTES> | ||
</STUDY> | ||
</STUDY_SET> |
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
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,56 @@ | ||
describe("empty form should not be alerted or saved", function () { | ||
const baseUrl = "http://localhost:" + Cypress.env("port") + "/" | ||
|
||
it("should not show draft saving alert when form is empty, should not save an empty form", () => { | ||
cy.visit(baseUrl) | ||
cy.get('[alt="CSC Login"]').click() | ||
cy.visit(baseUrl + "newdraft") | ||
|
||
// Navigate to folder creation | ||
cy.get("button[type=button]").contains("New folder").click() | ||
|
||
// Add folder name & description, navigate to submissions | ||
cy.get("input[name='name']").type("Test name") | ||
cy.get("textarea[name='description']").type("Test description") | ||
cy.get("button[type=button]").contains("Next").click() | ||
|
||
// Focus on the Study title input in the Study form (not type anything) | ||
cy.get("div[role=button]").contains("Study").click() | ||
cy.get("div[role=button]").contains("Fill Form").click() | ||
cy.get("input[name='descriptor.studyTitle']").focus() | ||
|
||
// Switch to "Upload XML File" and Alert window should not pop up | ||
cy.get("div[role=button]").contains("Upload XML File").click() | ||
cy.get("form", { timeout: 10000 }).should("be.visible") | ||
cy.get("form").within(() => { | ||
cy.get("input[placeholder='Name']").should("be.visible") | ||
}) | ||
|
||
// Switch back to "Fill form" and fill it | ||
cy.get("div[role=button]").contains("Fill Form").click() | ||
cy.get("input[name='descriptor.studyTitle']").type("Test study") | ||
cy.get("input[name='descriptor.studyTitle']").should("have.value", "Test study") | ||
|
||
// Clear form and Save | ||
cy.get("button[type=button]").contains("Clear form").click() | ||
cy.get("input[name='descriptor.studyTitle']", { timeout: 10000 }).should("be.empty") | ||
cy.get("button[type=button]").contains("Save as Draft").click() | ||
|
||
// Expect Info window should pop up | ||
cy.get("div[role=alert]", { timeout: 10000 }).contains("An empty form cannot be saved.").should("be.visible") | ||
|
||
// Fill in Form and Save | ||
cy.get("input[name='descriptor.studyTitle']").type("Test study") | ||
cy.get("input[name='descriptor.studyTitle']").should("have.value", "Test study") | ||
cy.get("button[type=button]").contains("Save as Draft").click() | ||
|
||
cy.get("div[role=alert]", { timeout: 10000 }).contains("Draft saved with") | ||
|
||
// Clear Study title input and Save | ||
cy.get("input[name='descriptor.studyTitle']").clear() | ||
cy.get("button[type=button]").contains("Save as Draft").click() | ||
|
||
// Expect Info window should pop up | ||
cy.get("div[role=alert]", { timeout: 10000 }).contains("An empty form cannot be saved.").should("be.visible") | ||
}) | ||
}) |
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,171 @@ | ||
describe("Home e2e", function () { | ||
const baseUrl = "http://localhost:" + Cypress.env("port") + "/" | ||
|
||
beforeEach(() => { | ||
cy.visit(baseUrl) | ||
cy.get('[alt="CSC Login"]').click() | ||
}) | ||
|
||
it("show Overview submissions in Home page, create a draft folder, navigate to see folder details, delete object inside folder, navigate back to Overview submissions", () => { | ||
// Overview submissions should have 2 different list and max. 5 items each list | ||
cy.contains("Your Draft Submissions", { timeout: 10000 }).should("be.visible") | ||
cy.contains("Your Published Submissions").should("be.visible") | ||
|
||
cy.get("ul.MuiList-root").eq(0).children().should("have.length.at.most", 5) | ||
cy.get("ul.MuiList-root").eq(1).children().should("have.length.at.most", 5) | ||
|
||
// Create a new Unpublished folder | ||
cy.get("button").contains("Create Submission").click() | ||
|
||
// Navigate to folder creation | ||
cy.get("button[type=button]").contains("New folder").click() | ||
|
||
// Add folder name & description, navigate to editing folder | ||
cy.get("input[name='name']").type("Test unpublished folder") | ||
cy.get("textarea[name='description']").type("Test description") | ||
cy.get("button[type=button]").contains("Next").click() | ||
|
||
// Fill a Study form | ||
cy.get("div[role=button]", { timeout: 10000 }).contains("Study").click() | ||
cy.get("div[role=button]").contains("Fill Form").click() | ||
cy.get("input[name='descriptor.studyTitle']").type("Test title") | ||
cy.get("select[name='descriptor.studyType']").select("Resequencing") | ||
|
||
// Submit form | ||
cy.get("button[type=submit]").contains("Submit").click() | ||
cy.get(".MuiListItem-container", { timeout: 10000 }).should("have.length", 1) | ||
|
||
// Navigate to summary | ||
cy.get("button[type=button]").contains("Next").click() | ||
|
||
// Check the amount of submitted objects in Study | ||
cy.get("h6").contains("Study").parent("div").children().eq(1).should("have.text", 1) | ||
|
||
// Save folder and navigate to Home page | ||
cy.get("button[type=button]").contains("Save and Exit").click() | ||
cy.get('button[aria-label="Save a new folder and move to frontpage"]').contains("Return to homepage").click() | ||
|
||
cy.reload() | ||
// Click "See all" button to navigate to all unpublished folders list | ||
cy.get("div.MuiCardActions-root", { timeout: 30000 }) | ||
.first() | ||
.should("be.visible") | ||
.find("button") | ||
.contains("See all") | ||
.should("be.visible") | ||
.then($btn => $btn.click()) | ||
|
||
// Check the created folder existing in the list and navigate to see its details | ||
cy.get("ul.MuiList-root", { timeout: 10000 }) | ||
.should("be.visible") | ||
.within(() => | ||
cy | ||
.get("div.MuiButtonBase-root") | ||
.filter(':contains("Test unpublished folder")', { timeout: 30000 }) | ||
.should("be.visible") | ||
.then($el => $el.last().click()) | ||
) | ||
|
||
// Check the selected folder has the correct amount of objects | ||
cy.get("table", { timeout: 10000 }).should("be.visible") | ||
|
||
cy.get("tbody").should("be.visible") | ||
cy.get("tbody>tr").should("have.length", 1) | ||
|
||
// Delete an object inside the folder | ||
cy.get("button[aria-label='Delete this object']") | ||
.should("be.visible") | ||
.then($btn => $btn.click()) | ||
cy.get("tbody>tr", { timeout: 10000 }).should("have.length", 0) | ||
|
||
// Navigate back to unpublished folders list | ||
cy.contains("Your draft submissions") | ||
.should("be.visible") | ||
.then($el => $el.click()) | ||
|
||
// Close unpublished folders list | ||
cy.get("div.MuiCardActions-root") | ||
.contains("Close") | ||
.should("be.visible") | ||
.then($btn => $btn.click()) | ||
|
||
// Check Overview submissions page is shown | ||
cy.contains("Your Draft Submissions").should("be.visible") | ||
cy.contains("Your Published Submissions").should("be.visible") | ||
}) | ||
|
||
it("create a published folder, navigate to see folder details, delete object inside folder, navigate back to Overview submissions", () => { | ||
// Create a new Published folder | ||
cy.get("button").contains("Create Submission").click() | ||
|
||
// Navigate to folder creation | ||
cy.get("button[type=button]").contains("New folder").click() | ||
|
||
// Add folder name & description, navigate to editing folder | ||
cy.get("input[name='name']").type("Test published folder") | ||
cy.get("textarea[name='description']").type("Test description") | ||
cy.get("button[type=button]").contains("Next").click() | ||
|
||
// Fill a Study form | ||
cy.get("div[role=button]").contains("Study").click() | ||
cy.get("div[role=button]").contains("Fill Form").click() | ||
cy.get("input[name='descriptor.studyTitle']").type("Test title") | ||
cy.get("select[name='descriptor.studyType']").select("Resequencing") | ||
|
||
// Submit form | ||
cy.get("button[type=submit]").contains("Submit").click() | ||
cy.get(".MuiListItem-container", { timeout: 10000 }).should("have.length", 1) | ||
|
||
// Navigate to summary | ||
cy.get("button[type=button]").contains("Next").click() | ||
|
||
// Check the amount of submitted objects in Study | ||
cy.get("h6").contains("Study").parent("div").children().eq(1).should("have.text", 1) | ||
|
||
// Navigate to publish | ||
cy.get("button[type=button]").contains("Publish").click() | ||
cy.get('button[aria-label="Publish folder contents and move to frontpage"]').contains("Publish").click() | ||
|
||
cy.get("div", { timeout: 10000 }).contains("Logged in as:") | ||
// Click "See all" button to navigate to all published folders list | ||
cy.get("div.MuiCardActions-root", { timeout: 30000 }) | ||
.last() | ||
.should("be.visible") | ||
.find("button") | ||
.contains("See all") | ||
.should("be.visible") | ||
.then($btn => $btn.click()) | ||
|
||
// Check the created folder existing in the list and navigate to see its details | ||
cy.get("ul.MuiList-root", { timeout: 10000 }) | ||
.should("be.visible") | ||
.within(() => | ||
cy | ||
.get("div.MuiButtonBase-root") | ||
.filter(':contains("Test published folder")', { timeout: 30000 }) | ||
.should("be.visible") | ||
.then($el => $el.last().click()) | ||
) | ||
|
||
// Check the selected folder has the correct amount of objects | ||
cy.get("table", { timeout: 10000 }).should("be.visible") | ||
|
||
cy.get("tbody").should("be.visible") | ||
cy.get("tbody>tr").should("have.length", 1) | ||
|
||
// Navigate back to published folders list | ||
cy.contains("Your published submissions") | ||
.should("be.visible") | ||
.then($el => $el.click()) | ||
|
||
// Close published folders list | ||
cy.get("div.MuiCardActions-root") | ||
.contains("Close") | ||
.should("be.visible") | ||
.then($btn => $btn.click()) | ||
|
||
// Check Overview submissions page is shown | ||
cy.contains("Your Draft Submissions").should("be.visible") | ||
cy.contains("Your Published Submissions").should("be.visible") | ||
}) | ||
}) |
Oops, something went wrong.