Skip to content

Commit

Permalink
add id for build flowsheet button; fix parameter sweep for remaining …
Browse files Browse the repository at this point in the history
…flowsheets
  • Loading branch information
MichaelPesce committed Jul 22, 2024
1 parent eee502d commit cff229e
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 7 deletions.
10 changes: 5 additions & 5 deletions electron/ui/cypress/e2e/Flowsheets.js
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down Expand Up @@ -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',
Expand Down
2 changes: 1 addition & 1 deletion electron/ui/cypress/support/commands.js
Original file line number Diff line number Diff line change
Expand Up @@ -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});
})

Expand Down
10 changes: 9 additions & 1 deletion electron/ui/src/components/BuildOptions/BuildOptions.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,15 @@ export default function BuildOptions(props) {
))}
<Grid item xs={6}>
<div style={{display:"flex"}}>
<Button size="small" variant="contained" color="primary" sx={{marginLeft: 1}} onClick={runBuildFlowsheet} disabled={tabValue!==0 || disableBuildButton}>
<Button
id='build-flowsheet-button'
size="small"
variant="contained"
color="primary"
sx={{marginLeft: 1}}
onClick={runBuildFlowsheet}
disabled={tabValue!==0 || disableBuildButton}
>
{isBuilt ? "Re-build Flowsheet" : "Build Flowsheet"}
</Button>
</div>
Expand Down

0 comments on commit cff229e

Please sign in to comment.