fixed cypress tests

This commit is contained in:
jasquat 2023-09-26 10:30:11 -04:00
parent 125e0d5f7e
commit ac1bebeb76
2 changed files with 11 additions and 9 deletions

View File

@ -97,28 +97,28 @@ describe('process-instances', () => {
cy.runPrimaryBpmnFile(); cy.runPrimaryBpmnFile();
// Change dmn // Change dmn
cy.getBySel('files-accordion').click(); cy.getBySel('process-model-files').click();
cy.getBySel(`edit-file-${dmnFile.replace('.', '-')}`).click(); cy.getBySel(`edit-file-${dmnFile.replace('.', '-')}`).click();
updateDmnText(originalDmnOutputForKevin, newDmnOutputForKevin); updateDmnText(originalDmnOutputForKevin, newDmnOutputForKevin);
cy.contains(acceptanceTestOneDisplayName).click(); cy.contains(acceptanceTestOneDisplayName).click();
cy.runPrimaryBpmnFile(); cy.runPrimaryBpmnFile();
cy.getBySel('files-accordion').click(); cy.getBySel('process-model-files').click();
cy.getBySel(`edit-file-${dmnFile.replace('.', '-')}`).click(); cy.getBySel(`edit-file-${dmnFile.replace('.', '-')}`).click();
updateDmnText(newDmnOutputForKevin, originalDmnOutputForKevin); updateDmnText(newDmnOutputForKevin, originalDmnOutputForKevin);
cy.contains(acceptanceTestOneDisplayName).click(); cy.contains(acceptanceTestOneDisplayName).click();
cy.runPrimaryBpmnFile(); cy.runPrimaryBpmnFile();
// Change bpmn // Change bpmn
cy.getBySel('files-accordion').click(); cy.getBySel('process-model-files').click();
cy.getBySel(`edit-file-${bpmnFile.replace('.', '-')}`).click(); cy.getBySel(`edit-file-${bpmnFile.replace('.', '-')}`).click();
cy.contains(`Process Model File: ${bpmnFile}`); cy.contains(`Process Model File: ${bpmnFile}`);
updateBpmnPythonScript(newPythonScript); updateBpmnPythonScript(newPythonScript);
cy.contains(acceptanceTestOneDisplayName).click(); cy.contains(acceptanceTestOneDisplayName).click();
cy.runPrimaryBpmnFile(); cy.runPrimaryBpmnFile();
cy.getBySel('files-accordion').click(); cy.getBySel('process-model-files').click();
cy.getBySel(`edit-file-${bpmnFile.replace('.', '-')}`).click(); cy.getBySel(`edit-file-${bpmnFile.replace('.', '-')}`).click();
updateBpmnPythonScript(originalPythonScript); updateBpmnPythonScript(originalPythonScript);
cy.contains(acceptanceTestOneDisplayName).click(); cy.contains(acceptanceTestOneDisplayName).click();
@ -133,14 +133,14 @@ describe('process-instances', () => {
// const bpmnFile = 'process_model_one.bpmn'; // const bpmnFile = 'process_model_one.bpmn';
// //
// // Change bpmn // // Change bpmn
// cy.getBySel('files-accordion').click(); // cy.getBySel('process-model-files').click();
// cy.getBySel(`edit-file-${bpmnFile.replace('.', '-')}`).click(); // cy.getBySel(`edit-file-${bpmnFile.replace('.', '-')}`).click();
// cy.contains(`Process Model File: ${bpmnFile}`); // cy.contains(`Process Model File: ${bpmnFile}`);
// updateBpmnPythonScriptWithMonaco(newPythonScript); // updateBpmnPythonScriptWithMonaco(newPythonScript);
// cy.contains('acceptance-tests-model-1').click(); // cy.contains('acceptance-tests-model-1').click();
// cy.runPrimaryBpmnFile(); // cy.runPrimaryBpmnFile();
// //
// cy.getBySel('files-accordion').click(); // cy.getBySel('process-model-files').click();
// cy.getBySel(`edit-file-${bpmnFile.replace('.', '-')}`).click(); // cy.getBySel(`edit-file-${bpmnFile.replace('.', '-')}`).click();
// cy.contains(`Process Model File: ${bpmnFile}`); // cy.contains(`Process Model File: ${bpmnFile}`);
// updateBpmnPythonScriptWithMonaco(originalPythonScript); // updateBpmnPythonScriptWithMonaco(originalPythonScript);

View File

@ -641,8 +641,8 @@ export default function ProcessModelShow() {
<Tabs selectedIndex={selectedTabIndex} onChange={updateSelectedTab}> <Tabs selectedIndex={selectedTabIndex} onChange={updateSelectedTab}>
<TabList aria-label="List of tabs"> <TabList aria-label="List of tabs">
<Tab>About</Tab> <Tab>About</Tab>
<Tab>Files</Tab> <Tab data-qa="process-model-files">Files</Tab>
<Tab>My process instances</Tab> <Tab data-qa="process-instance-list-link">My process instances</Tab>
</TabList> </TabList>
<TabPanels> <TabPanels>
<TabPanel>{readmeFileArea()}</TabPanel> <TabPanel>{readmeFileArea()}</TabPanel>
@ -687,7 +687,6 @@ export default function ProcessModelShow() {
perPageOptions={[2, 5, 25]} perPageOptions={[2, 5, 25]}
showReports={false} showReports={false}
/> />
<span data-qa="process-model-show-permissions-loaded" />
</Can> </Can>
)} )}
</TabPanel> </TabPanel>
@ -799,6 +798,9 @@ export default function ProcessModelShow() {
<p className="process-description">{processModel.description}</p> <p className="process-description">{processModel.description}</p>
{processModel.primary_file_name ? processStartButton : null} {processModel.primary_file_name ? processStartButton : null}
<div className="with-top-margin">{tabArea()}</div> <div className="with-top-margin">{tabArea()}</div>
{permissionsLoaded ? (
<span data-qa="process-model-show-permissions-loaded" />
) : null}
</> </>
); );
} }