Skip to content

Commit d247aab

Browse files
committed
test(ui-codemods): add back tests for v10 codemods with a nice Vitest config
Update Vitest config so it can handle both Node and web tests, make codemod tests with less magic
1 parent 48b5a4a commit d247aab

File tree

16 files changed

+1717
-106
lines changed

16 files changed

+1717
-106
lines changed

package-lock.json

Lines changed: 31 additions & 51 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
/* eslint-disable */
2+
import { canvas, canvasHighContrast } from '@instructure/ui'
3+
4+
export const generateStyle = () => {
5+
return {
6+
logoSubtitle: {
7+
label: 'logoSubtitle',
8+
marginTop: '-3px'
9+
},
10+
optionWrapper: {
11+
label: 'optionWrapper',
12+
margin: '-0.5rem -0.75rem',
13+
padding: '0.5rem 0.75rem',
14+
border: '0 solid ' + canvas.colors.tiara,
15+
borderBottomWidth: '1px',
16+
display: 'flex',
17+
maxWidth: '100%',
18+
overflow: 'hidden',
19+
alignItems: 'center'
20+
},
21+
optionIcon: {
22+
label: 'optionIcon',
23+
width: '36px',
24+
height: '36px',
25+
backgroundColor: canvasHighContrast.colors.oxford,
26+
borderRadius: 100,
27+
flexShrink: 0,
28+
display: 'flex',
29+
justifyContent: 'center',
30+
alignItems: 'center'
31+
},
32+
truncateSingleLine: {
33+
overflow: 'hidden',
34+
whiteSpace: 'nowrap',
35+
textOverflow: 'ellipsis'
36+
}
37+
}
38+
}
39+
40+
export const generateComponentTheme = () => ({})
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
/* eslint-disable */
2+
import { canvas, canvasHighContrast } from '@instructure/ui'
3+
4+
export const generateStyle = () => {
5+
return {
6+
logoSubtitle: {
7+
label: 'logoSubtitle',
8+
marginTop: '-3px'
9+
},
10+
optionWrapper: {
11+
label: 'optionWrapper',
12+
margin: '-0.5rem -0.75rem',
13+
padding: '0.5rem 0.75rem',
14+
border: '0 solid ' + canvas.colors?.contrasts?.grey1214,
15+
borderBottomWidth: '1px',
16+
display: 'flex',
17+
maxWidth: '100%',
18+
overflow: 'hidden',
19+
alignItems: 'center'
20+
},
21+
optionIcon: {
22+
label: 'optionIcon',
23+
width: '36px',
24+
height: '36px',
25+
backgroundColor: canvasHighContrast.colors?.contrasts?.grey100100,
26+
borderRadius: 100,
27+
flexShrink: 0,
28+
display: 'flex',
29+
justifyContent: 'center',
30+
alignItems: 'center'
31+
},
32+
truncateSingleLine: {
33+
overflow: 'hidden',
34+
whiteSpace: 'nowrap',
35+
textOverflow: 'ellipsis'
36+
}
37+
}
38+
}
39+
40+
export const generateComponentTheme = () => ({})

0 commit comments

Comments
 (0)