Skip to content

[7.x] [Security Solution] Replace EUI theme with mocks in jest suites (#92462)#93336

Merged
ecezalp merged 1 commit intoelastic:7.xfrom
ecezalp:backport/7.x/pr-92462
Mar 3, 2021
Merged

[7.x] [Security Solution] Replace EUI theme with mocks in jest suites (#92462)#93336
ecezalp merged 1 commit intoelastic:7.xfrom
ecezalp:backport/7.x/pr-92462

Conversation

@ecezalp
Copy link
Copy Markdown
Contributor

@ecezalp ecezalp commented Mar 2, 2021

Backports the following commits to 7.x:

…tic#92462)

Previously there were a large number of jest specs that utilized
the ThemeProvider (from styled-components package) to inject EUI
themes into the mounted components. The full EUI theme is almost
never necessary for unit tests as each tested component usually
consumes no more than a single field or two from the EUI theme.
In certain cases, the theme was not used at all. This change is
intended to remove all unnecessary ThemeProviders from the suites,
and replaces the imported EUI theme json files with mock themes
customized for each tested component. With this change, snapshots
are now significantly smaller, and tests are lighter.

Closes elastic#64092.
@ecezalp ecezalp added the backport This PR is a backport of another PR label Mar 2, 2021
@ecezalp ecezalp enabled auto-merge (squash) March 2, 2021 22:26
@kibanamachine
Copy link
Copy Markdown
Contributor

💚 Build Succeeded

Metrics [docs]

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
triggersActionsUi 1.6MB 1.5MB -23.9KB

Page load bundle

Size of the bundles that are downloaded on every page load. Target size is below 100kb

id before after diff
triggersActionsUi 104.1KB 104.2KB +82.0B
Unknown metric groups

async chunk count

id before after diff
triggersActionsUi 41 42 +1

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

@ecezalp ecezalp merged commit 07537be into elastic:7.x Mar 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport This PR is a backport of another PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants