diff --git a/cypress.config.js b/cypress.config.js
index c4bf94c..1c8c1c6 100644
--- a/cypress.config.js
+++ b/cypress.config.js
@@ -10,4 +10,9 @@ module.exports = defineConfig({
// implement node event listeners here
},
},
+
+ // this scrolls away from the elements for some reason with carbon when set to top
+ // https://github.com/cypress-io/cypress/issues/2353
+ // https://docs.cypress.io/guides/core-concepts/interacting-with-elements#Scrolling
+ scrollBehavior: "center",
});
diff --git a/cypress/e2e/process_groups.cy.js b/cypress/e2e/process_groups.cy.js
index 1f2c675..4860a68 100644
--- a/cypress/e2e/process_groups.cy.js
+++ b/cypress/e2e/process_groups.cy.js
@@ -30,9 +30,9 @@ describe('process-groups', () => {
newGroupDisplayName
);
- cy.contains('Delete').click();
+ cy.contains('Delete Process Group').click();
cy.contains('Are you sure');
- cy.contains('OK').click();
+ cy.getBySel('modal-confirmation-dialog').get('.cds--btn--danger').click();
cy.url().should('include', `process-groups`);
cy.contains(groupId).should('not.exist');
});
diff --git a/cypress/support/commands.js b/cypress/support/commands.js
index 1b9c924..e6d801d 100644
--- a/cypress/support/commands.js
+++ b/cypress/support/commands.js
@@ -101,18 +101,15 @@ Cypress.Commands.add(
);
Cypress.Commands.add('basicPaginationTest', () => {
- cy.get('#pagination-page-dropdown')
- .type('typing_to_open_dropdown_box....FIXME')
- .find('.dropdown-item')
- .contains(/^2$/)
- .click();
+ cy.getBySel('pagination-options').scrollIntoView();
+ cy.get('.cds--select__item-count').find('.cds--select-input').select('2');
- cy.contains(/^1-2 of \d+$/);
- cy.getBySel('pagination-previous-button-inactive');
- cy.getBySel('pagination-next-button').click();
- cy.contains(/^3-4 of \d+$/);
- cy.getBySel('pagination-previous-button').click();
- cy.contains(/^1-2 of \d+$/);
+ // NOTE: this is a em dash instead of en dash
+ cy.contains(/\b1–2 of \d+/);
+ cy.get('.cds--pagination__button--forward').click();
+ cy.contains(/\b3–4 of \d+/);
+ cy.get('.cds--pagination__button--backward').click();
+ cy.contains(/\b1–2 of \d+/);
});
Cypress.Commands.add('assertAtLeastOneItemInPaginatedResults', () => {
diff --git a/package-lock.json b/package-lock.json
index a72fc40..a08036b 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -9193,9 +9193,9 @@
"integrity": "sha512-NJGVKPS81XejHcLhaLJS7plab0fK3slPh11mESeeDq2W4ZI5kUKK/LRRdVDvjJseojbPB7ZwjnyOybg3Igea/A=="
},
"node_modules/cypress": {
- "version": "10.8.0",
- "resolved": "https://registry.npmjs.org/cypress/-/cypress-10.8.0.tgz",
- "integrity": "sha512-QVse0dnLm018hgti2enKMVZR9qbIO488YGX06nH5j3Dg1isL38DwrBtyrax02CANU6y8F4EJUuyW6HJKw1jsFA==",
+ "version": "10.11.0",
+ "resolved": "https://registry.npmjs.org/cypress/-/cypress-10.11.0.tgz",
+ "integrity": "sha512-lsaE7dprw5DoXM00skni6W5ElVVLGAdRUUdZjX2dYsGjbY/QnpzWZ95Zom1mkGg0hAaO/QVTZoFVS7Jgr/GUPA==",
"dev": true,
"hasInstallScript": true,
"dependencies": {
@@ -36484,9 +36484,9 @@
"integrity": "sha512-NJGVKPS81XejHcLhaLJS7plab0fK3slPh11mESeeDq2W4ZI5kUKK/LRRdVDvjJseojbPB7ZwjnyOybg3Igea/A=="
},
"cypress": {
- "version": "10.8.0",
- "resolved": "https://registry.npmjs.org/cypress/-/cypress-10.8.0.tgz",
- "integrity": "sha512-QVse0dnLm018hgti2enKMVZR9qbIO488YGX06nH5j3Dg1isL38DwrBtyrax02CANU6y8F4EJUuyW6HJKw1jsFA==",
+ "version": "10.11.0",
+ "resolved": "https://registry.npmjs.org/cypress/-/cypress-10.11.0.tgz",
+ "integrity": "sha512-lsaE7dprw5DoXM00skni6W5ElVVLGAdRUUdZjX2dYsGjbY/QnpzWZ95Zom1mkGg0hAaO/QVTZoFVS7Jgr/GUPA==",
"dev": true,
"requires": {
"@cypress/request": "^2.88.10",
diff --git a/src/components/ButtonWithConfirmation.tsx b/src/components/ButtonWithConfirmation.tsx
index f8e8bf7..31a8e5e 100644
--- a/src/components/ButtonWithConfirmation.tsx
+++ b/src/components/ButtonWithConfirmation.tsx
@@ -26,13 +26,6 @@ export default function ButtonWithConfirmation({
setShowConfirmationPrompt(false);
};
- const modalBodyElement = () => {
- if (description) {
- return {description};
- }
- return null;
- };
-
const handleConfirmation = () => {
onConfirmation();
setShowConfirmationPrompt(false);
@@ -43,6 +36,7 @@ export default function ButtonWithConfirmation({
{UserService.getUsername()}
-
+
>
);
}
return (
-
+
);
diff --git a/src/components/PaginationForTable.tsx b/src/components/PaginationForTable.tsx
index d9d94b8..3b65c78 100644
--- a/src/components/PaginationForTable.tsx
+++ b/src/components/PaginationForTable.tsx
@@ -35,20 +35,24 @@ export default function PaginationForTable({
navigate(`${path}?page=${newPage}&per_page=${pageSize}${queryParamString}`);
};
- return (
- <>
- {tableToDisplay}
-
- >
- );
+ if (pagination) {
+ return (
+ <>
+ {tableToDisplay}
+
+ >
+ );
+ }
+ return null;
}
diff --git a/src/components/ProcessGroupForm.tsx b/src/components/ProcessGroupForm.tsx
index 21cabc9..99db343 100644
--- a/src/components/ProcessGroupForm.tsx
+++ b/src/components/ProcessGroupForm.tsx
@@ -105,6 +105,7 @@ export default function ProcessGroupForm({
const textInputs = [
@@ -159,7 +162,7 @@ export default function ProcessGroupForm({
);
diff --git a/src/routes/ProcessGroupList.tsx b/src/routes/ProcessGroupList.tsx
index 3e39644..13f3d45 100644
--- a/src/routes/ProcessGroupList.tsx
+++ b/src/routes/ProcessGroupList.tsx
@@ -3,11 +3,11 @@ import { Link, useNavigate, useSearchParams } from 'react-router-dom';
import {
Button,
Table,
- ExpandableTile,
- TileAboveTheFoldContent,
- TileBelowTheFoldContent,
- TextInput,
- ClickableTile,
+ // ExpandableTile,
+ // TileAboveTheFoldContent,
+ // TileBelowTheFoldContent,
+ // TextInput,
+ // ClickableTile,
// @ts-ignore
} from '@carbon/react';
import ProcessBreadcrumb from '../components/ProcessBreadcrumb';