Skip to content

Commit b1eca60

Browse files
committed
test: update tests
1 parent 192b447 commit b1eca60

6 files changed

Lines changed: 19 additions & 19 deletions

File tree

packages/eui/src/components/color_picker/color_picker.test.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -254,9 +254,9 @@ describe('EuiColorPicker', () => {
254254
fireEvent.click(swatches[0]);
255255
expect(onChange).toBeCalled();
256256
expect(onChange).toBeCalledWith(VISUALIZATION_COLORS[0], {
257-
hex: '#54b399',
257+
hex: '#16c5c0',
258258
isValid: true,
259-
rgba: [84, 179, 153, 1],
259+
rgba: [22, 197, 192, 1],
260260
});
261261
});
262262

packages/eui/src/components/form/form.styles.test.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,8 @@ describe('euiFormVariables', () => {
6565
wrapper: darkModeWrapper,
6666
});
6767
// Check custom dark-mode logic
68-
expect(result.current.backgroundColor).toEqual('#16171c');
69-
expect(result.current.controlPlaceholderText).toEqual('#878b95');
68+
expect(result.current.backgroundColor).toEqual('#0B1628');
69+
expect(result.current.controlPlaceholderText).toEqual('#8e9fbc');
7070
});
7171
});
7272

packages/eui/src/components/markdown_editor/markdown_format.test.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ describe('EuiMarkdownFormat', () => {
3838
);
3939

4040
expect(getByTestSubject('first')).toHaveStyle({
41-
color: 'rgb(189, 39, 30)',
41+
color: 'rgb(167, 22, 39)',
4242
});
4343
expect(getByTestSubject('second')).toHaveStyle({
4444
color: '#ffffff',

packages/eui/src/services/theme/emotion.test.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,11 @@ describe('EuiEmotionThemeProvider', () => {
2626
</EuiEmotionThemeProvider>
2727
);
2828

29-
expect(getByTestSubject('consumer')).toHaveStyleRule('color', '#0077CC');
29+
expect(getByTestSubject('consumer')).toHaveStyleRule('color', '#0B64DD');
3030

3131
expect(container.firstChild).toMatchInlineSnapshot(`
3232
<div
33-
class="css-1hfqh59"
33+
class="css-14koqkv"
3434
data-test-subj="consumer"
3535
>
3636
hello world
@@ -62,7 +62,7 @@ describe('EuiEmotionThemeProvider', () => {
6262
);
6363

6464
expect(getByTestSubject('consumer')).toHaveStyleRule('color', 'pink');
65-
expect(getByTestSubject('eui')).toHaveStyleRule('color', '#ba3d76');
65+
expect(getByTestSubject('eui')).toHaveStyleRule('color', '#A11262');
6666

6767
expect(container).toMatchInlineSnapshot(`
6868
<div>

packages/eui/src/services/theme/provider.test.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,15 +47,15 @@ describe('EuiThemeProvider', () => {
4747
</>
4848
);
4949

50-
expect(getByText('Light mode')).toHaveStyleRule('color', '#000000');
50+
expect(getByText('Light mode')).toHaveStyleRule('color', '#07101F');
5151
expect(getByText('Dark mode')).toHaveStyleRule('color', '#FFFFFF');
5252
expect(getByText('Inverse of light mode')).toHaveStyleRule(
5353
'color',
5454
'#FFFFFF'
5555
);
5656
expect(getByText('Inverse of dark mode')).toHaveStyleRule(
5757
'color',
58-
'#000000'
58+
'#07101F'
5959
);
6060
});
6161
});

packages/eui/src/services/theme/style_memoization.test.tsx

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ describe('useEuiMemoizedStyles', () => {
4646
const { getByRole } = render(<Component />);
4747

4848
expect(componentStyles).toHaveBeenCalledTimes(1);
49-
expect(getByRole('button')).toHaveStyleRule('color', '#006bb8');
49+
expect(getByRole('button')).toHaveStyleRule('color', '#1750BA');
5050

5151
fireEvent.click(getByRole('button'));
5252
expect(componentStyles).toHaveBeenCalledTimes(1);
@@ -59,15 +59,15 @@ describe('useEuiMemoizedStyles', () => {
5959
</EuiThemeProvider>
6060
);
6161
expect(componentStyles).toHaveBeenCalledTimes(1);
62-
expect(getByRole('button')).toHaveStyleRule('color', '#006bb8');
62+
expect(getByRole('button')).toHaveStyleRule('color', '#1750BA');
6363

6464
rerender(
6565
<EuiThemeProvider colorMode="dark">
6666
<Component />
6767
</EuiThemeProvider>
6868
);
6969
expect(componentStyles).toHaveBeenCalledTimes(2);
70-
expect(getByRole('button')).toHaveStyleRule('color', '#36a2ef');
70+
expect(getByRole('button')).toHaveStyleRule('color', '#61A2FF');
7171

7272
// Should not recompute styles if no theme changes
7373
rerender(
@@ -123,7 +123,7 @@ describe('withEuiStylesMemoizer', () => {
123123
const { getByRole } = render(<Component />);
124124

125125
expect(componentStyles).toHaveBeenCalledTimes(1);
126-
expect(getByRole('button')).toHaveStyleRule('color', '#bd271e');
126+
expect(getByRole('button')).toHaveStyleRule('color', '#A71627');
127127

128128
fireEvent.click(getByRole('button'));
129129
expect(componentStyles).toHaveBeenCalledTimes(1);
@@ -136,15 +136,15 @@ describe('withEuiStylesMemoizer', () => {
136136
</EuiThemeProvider>
137137
);
138138
expect(componentStyles).toHaveBeenCalledTimes(1);
139-
expect(getByRole('button')).toHaveStyleRule('color', '#bd271e');
139+
expect(getByRole('button')).toHaveStyleRule('color', '#A71627');
140140

141141
rerender(
142142
<EuiThemeProvider colorMode="dark">
143143
<Component />
144144
</EuiThemeProvider>
145145
);
146146
expect(componentStyles).toHaveBeenCalledTimes(2);
147-
expect(getByRole('button')).toHaveStyleRule('color', '#f86b63');
147+
expect(getByRole('button')).toHaveStyleRule('color', '#F6726A');
148148

149149
// Should not recompute styles if no theme changes
150150
rerender(
@@ -192,7 +192,7 @@ describe('RenderWithEuiStylesMemoizer', () => {
192192
const { getByRole } = render(<Component<{ type: string }> />);
193193

194194
expect(componentStyles).toHaveBeenCalledTimes(1);
195-
expect(getByRole('button')).toHaveStyleRule('color', '#007871');
195+
expect(getByRole('button')).toHaveStyleRule('color', '#09724D');
196196

197197
fireEvent.click(getByRole('button'));
198198
expect(componentStyles).toHaveBeenCalledTimes(1);
@@ -205,15 +205,15 @@ describe('RenderWithEuiStylesMemoizer', () => {
205205
</EuiThemeProvider>
206206
);
207207
expect(componentStyles).toHaveBeenCalledTimes(1);
208-
expect(getByRole('button')).toHaveStyleRule('color', '#007871');
208+
expect(getByRole('button')).toHaveStyleRule('color', '#09724D');
209209

210210
rerender(
211211
<EuiThemeProvider colorMode="dark">
212212
<Component />
213213
</EuiThemeProvider>
214214
);
215215
expect(componentStyles).toHaveBeenCalledTimes(2);
216-
expect(getByRole('button')).toHaveStyleRule('color', '#7dded8');
216+
expect(getByRole('button')).toHaveStyleRule('color', '#24C292');
217217

218218
// Should not recompute styles if no theme changes
219219
rerender(

0 commit comments

Comments
 (0)