Skip to content

Commit db34389

Browse files
committed
chore(storybook): Add missing fonts and delete preview-head
1 parent 71e13a7 commit db34389

File tree

4 files changed

+7
-1
lines changed

4 files changed

+7
-1
lines changed

.storybook/manager-head.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<!-- Replace "Storybook" with custom document title -->
22
<script>
3-
setTimeout(function() {
3+
setTimeout(function () {
44
document.title = 'Box UI Elements';
55
}, 1000);
66
</script>

.storybook/preview-head.html

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
<link rel="preload" href="https://cdn01.boxcdn.net/fonts/1.0.17/lato/fonts.css" as="style" crossorigin="anonymous" />
2+
13
<link
24
rel="preload"
35
href="https://cdn01.boxcdn.net/fonts/1.0.17/lato/Lato-Regular.woff"

.storybook/preview.tsx

+1
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ const preview = {
3131
},
3232
},
3333
},
34+
assetDomains: ['cdn01.boxcdn.net'],
3435
},
3536
controls: {
3637
matchers: {

src/elements/content-explorer/stories/tests/ContentExplorer-visual.stories.js

+3
Original file line numberDiff line numberDiff line change
@@ -244,6 +244,9 @@ export const searchEmptyState = {
244244
},
245245
play: async ({ canvasElement }) => {
246246
const canvas = within(canvasElement);
247+
await waitFor(() => {
248+
expect(canvas.getByText('test')).toBeInTheDocument();
249+
});
247250
const searchBar = canvas.getByRole('searchbox', { name: 'Search files and folders' });
248251
await userEvent.type(searchBar, 'foo');
249252

0 commit comments

Comments
 (0)