Skip to content

Commit c0cf81c

Browse files
committed
Fix tests
1 parent 016d5af commit c0cf81c

File tree

5 files changed

+34
-33
lines changed

5 files changed

+34
-33
lines changed

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
99
* *Nothing*
1010

1111
### Changed
12-
* Update to shlink-frontend-kit 1.0.0
12+
* [#661](https://github.com/shlinkio/shlink-web-component/issues/661) Update to shlink-frontend-kit 1.0.0
1313
* No longer use `!important` with tailwind styles
1414

1515
### Deprecated

test/tags/helpers/Tag.test.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import { renderWithEvents } from '../../__helpers__/setUpTest';
1111
describe('<Tag />', () => {
1212
const onClick = vi.fn();
1313
const onClose = vi.fn();
14-
const stylesForKey = vi.fn(() => ({ backgroundColor: brandColor() }));
14+
const stylesForKey = vi.fn(() => ({ backgroundColor: brandColor() as string }));
1515
const colorGenerator = fromPartial<ColorGenerator>({ stylesForKey });
1616
const setUp = (text: string, clearable?: boolean, children?: ReactNode) => {
1717
const props = !clearable ? { onClick } : { onClose };

test/utils/services/ColorGenerator.test.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { brandColor } from '@shlinkio/shlink-frontend-kit';
1+
import { BRAND_COLOR_DM, BRAND_COLOR_LM } from '@shlinkio/shlink-frontend-kit';
22
import { fromPartial } from '@total-typescript/shoehorn';
33
import { ColorGenerator } from '../../../src/utils/services/ColorGenerator';
44
import type { TagColorsStorage } from '../../../src/utils/services/TagColorsStorage';
@@ -47,7 +47,8 @@ describe('ColorGenerator', () => {
4747

4848
describe('stylesForKey', () => {
4949
it.each([
50-
[brandColor(), '#222'],
50+
[BRAND_COLOR_LM, '#fff'],
51+
[BRAND_COLOR_DM, '#222'],
5152
['#8A661C', '#fff'],
5253
['#F7BE05', '#222'],
5354
['#5A02D8', '#fff'],

test/visits/__snapshots__/VisitsStats.test.tsx.snap

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -506,7 +506,7 @@ exports[`<VisitsStats /> > loads visits when mounted 1`] = `
506506
d="M65,5L795,265"
507507
fill="none"
508508
height="260"
509-
stroke="#4696e5"
509+
stroke="#2078CF"
510510
stroke-width="2"
511511
width="730"
512512
/>
@@ -523,7 +523,7 @@ exports[`<VisitsStats /> > loads visits when mounted 1`] = `
523523
fill="#fff"
524524
height="260"
525525
r="3"
526-
stroke="#4696e5"
526+
stroke="#2078CF"
527527
stroke-width="2"
528528
width="730"
529529
/>
@@ -534,7 +534,7 @@ exports[`<VisitsStats /> > loads visits when mounted 1`] = `
534534
fill="#fff"
535535
height="260"
536536
r="3"
537-
stroke="#4696e5"
537+
stroke="#2078CF"
538538
stroke-width="2"
539539
width="730"
540540
/>
@@ -567,7 +567,7 @@ exports[`<VisitsStats /> > loads visits when mounted 1`] = `
567567
>
568568
<div
569569
class="inline-block w-[20px] h-[20px] rounded-full align-[-4px] mr-1.5"
570-
style="background-color: rgb(70, 150, 229);"
570+
style="background-color: rgb(32, 120, 207);"
571571
/>
572572
<strong>
573573
Visits
@@ -1088,7 +1088,7 @@ exports[`<VisitsStats /> > loads visits when mounted 2`] = `
10881088
d="M65,5L795,265"
10891089
fill="none"
10901090
height="260"
1091-
stroke="#4696e5"
1091+
stroke="#2078CF"
10921092
stroke-width="2"
10931093
width="730"
10941094
/>
@@ -1105,7 +1105,7 @@ exports[`<VisitsStats /> > loads visits when mounted 2`] = `
11051105
fill="#fff"
11061106
height="260"
11071107
r="3"
1108-
stroke="#4696e5"
1108+
stroke="#2078CF"
11091109
stroke-width="2"
11101110
width="730"
11111111
/>
@@ -1116,7 +1116,7 @@ exports[`<VisitsStats /> > loads visits when mounted 2`] = `
11161116
fill="#fff"
11171117
height="260"
11181118
r="3"
1119-
stroke="#4696e5"
1119+
stroke="#2078CF"
11201120
stroke-width="2"
11211121
width="730"
11221122
/>
@@ -1149,7 +1149,7 @@ exports[`<VisitsStats /> > loads visits when mounted 2`] = `
11491149
>
11501150
<div
11511151
class="inline-block w-[20px] h-[20px] rounded-full align-[-4px] mr-1.5"
1152-
style="background-color: rgb(70, 150, 229);"
1152+
style="background-color: rgb(32, 120, 207);"
11531153
/>
11541154
<strong>
11551155
Visits
@@ -1670,7 +1670,7 @@ exports[`<VisitsStats /> > loads visits when mounted 3`] = `
16701670
d="M65,5L795,265"
16711671
fill="none"
16721672
height="260"
1673-
stroke="#4696e5"
1673+
stroke="#2078CF"
16741674
stroke-width="2"
16751675
width="730"
16761676
/>
@@ -1687,7 +1687,7 @@ exports[`<VisitsStats /> > loads visits when mounted 3`] = `
16871687
fill="#fff"
16881688
height="260"
16891689
r="3"
1690-
stroke="#4696e5"
1690+
stroke="#2078CF"
16911691
stroke-width="2"
16921692
width="730"
16931693
/>
@@ -1698,7 +1698,7 @@ exports[`<VisitsStats /> > loads visits when mounted 3`] = `
16981698
fill="#fff"
16991699
height="260"
17001700
r="3"
1701-
stroke="#4696e5"
1701+
stroke="#2078CF"
17021702
stroke-width="2"
17031703
width="730"
17041704
/>
@@ -1731,7 +1731,7 @@ exports[`<VisitsStats /> > loads visits when mounted 3`] = `
17311731
>
17321732
<div
17331733
class="inline-block w-[20px] h-[20px] rounded-full align-[-4px] mr-1.5"
1734-
style="background-color: rgb(70, 150, 229);"
1734+
style="background-color: rgb(32, 120, 207);"
17351735
/>
17361736
<strong>
17371737
Visits
@@ -2252,7 +2252,7 @@ exports[`<VisitsStats /> > loads visits when mounted 4`] = `
22522252
d="M65,5L795,265"
22532253
fill="none"
22542254
height="260"
2255-
stroke="#4696e5"
2255+
stroke="#2078CF"
22562256
stroke-width="2"
22572257
width="730"
22582258
/>
@@ -2269,7 +2269,7 @@ exports[`<VisitsStats /> > loads visits when mounted 4`] = `
22692269
fill="#fff"
22702270
height="260"
22712271
r="3"
2272-
stroke="#4696e5"
2272+
stroke="#2078CF"
22732273
stroke-width="2"
22742274
width="730"
22752275
/>
@@ -2280,7 +2280,7 @@ exports[`<VisitsStats /> > loads visits when mounted 4`] = `
22802280
fill="#fff"
22812281
height="260"
22822282
r="3"
2283-
stroke="#4696e5"
2283+
stroke="#2078CF"
22842284
stroke-width="2"
22852285
width="730"
22862286
/>
@@ -2358,7 +2358,7 @@ exports[`<VisitsStats /> > loads visits when mounted 4`] = `
23582358
>
23592359
<div
23602360
class="inline-block w-[20px] h-[20px] rounded-full align-[-4px] mr-1.5"
2361-
style="background-color: rgb(70, 150, 229);"
2361+
style="background-color: rgb(32, 120, 207);"
23622362
/>
23632363
<strong>
23642364
Visits
@@ -2893,7 +2893,7 @@ exports[`<VisitsStats /> > loads visits when mounted 5`] = `
28932893
d="M65,5L795,265"
28942894
fill="none"
28952895
height="260"
2896-
stroke="#4696e5"
2896+
stroke="#2078CF"
28972897
stroke-width="2"
28982898
width="730"
28992899
/>
@@ -2910,7 +2910,7 @@ exports[`<VisitsStats /> > loads visits when mounted 5`] = `
29102910
fill="#fff"
29112911
height="260"
29122912
r="3"
2913-
stroke="#4696e5"
2913+
stroke="#2078CF"
29142914
stroke-width="2"
29152915
width="730"
29162916
/>
@@ -2921,7 +2921,7 @@ exports[`<VisitsStats /> > loads visits when mounted 5`] = `
29212921
fill="#fff"
29222922
height="260"
29232923
r="3"
2924-
stroke="#4696e5"
2924+
stroke="#2078CF"
29252925
stroke-width="2"
29262926
width="730"
29272927
/>
@@ -2999,7 +2999,7 @@ exports[`<VisitsStats /> > loads visits when mounted 5`] = `
29992999
>
30003000
<div
30013001
class="inline-block w-[20px] h-[20px] rounded-full align-[-4px] mr-1.5"
3002-
style="background-color: rgb(70, 150, 229);"
3002+
style="background-color: rgb(32, 120, 207);"
30033003
/>
30043004
<strong>
30053005
Visits
@@ -3534,7 +3534,7 @@ exports[`<VisitsStats /> > loads visits when mounted 6`] = `
35343534
d="M65,5L795,265"
35353535
fill="none"
35363536
height="260"
3537-
stroke="#4696e5"
3537+
stroke="#2078CF"
35383538
stroke-width="2"
35393539
width="730"
35403540
/>
@@ -3551,7 +3551,7 @@ exports[`<VisitsStats /> > loads visits when mounted 6`] = `
35513551
fill="#fff"
35523552
height="260"
35533553
r="3"
3554-
stroke="#4696e5"
3554+
stroke="#2078CF"
35553555
stroke-width="2"
35563556
width="730"
35573557
/>
@@ -3562,7 +3562,7 @@ exports[`<VisitsStats /> > loads visits when mounted 6`] = `
35623562
fill="#fff"
35633563
height="260"
35643564
r="3"
3565-
stroke="#4696e5"
3565+
stroke="#2078CF"
35663566
stroke-width="2"
35673567
width="730"
35683568
/>
@@ -3640,7 +3640,7 @@ exports[`<VisitsStats /> > loads visits when mounted 6`] = `
36403640
>
36413641
<div
36423642
class="inline-block w-[20px] h-[20px] rounded-full align-[-4px] mr-1.5"
3643-
style="background-color: rgb(70, 150, 229);"
3643+
style="background-color: rgb(32, 120, 207);"
36443644
/>
36453645
<strong>
36463646
Visits

test/visits/charts/__snapshots__/LineChartCard.test.tsx.snap

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -369,7 +369,7 @@ exports[`<LineChartCard /> > renders chart with expected data 2`] = `
369369
>
370370
<div
371371
class="inline-block w-[20px] h-[20px] rounded-full align-[-4px] mr-1.5"
372-
style="background-color: rgb(70, 150, 229);"
372+
style="background-color: rgb(32, 120, 207);"
373373
/>
374374
<strong>
375375
v
@@ -916,7 +916,7 @@ exports[`<LineChartCard /> > renders chart with expected data 3`] = `
916916
d="M65,5L795,365"
917917
fill="none"
918918
height="360"
919-
stroke="#4696e5"
919+
stroke="#2078CF"
920920
stroke-dasharray="0px 813.9410400390625px"
921921
stroke-width="2"
922922
width="730"
@@ -947,7 +947,7 @@ exports[`<LineChartCard /> > renders chart with expected data 3`] = `
947947
>
948948
<div
949949
class="inline-block w-[20px] h-[20px] rounded-full align-[-4px] mr-1.5"
950-
style="background-color: rgb(70, 150, 229);"
950+
style="background-color: rgb(32, 120, 207);"
951951
/>
952952
<strong>
953953
v
@@ -1480,7 +1480,7 @@ exports[`<LineChartCard /> > renders chart with expected data 4`] = `
14801480
d="M65,5L795,365"
14811481
fill="none"
14821482
height="360"
1483-
stroke="#4696e5"
1483+
stroke="#2078CF"
14841484
stroke-dasharray="0px 813.9410400390625px"
14851485
stroke-width="2"
14861486
width="730"
@@ -1539,7 +1539,7 @@ exports[`<LineChartCard /> > renders chart with expected data 4`] = `
15391539
>
15401540
<div
15411541
class="inline-block w-[20px] h-[20px] rounded-full align-[-4px] mr-1.5"
1542-
style="background-color: rgb(70, 150, 229);"
1542+
style="background-color: rgb(32, 120, 207);"
15431543
/>
15441544
<strong>
15451545
v

0 commit comments

Comments
 (0)