Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove cypress suppression of uncaught exceptions #3063

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 @@
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));

Check warning on line 35 in frontend/src/concepts/pipelines/content/tables/pipelineRun/CustomMetricsColumnsModal.tsx

View check run for this annotation

Codecov / codecov/patch

frontend/src/concepts/pipelines/content/tables/pipelineRun/CustomMetricsColumnsModal.tsx#L35

Added line #L35 was not covered by tests
}
return acc;
}, []);
Expand Down Expand Up @@ -66,7 +66,7 @@

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

Check warning on line 69 in frontend/src/concepts/pipelines/content/tables/pipelineRun/CustomMetricsColumnsModal.tsx

View check run for this annotation

Codecov / codecov/patch

frontend/src/concepts/pipelines/content/tables/pipelineRun/CustomMetricsColumnsModal.tsx#L69

Added line #L69 was not covered by tests
);
}

Expand Down Expand Up @@ -110,7 +110,7 @@

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
Loading