From cff229ebd70ef6eb77bcac9cf0d4ea65f71d25e3 Mon Sep 17 00:00:00 2001 From: MichaelPesce Date: Mon, 22 Jul 2024 13:31:06 -0400 Subject: [PATCH] add id for build flowsheet button; fix parameter sweep for remaining flowsheets --- electron/ui/cypress/e2e/Flowsheets.js | 10 +++++----- electron/ui/cypress/support/commands.js | 2 +- .../ui/src/components/BuildOptions/BuildOptions.js | 10 +++++++++- 3 files changed, 15 insertions(+), 7 deletions(-) diff --git a/electron/ui/cypress/e2e/Flowsheets.js b/electron/ui/cypress/e2e/Flowsheets.js index a3b6861c..e884c03b 100644 --- a/electron/ui/cypress/e2e/Flowsheets.js +++ b/electron/ui/cypress/e2e/Flowsheets.js @@ -3,13 +3,13 @@ export const flowsheets = [ name: 'NF-DSPM-DE flowsheet', buildRequired: true, sweepVariable: 'Volumetricflowrate', - sweepValues: [] + sweepValues: ['3500', '3600'] }, { name: 'BSM2 flowsheet', buildRequired: false, sweepVariable: 'Watermassflowrate', - sweepValues: [], + sweepValues: ['20000', '21000'], }, { name: 'BSM2_P_extension flowsheet', @@ -44,14 +44,14 @@ export const flowsheets = [ { name: 'Granular Activated Carbon (GAC) flowsheet', buildRequired: true, - sweepVariable: 'MW', - sweepValues: ['75','85'], + sweepVariable: 'Apparentdensity', + sweepValues: ['700','800'], }, { name: 'Electrodialysis with concentrate recirculation flowsheet', buildRequired: false, sweepVariable: 'Feedsolutionvolumeflowrate', - sweepValues: ['0.001,0.002'], + sweepValues: ['0.001','0.002'], }, { name: 'LSRRO flowsheet', diff --git a/electron/ui/cypress/support/commands.js b/electron/ui/cypress/support/commands.js index 9d81bc0f..dd5821c6 100644 --- a/electron/ui/cypress/support/commands.js +++ b/electron/ui/cypress/support/commands.js @@ -38,7 +38,7 @@ Cypress.Commands.add('build_flowsheet', () => { method: 'GET', url: 'http://localhost:8001/flowsheets/**', }).as('buildFlowsheet'); - cy.findAllByRole('button', {name: /build flowsheet/i}).eq(0).click(); + cy.get('#build-flowsheet-button').click() cy.wait('@buildFlowsheet', {timeout: 90000}); }) diff --git a/electron/ui/src/components/BuildOptions/BuildOptions.js b/electron/ui/src/components/BuildOptions/BuildOptions.js index 819cc52c..e85c0b34 100644 --- a/electron/ui/src/components/BuildOptions/BuildOptions.js +++ b/electron/ui/src/components/BuildOptions/BuildOptions.js @@ -61,7 +61,15 @@ export default function BuildOptions(props) { ))}
-