Skip to content

Commit

Permalink
Upgrade EUI to v52.2.0 (#128841)
Browse files Browse the repository at this point in the history
* Updgraded EUI packages in package.json and src/dev/license_checker/config.js

* Resolved Jest test failures for Jest test suites 1 and 2. Updated snapshots, and updated equality conditions for specific test cases

* Resolve Jest test cases for Jest test suite 3. Updated snapshots for required tests

* Resolved failing Jest test cases in Jest suite 3. Updated tests checking for strict text equality to account for text coming from the EuiScreenReaderOnly component. Also updated tests to account for EuiIcon text that is now rendered when the icon is imported from .testenv (PR 5709 - elastic/eui#5709).

* type fixes

* eui to 52.2.0

* Resolved test cases for Jest test suites 1 and 2. Updated required snapshots.
Updated tests using getAllByLabelText and getByLabelText to getAllByText and getByText respectively as the former have been deprecated

* Updated Jest tests for Jest test suites 5 and 6. Updated required snapshots. Updated instances of getByLabelText and getAllByLabelText to getByText and getAllByText as the former are now deprecated.

* Updated Jest tests for Jest test suite 7. Updated required snapshots.

* Completed test case revisions for Jest test suites 1, 3, 6, 7, and 8. Updated required snapshots. Updated various tests to account for text rendering of the EuiIcon text.

* removed unused test utils

* use .contains for euiicon content

* storyshots updates

* linting

* Fix failing a11y violations tests

* Fix Jest failures caused by #eui/5709

- these changes should be reverted if we opt to revert the above PR

Co-authored-by: Bree Hall <briannajdhall@gmail.com>
Co-authored-by: Greg Thompson <thompson.glowe@gmail.com>
  • Loading branch information
3 people authored Mar 30, 2022
1 parent 482f819 commit 2688cb2
Show file tree
Hide file tree
Showing 100 changed files with 970 additions and 445 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@
"@elastic/datemath": "link:bazel-bin/packages/elastic-datemath",
"@elastic/elasticsearch": "npm:@elastic/elasticsearch-canary@8.2.0-canary.1",
"@elastic/ems-client": "8.2.0",
"@elastic/eui": "51.1.0",
"@elastic/eui": "52.2.0",
"@elastic/filesaver": "1.1.2",
"@elastic/node-crypto": "1.2.1",
"@elastic/numeral": "^2.5.1",
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/dev/license_checker/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,6 @@ export const LICENSE_OVERRIDES = {
'jsts@1.6.2': ['Eclipse Distribution License - v 1.0'], // cf. https://github.com/bjornharrtell/jsts
'@mapbox/jsonlint-lines-primitives@2.0.2': ['MIT'], // license in readme https://github.com/tmcw/jsonlint
'@elastic/ems-client@8.2.0': ['Elastic License 2.0'],
'@elastic/eui@51.1.0': ['SSPL-1.0 OR Elastic License 2.0'],
'@elastic/eui@52.2.0': ['SSPL-1.0 OR Elastic License 2.0'],
'language-subtag-registry@0.3.21': ['CC-BY-4.0'], // retired ODC‑By license https://github.com/mattcg/language-subtag-registry
};

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ describe('NotFoundErrors component', () => {
const callOut = mounted.find('EuiCallOut');
expect(callOut).toMatchSnapshot();
expect(mounted.text()).toMatchInlineSnapshot(
`"There is a problem with this saved objectThe saved search associated with this object no longer exists.If you know what this error means, you can use the Saved objects APIs(opens in a new tab or window) to fix it — otherwise click the delete button above."`
`"There is a problem with this saved objectThe saved search associated with this object no longer exists.If you know what this error means, you can use the Saved objects APIsExternal link(opens in a new tab or window) to fix it — otherwise click the delete button above."`
);
});

Expand All @@ -34,7 +34,7 @@ describe('NotFoundErrors component', () => {
const callOut = mounted.find('EuiCallOut');
expect(callOut).toMatchSnapshot();
expect(mounted.text()).toMatchInlineSnapshot(
`"There is a problem with this saved objectThe data view associated with this object no longer exists.If you know what this error means, you can use the Saved objects APIs(opens in a new tab or window) to fix it — otherwise click the delete button above."`
`"There is a problem with this saved objectThe data view associated with this object no longer exists.If you know what this error means, you can use the Saved objects APIsExternal link(opens in a new tab or window) to fix it — otherwise click the delete button above."`
);
});

Expand All @@ -43,7 +43,7 @@ describe('NotFoundErrors component', () => {
const callOut = mounted.find('EuiCallOut');
expect(callOut).toMatchSnapshot();
expect(mounted.text()).toMatchInlineSnapshot(
`"There is a problem with this saved objectA field associated with this object no longer exists in the data view.If you know what this error means, you can use the Saved objects APIs(opens in a new tab or window) to fix it — otherwise click the delete button above."`
`"There is a problem with this saved objectA field associated with this object no longer exists in the data view.If you know what this error means, you can use the Saved objects APIsExternal link(opens in a new tab or window) to fix it — otherwise click the delete button above."`
);
});

Expand All @@ -52,7 +52,7 @@ describe('NotFoundErrors component', () => {
const callOut = mounted.find('EuiCallOut');
expect(callOut).toMatchSnapshot();
expect(mounted.text()).toMatchInlineSnapshot(
`"There is a problem with this saved objectIf you know what this error means, you can use the Saved objects APIs(opens in a new tab or window) to fix it — otherwise click the delete button above."`
`"There is a problem with this saved objectIf you know what this error means, you can use the Saved objects APIsExternal link(opens in a new tab or window) to fix it — otherwise click the delete button above."`
);
});
});
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ describe('LinkPreview', () => {
removeExternalLinkText(
(getByTestId(container, 'preview-link') as HTMLAnchorElement).text
)
).toEqual('https://baz.co');
).toContain('https://baz.co');
});
});

Expand All @@ -74,7 +74,7 @@ describe('LinkPreview', () => {
removeExternalLinkText(
(getByTestId(container, 'preview-link') as HTMLAnchorElement).text
)
).toEqual('https://baz.co?service.name={{invalid}');
).toContain('https://baz.co?service.name={{invalid}');
expect(getByTestId(container, 'preview-warning')).toBeInTheDocument();
});
});
Expand All @@ -94,7 +94,7 @@ describe('LinkPreview', () => {
removeExternalLinkText(
(getByTestId(container, 'preview-link') as HTMLAnchorElement).text
)
).toEqual('https://baz.co?transaction=0');
).toContain('https://baz.co?transaction=0');
});
});
});
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ describe('CustomLinkToolbar', () => {
wrapper: Wrapper,
});
expect(
component.getByLabelText('Custom links settings page')
component.getByText('Custom links settings page')
).toBeInTheDocument();
expectTextsInDocument(component, ['Create']);
});
Expand All @@ -56,7 +56,7 @@ describe('CustomLinkToolbar', () => {
{ wrapper: Wrapper }
);
expect(
component.getByLabelText('Custom links settings page')
component.getByText('Custom links settings page')
).toBeInTheDocument();
expectTextsNotInDocument(component, ['Create']);
});
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 2688cb2

Please sign in to comment.