@linktr.ee/messaging-react 4.1.7-rc-1787202056 → 4.1.7-rc-1787202545
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@linktr.ee/messaging-react",
|
|
3
|
-
"version": "4.1.7-rc-
|
|
3
|
+
"version": "4.1.7-rc-1787202545",
|
|
4
4
|
"description": "React messaging components built on messaging-core for web applications",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.cjs",
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
"chromatic:local": "yarn storybook:build && chromatic"
|
|
51
51
|
},
|
|
52
52
|
"dependencies": {
|
|
53
|
-
"@linktr.ee/messaging-core": "2.5.0-rc-
|
|
53
|
+
"@linktr.ee/messaging-core": "2.5.0-rc-1787202545",
|
|
54
54
|
"@linktr.ee/messaging-taxonomy": "^0.10.0",
|
|
55
55
|
"@phosphor-icons/react": "^2.1.10"
|
|
56
56
|
},
|
|
@@ -41,26 +41,47 @@ describe('DownloadAction', () => {
|
|
|
41
41
|
}
|
|
42
42
|
)
|
|
43
43
|
|
|
44
|
-
it('allows iconOnly to
|
|
44
|
+
it('allows iconOnly to control the pill label', () => {
|
|
45
45
|
const { rerender } = renderWithProviders(
|
|
46
46
|
<DownloadAction url="/file.pdf" label="Save" iconOnly />
|
|
47
47
|
)
|
|
48
48
|
expect(screen.getByRole('button', { name: 'Save' })).not.toHaveTextContent(
|
|
49
49
|
'Save'
|
|
50
50
|
)
|
|
51
|
-
rerender(
|
|
52
|
-
|
|
53
|
-
url="/file.pdf"
|
|
54
|
-
variant="viewer"
|
|
55
|
-
label="Save"
|
|
56
|
-
iconOnly={false}
|
|
57
|
-
/>
|
|
58
|
-
)
|
|
59
|
-
expect(screen.getByRole('button', { name: 'Save' })).not.toHaveTextContent(
|
|
51
|
+
rerender(<DownloadAction url="/file.pdf" label="Save" iconOnly={false} />)
|
|
52
|
+
expect(screen.getByRole('button', { name: 'Save' })).toHaveTextContent(
|
|
60
53
|
'Save'
|
|
61
54
|
)
|
|
62
55
|
})
|
|
63
56
|
|
|
57
|
+
it.each(['inline', 'viewer'] as const)(
|
|
58
|
+
'keeps the %s label visually hidden regardless of iconOnly',
|
|
59
|
+
(variant) => {
|
|
60
|
+
const { rerender } = renderWithProviders(
|
|
61
|
+
<DownloadAction
|
|
62
|
+
url="/file.pdf"
|
|
63
|
+
variant={variant}
|
|
64
|
+
label="Save"
|
|
65
|
+
iconOnly={false}
|
|
66
|
+
/>
|
|
67
|
+
)
|
|
68
|
+
expect(
|
|
69
|
+
screen.getByRole('button', { name: 'Save' })
|
|
70
|
+
).not.toHaveTextContent('Save')
|
|
71
|
+
rerender(
|
|
72
|
+
<DownloadAction
|
|
73
|
+
url="/file.pdf"
|
|
74
|
+
variant={variant}
|
|
75
|
+
label="Save"
|
|
76
|
+
iconOnly
|
|
77
|
+
/>
|
|
78
|
+
)
|
|
79
|
+
expect(
|
|
80
|
+
screen.getByRole('button', { name: 'Save' })
|
|
81
|
+
).not.toHaveTextContent('Save')
|
|
82
|
+
}
|
|
83
|
+
)
|
|
84
|
+
|
|
64
85
|
it('stops propagation and calls the download once', async () => {
|
|
65
86
|
const outerClick = vi.fn()
|
|
66
87
|
renderWithProviders(
|