Skip to content

Commit

Permalink
Remove cypress suppression of uncaught exceptions (opendatahub-io#3063)
Browse files Browse the repository at this point in the history
* Remove cypress suppression of uncaught exceptions

* Remove cypress suppression of uncaught exceptions

* Upgrade patternfly/react-core to 5.4.0

* Upgrade patternfly/react-core to 5.4.0 package-lock.json

* Change import for MenuToggleProps

* Fix issues arising dur to package change and upgrade related packages
  • Loading branch information
manaswinidas authored Aug 28, 2024
1 parent bccd89c commit 3174a74
Show file tree
Hide file tree
Showing 8 changed files with 6,055 additions and 4,971 deletions.
10,977 changes: 6,038 additions & 4,939 deletions frontend/package-lock.json

Large diffs are not rendered by default.

24 changes: 12 additions & 12 deletions frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,20 +55,20 @@
"@monaco-editor/react": "^4.6.0",
"@openshift/dynamic-plugin-sdk": "^4.0.0",
"@openshift/dynamic-plugin-sdk-utils": "^4.0.1",
"@patternfly/patternfly": "^5.3.1",
"@patternfly/patternfly": "^5.4.0",
"@patternfly/quickstarts": "^5.3.0",
"@patternfly/react-catalog-view-extension": "^5.0.0",
"@patternfly/react-charts": "^7.3.1",
"@patternfly/react-code-editor": "^5.3.3",
"@patternfly/react-core": "^5.3.3",
"@patternfly/react-drag-drop": "^5.3.3",
"@patternfly/react-icons": "^5.3.2",
"@patternfly/react-log-viewer": "^5.2.0",
"@patternfly/react-styles": "^5.3.1",
"@patternfly/react-table": "^5.3.3",
"@patternfly/react-templates": "^1.0.4",
"@patternfly/react-tokens": "^5.3.1",
"@patternfly/react-topology": "^5.4.0-prerelease.10",
"@patternfly/react-charts": "^7.4.0",
"@patternfly/react-code-editor": "^5.4.0",
"@patternfly/react-core": "^5.4.0",
"@patternfly/react-drag-drop": "^5.4.0",
"@patternfly/react-icons": "^5.4.0",
"@patternfly/react-log-viewer": "^5.3.0",
"@patternfly/react-styles": "^5.4.0",
"@patternfly/react-table": "^5.4.0",
"@patternfly/react-templates": "^1.1.0",
"@patternfly/react-tokens": "^5.4.0",
"@patternfly/react-topology": "^5.4.0",
"@patternfly/react-virtualized-extension": "^5.1.0",
"@segment/analytics-next": "^1.72.0",
"@types/classnames": "^2.3.1",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -121,10 +121,6 @@ const initIntercepts = ({

describe('Model version archive list', () => {
it('No archive versions in the selected registered model', () => {
// Bypass patternfly ExpandableSection error https://github.com/patternfly/patternfly-react/issues/10410
// Cannot destructure property 'offsetWidth' of 'this.expandableContentRef.current' as it is null.
Cypress.on('uncaught:exception', () => false);

initIntercepts({ modelVersions: [mockModelVersion({ id: '3', name: 'model version 2' })] });
modelVersionArchive.visitModelVersionList();
verifyRelativeURL('/modelRegistry/modelregistry-sample/registeredModels/1/versions');
Expand Down Expand Up @@ -199,10 +195,6 @@ describe('Restoring archive version', () => {
initIntercepts({});
modelVersionArchive.visit();

// Bypass patternfly ExpandableSection error https://github.com/patternfly/patternfly-react/issues/10410
// Cannot destructure property 'offsetWidth' of 'this.expandableContentRef.current' as it is null.
Cypress.on('uncaught:exception', () => false);

const archiveVersionRow = modelVersionArchive.getRow('model version 2');
archiveVersionRow.findKebabAction('Restore version').click();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -203,9 +203,6 @@ describe('Model Versions', () => {
verifyRelativeURL('/modelRegistry/modelregistry-sample/registeredModels/1/versions/2/details');
cy.findByTestId('app-page-title').should('have.text', 'model version');
cy.findByTestId('breadcrumb-version-name').should('have.text', 'model version');
// Bypass patternfly ExpandableSection error https://github.com/patternfly/patternfly-react/issues/10410
// Cannot destructure property 'offsetWidth' of 'this.expandableContentRef.current' as it is null.
Cypress.on('uncaught:exception', () => false);
cy.go('back');
verifyRelativeURL('/modelRegistry/modelregistry-sample/registeredModels/1/versions');
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -170,10 +170,6 @@ describe('Restoring archive model', () => {
initIntercepts({});
registeredModelArchive.visit();

// Bypass patternfly ExpandableSection error https://github.com/patternfly/patternfly-react/issues/10410
// Cannot destructure property 'offsetWidth' of 'this.expandableContentRef.current' as it is null.
Cypress.on('uncaught:exception', () => false);

const archiveModelRow = registeredModelArchive.getRow('model 2');
archiveModelRow.findKebabAction('Restore model').click();

Expand Down
2 changes: 1 addition & 1 deletion frontend/src/components/SimpleSelect.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import {
SelectOption,
SelectGroup,
Divider,
MenuToggleProps,
} from '@patternfly/react-core';
import { MenuToggleProps } from '@patternfly/react-core/src/components/MenuToggle/MenuToggle';

import './SimpleSelect.scss';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ export const CustomMetricsColumnsModal: React.FC<CustomMetricsColumnsModalProps>
const metricsColumnsLocalStorageKey = getMetricsColumnsLocalStorageKey(experimentId ?? '');
const selectedColumnNames = Object.values(columns).reduce((acc: string[], column) => {
if (column.props.checked) {
acc.push(column.id);
acc.push(String(column.id));
}
return acc;
}, []);
Expand Down Expand Up @@ -66,7 +66,7 @@ export const CustomMetricsColumnsModal: React.FC<CustomMetricsColumnsModalProps>

if (searchText) {
newColumns = defaultColumns.filter((column) =>
column.id.toLowerCase().includes(searchText.toLowerCase()),
String(column.id).toLowerCase().includes(searchText.toLowerCase()),
);
}

Expand Down Expand Up @@ -110,7 +110,7 @@ export const CustomMetricsColumnsModal: React.FC<CustomMetricsColumnsModalProps>

const columnCheckbox = (
<Checkbox
id={id}
id={String(id)}
isChecked={checked}
isDisabled={isDisabled}
onChange={(_, isChecked) =>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ const RegisteredModelSelector: React.FC<RegisteredModelSelectorProps> = ({
return (
<TypeaheadSelect
id="model-name"
initialOptions={options}
selectOptions={options}
placeholder="Select a registered model"
noOptionsFoundMessage={(filter) => `No results found for "${filter}"`}
onSelect={(_event, selection) => {
Expand Down

0 comments on commit 3174a74

Please sign in to comment.