fix a couple cypress test issues (#1267)
Co-authored-by: burnettk <burnettk@users.noreply.github.com>
This commit is contained in:
parent
086234c901
commit
fed785b50c
|
@ -35,8 +35,6 @@ Cypress.Commands.add('getBySel', (selector, ...args) => {
|
|||
Cypress.Commands.add('navigateToHome', () => {
|
||||
cy.getBySel('header-menu-expand-button').click();
|
||||
cy.getBySel('side-nav-items').contains('Home').click();
|
||||
// ensure we close the nav
|
||||
cy.getBySel('header-menu-expand-button').click();
|
||||
});
|
||||
|
||||
Cypress.Commands.add('navigateToAdmin', () => {
|
||||
|
@ -93,7 +91,8 @@ Cypress.Commands.add('createGroup', (groupId, groupDisplayName) => {
|
|||
Cypress.Commands.add('createModel', (groupId, modelId, modelDisplayName) => {
|
||||
cy.contains(modelId).should('not.exist');
|
||||
|
||||
cy.contains('Add a process model').click();
|
||||
const dasherizedGroupId = groupId.replace(/\//g, '-');
|
||||
cy.getBySel(`add-process-model-for-group-${dasherizedGroupId}`).click();
|
||||
cy.get('input[name=display_name]').type(modelDisplayName);
|
||||
cy.get('input[name=display_name]').should('have.value', modelDisplayName);
|
||||
cy.get('input[name=id]').should('have.value', modelId);
|
||||
|
|
|
@ -71,6 +71,7 @@ export default function ProcessGroupShow() {
|
|||
const modifiedProcessGroupId = modifyProcessIdentifierForPathParam(
|
||||
processGroup.id
|
||||
);
|
||||
const dasherizedProcessGroupId = modifiedProcessGroupId.replace(/:/g, '-');
|
||||
const showNoItemsDisplayText =
|
||||
(processGroup.process_groups || []).length < 1 &&
|
||||
(processGroup.process_models || []).length < 1;
|
||||
|
@ -129,7 +130,10 @@ export default function ProcessGroupShow() {
|
|||
a={targetUris.processModelCreatePath}
|
||||
ability={ability}
|
||||
>
|
||||
<Button href={`/process-models/${modifiedProcessGroupId}/new`}>
|
||||
<Button
|
||||
href={`/process-models/${modifiedProcessGroupId}/new`}
|
||||
data-qa={`add-process-model-for-group-${dasherizedProcessGroupId}`}
|
||||
>
|
||||
Add a process model
|
||||
</Button>
|
||||
</Can>
|
||||
|
|
Loading…
Reference in New Issue