Skip to content

Commit

Permalink
Fix end2end tests for volume selection (#215)
Browse files Browse the repository at this point in the history
Co-authored-by: akochari <[email protected]>
  • Loading branch information
alfredeen and akochari authored Aug 14, 2024
1 parent 8be9099 commit d49a714
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions cypress/e2e/ui-tests/test-deploy-app.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,8 @@ describe("Test deploying app", () => {
const app_type = "Custom App"
const app_source_code_public = "https://doi.org/example"

let volume_display_text = "project-vol (" + project_name + ")"

if (createResources === true) {
cy.visit("/projects/")
cy.contains('.card-title', project_name).parents('.card-body').siblings('.card-footer').find('a:contains("Open")').first().click()
Expand All @@ -69,7 +71,7 @@ describe("Test deploying app", () => {
cy.get('#id_name').type(app_name_project)
cy.get('#id_description').type(app_description)
cy.get('#id_access').select('Project')
cy.get('#id_volume').select('project-vol')
cy.get('#id_volume').select(volume_display_text)
cy.get('#id_port').clear().type(image_port)
cy.get('#id_image').clear().type(image_name)
cy.get('#id_path').clear().type(app_path)
Expand Down Expand Up @@ -110,7 +112,7 @@ describe("Test deploying app", () => {
cy.get('#id_port').clear().type(image_port)
cy.get('#id_image').clear().type(image_name)
cy.get('#id_path').clear().type(app_path)
cy.get('#id_volume').select('project-vol')
cy.get('#id_volume').select(volume_display_text)
cy.get('#submit-id-submit').contains('Submit').click()

cy.get('tr:contains("' + app_name_public + '")').find('span').should('contain', 'Running')
Expand Down Expand Up @@ -332,6 +334,8 @@ describe("Test deploying app", () => {
const createResources = Cypress.env('create_resources');
const app_type = "TissUUmaps App"

let volume_display_text = "project-vol (" + project_name + ")"

if (createResources === true) {
cy.visit("/projects/")
cy.contains('.card-title', project_name).parents('.card-body').siblings('.card-footer').find('a:contains("Open")').first().click()
Expand All @@ -341,7 +345,7 @@ describe("Test deploying app", () => {
cy.get('#id_name').type(app_name)
cy.get('#id_description').type(app_description)
cy.get('#id_access').select('Public')
cy.get('#id_volume').select('project-vol')
cy.get('#id_volume').select(volume_display_text)
cy.get('#submit-id-submit').contains('Submit').click()
cy.get('tr:contains("' + app_name + '")').find('span').should('contain', 'Running')
cy.get('tr:contains("' + app_name + '")').find('span').should('contain', 'public')
Expand Down Expand Up @@ -385,6 +389,8 @@ describe("Test deploying app", () => {
const subdomain_2 = "subdomain-test2"
const subdomain_3 = "subdomain-test3"

let volume_display_text = "project-vol (" + project_name + ")"

if (createResources === true) {
cy.visit("/projects/")
cy.contains('.card-title', project_name).parents('.card-body').siblings('.card-footer').find('a:contains("Open")').first().click()
Expand All @@ -396,7 +402,7 @@ describe("Test deploying app", () => {
cy.get('#id_description').type(app_description)
cy.get('#id_port').clear().type("8501")
cy.get('#id_image').clear().type(image_name)
cy.get('#id_volume').select('project-vol')
cy.get('#id_volume').select(volume_display_text)
cy.get('#id_path').clear().type("/home")
// fill out subdomain field
cy.get('#id_subdomain').type(subdomain)
Expand Down

0 comments on commit d49a714

Please sign in to comment.