Skip to content

Commit 7f0f9f3

Browse files
feat(sb): Prep for v8 upgrade (#516)
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
1 parent d3750c2 commit 7f0f9f3

File tree

13 files changed

+70
-76
lines changed

13 files changed

+70
-76
lines changed
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
import { Meta } from '@storybook/blocks'
2+
3+
<Meta title="CedarJS" />
4+
5+
<div align="center">
6+
<img src="https://avatars2.githubusercontent.com/u/211931789?v=4" width="200" />
7+
8+
<h1 align="center">CedarJS</h1>
9+
</div>
10+
11+
_by Tom Preston-Werner, Peter Pistorius, Rob Cameron, David Price, Tobbe
12+
Lundberg and more than 400 amazing contributors._
13+
14+
**Cedar is an opinionated, full-stack, JavaScript/TypeScript web application
15+
framework designed to keep you moving fast as your app grows from side project
16+
to startup.**

__fixtures__/esm-test-project/web/src/Redwood.stories.mdx

Lines changed: 0 additions & 18 deletions
This file was deleted.
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
import { Meta } from '@storybook/blocks'
2+
3+
<Meta title="CedarJS" />
4+
5+
<div align="center">
6+
<img src="https://avatars2.githubusercontent.com/u/211931789?v=4" width="200" />
7+
8+
<h1 align="center">CedarJS</h1>
9+
</div>
10+
11+
_by Tom Preston-Werner, Peter Pistorius, Rob Cameron, David Price, Tobbe
12+
Lundberg and more than 400 amazing contributors._
13+
14+
**Cedar is an opinionated, full-stack, JavaScript/TypeScript web application
15+
framework designed to keep you moving fast as your app grows from side project
16+
to startup.**

__fixtures__/test-project/web/src/Redwood.stories.mdx

Lines changed: 0 additions & 18 deletions
This file was deleted.

packages/cli-packages/storybook-vite/src/__tests__/storybookConfigFixtures.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ describe('storybook config file fixtures', () => {
2020
stories: [
2121
\`\${importStatementPath(
2222
cedarProjectPaths.web.src
23-
)}/**/*.stories.@(js|jsx|ts|tsx|mdx)\`,
23+
)}/**/*.@(mdx|stories.@(js|jsx|ts|tsx))\`,
2424
],
2525
2626
addons: ['@storybook/addon-essentials'],

packages/cli-packages/storybook-vite/src/commands/templates/main.ts.template

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ const config: StorybookConfig = {
1010
stories: [
1111
`${importStatementPath(
1212
cedarProjectPaths.web.src
13-
)}/**/*.stories.@(js|jsx|ts|tsx|mdx)`,
13+
)}/**/*.@(mdx|stories.@(js|jsx|ts|tsx))`,
1414
],
1515

1616
addons: ['@storybook/addon-essentials'],

packages/storybook/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@
6464
"vite-plugin-node-polyfills": "0.23.0"
6565
},
6666
"devDependencies": {
67+
"@storybook/types": "7.6.20",
6768
"@types/node": "20.19.17",
6869
"tsx": "4.20.5",
6970
"typescript": "5.9.2",

tasks/smoke-tests/storybook/tests/storybook.spec.ts

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -117,26 +117,24 @@ test('Mocks current user, and updates UI while dev server is running', async ({
117117
await page.reload()
118118
}
119119

120-
const usernameRow = await page
120+
const usernameRow = page
121121
.frameLocator('#storybook-preview-iframe')
122122
.locator('*css=tr >> text=EMAIL')
123-
await expect(await usernameRow.innerHTML()).toBe(
123+
expect(await usernameRow.innerHTML()).toBe(
124124
'<td>EMAIL</td><td>ba@zinga.com</td>',
125125
)
126126

127-
const isAuthenticatedRow = await page
127+
const isAuthenticatedRow = page
128128
.frameLocator('#storybook-preview-iframe')
129129
.locator('*css=tr >> text=isAuthenticated')
130-
await expect(await isAuthenticatedRow.innerHTML()).toBe(
130+
expect(await isAuthenticatedRow.innerHTML()).toBe(
131131
'<td>isAuthenticated</td><td>true</td>',
132132
)
133133

134-
const isAdminRow = await page
134+
const isAdminRow = page
135135
.frameLocator('#storybook-preview-iframe')
136136
.locator('*css=tr >> text=Is Admin')
137-
await expect(await isAdminRow.innerHTML()).toBe(
138-
'<td>Is Admin</td><td>true</td>',
139-
)
137+
expect(await isAdminRow.innerHTML()).toBe('<td>Is Admin</td><td>true</td>')
140138
})
141139

142140
const MOCK_CURRENT_USER_CONTENT = `\
@@ -156,16 +154,16 @@ export const Primary: Story = {
156154
test('Loads MDX Stories', async ({ page }: PlaywrightTestArgs) => {
157155
await page.goto('/')
158156

159-
// Click Redwood link in left nav
160-
await page.locator('id=redwood--docs').click()
157+
// Click CedarJS link in left nav
158+
await page.locator('id=cedarjs--docs').click()
161159

162160
await expect(page).toHaveURL(
163-
`http://localhost:7910/?path=/docs/redwood--docs`,
161+
`http://localhost:7910/?path=/docs/cedarjs--docs`,
164162
)
165163

166164
await expect(
167165
page.frameLocator('#storybook-preview-iframe').locator('body'),
168166
).toContainText(
169-
'Redwood is an opinionated, full-stack, JavaScript/TypeScript web application framework designed to keep you moving fast as your app grows from side project to startup.',
167+
'Cedar is an opinionated, full-stack, JavaScript/TypeScript web application framework designed to keep you moving fast as your app grows from side project to startup.',
170168
)
171169
})
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
import { Meta } from '@storybook/blocks'
2+
3+
<Meta title="CedarJS" />
4+
5+
<div align="center">
6+
<img src="https://avatars2.githubusercontent.com/u/211931789?v=4" width="200" />
7+
8+
<h1 align="center">CedarJS</h1>
9+
</div>
10+
11+
_by Tom Preston-Werner, Peter Pistorius, Rob Cameron, David Price, Tobbe
12+
Lundberg and more than 400 amazing contributors._
13+
14+
**Cedar is an opinionated, full-stack, JavaScript/TypeScript web application
15+
framework designed to keep you moving fast as your app grows from side project
16+
to startup.**

tasks/test-project/codemods/Redwood.stories.mdx

Lines changed: 0 additions & 18 deletions
This file was deleted.

0 commit comments

Comments
 (0)