Commit 482517c
committed
fix(types): use ButtonVariant & ButtonPresetTheme, fix playwright types
Fix "yarn typecheck":
```
$ yarn typecheck
yarn run v1.22.22
$ tsc --project ./tsconfig.json --noEmit
src/domain/headless-cms/components/__tests__/CmsPage.test.tsx:113:11 -
error TS2322: Type '"primary"' is not assignable to type
'ButtonVariant.Primary | ButtonVariant.Secondary | ButtonVariant.Success
| ButtonVariant.Danger | ButtonVariant.Clear | undefined'.
113 loadMoreButtonVariant: 'primary',
~~~~~~~~~~~~~~~~~~~~~
src/domain/headless-cms/components/__tests__/CmsPage.test.tsx:114:11 -
error TS2322: Type '"coat"' is not assignable to type 'ButtonPresetTheme
| ButtonTheme | undefined'.
114 loadMoreButtonTheme: 'coat',
~~~~~~~~~~~~~~~~~~~
src/playwright/tests/search.spec.ts:55:41 - error TS2345: Argument of
type '"Detaljerad sökning"' is not assignable to parameter of type
'SearchButton'.
55 await frontPageSv.clickSearchButton('Detaljerad sökning');
~~~~~~~~~~~~~~~~~~~~
src/playwright/tests/search.spec.ts:71:41 - error TS2345: Argument of
type '"Advanced search"' is not assignable to parameter of type
'SearchButton'.
71 await frontPageEn.clickSearchButton('Advanced search');
~~~~~~~~~~~~~~~~~
```
Refs: PT-4531 parent a0bc759 commit 482517c
2 files changed
Lines changed: 7 additions & 3 deletions
File tree
- src
- domain/headless-cms/components/__tests__
- playwright/pages
Lines changed: 3 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| 6 | + | |
6 | 7 | | |
7 | 8 | | |
8 | 9 | | |
| |||
110 | 111 | | |
111 | 112 | | |
112 | 113 | | |
113 | | - | |
114 | | - | |
| 114 | + | |
| 115 | + | |
115 | 116 | | |
116 | 117 | | |
117 | 118 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | | - | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
11 | 14 | | |
12 | 15 | | |
13 | 16 | | |
| |||
0 commit comments