Skip to content

Commit

Permalink
Merge branch 'next' into kasper/disable-whatsnew
Browse files Browse the repository at this point in the history
  • Loading branch information
kasperpeulen authored Jul 10, 2023
2 parents 552abe9 + 5f58f5c commit 56378d1
Show file tree
Hide file tree
Showing 52 changed files with 1,490 additions and 1,006 deletions.
20 changes: 10 additions & 10 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -593,27 +593,27 @@ workflows:
requires:
- unit-tests
- create-sandboxes:
parallelism: 20
parallelism: 19
requires:
- build
- build-sandboxes:
parallelism: 20
parallelism: 19
requires:
- create-sandboxes
- chromatic-sandboxes:
parallelism: 18
parallelism: 17
requires:
- build-sandboxes
- e2e-production:
parallelism: 18
parallelism: 17
requires:
- build-sandboxes
- e2e-dev:
parallelism: 4
requires:
- create-sandboxes
- test-runner-production:
parallelism: 18
parallelism: 17
requires:
- build-sandboxes
- bench:
Expand Down Expand Up @@ -647,30 +647,30 @@ workflows:
requires:
- build
- create-sandboxes:
parallelism: 34
parallelism: 33
requires:
- build
# - smoke-test-sandboxes: # disabled for now
# requires:
# - create-sandboxes
- build-sandboxes:
parallelism: 34
parallelism: 33
requires:
- create-sandboxes
- chromatic-sandboxes:
parallelism: 32
parallelism: 31
requires:
- build-sandboxes
- e2e-production:
parallelism: 32
parallelism: 31
requires:
- build-sandboxes
- e2e-dev:
parallelism: 4
requires:
- create-sandboxes
- test-runner-production:
parallelism: 32
parallelism: 31
requires:
- build-sandboxes
# TODO: reenable once we find out the source of flakyness
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/prepare-patch-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,8 @@ jobs:
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
git config --global user.name 'github-actions[bot]'
git config --global user.email 'github-actions[bot]@users.noreply.github.com'
git config --global user.name 'storybook-bot'
git config --global user.email '32066757+storybook-bot@users.noreply.github.com'
yarn release:pick-patches
- name: Bump version
Expand Down Expand Up @@ -117,8 +117,8 @@ jobs:
- name: 'Commit changes to branch: version-patch-from-${{ steps.versions.outputs.current }}'
working-directory: .
run: |
git config --global user.name 'github-actions[bot]'
git config --global user.email 'github-actions[bot]@users.noreply.github.com'
git config --global user.name 'storybook-bot'
git config --global user.email '32066757+storybook-bot@users.noreply.github.com'
git checkout -b version-patch-from-${{ steps.versions.outputs.current }}
git add .
git commit -m "Bump version from ${{ steps.versions.outputs.current }} to ${{ steps.versions.outputs.next }}" || true
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/prepare-prerelease.yml
Original file line number Diff line number Diff line change
Expand Up @@ -121,8 +121,8 @@ jobs:
- name: 'Commit changes to branch: version-prerelease-from-${{ steps.bump-version.outputs.current-version }}'
working-directory: .
run: |
git config --global user.name 'github-actions[bot]'
git config --global user.email 'github-actions[bot]@users.noreply.github.com'
git config --global user.name 'storybook-bot'
git config --global user.email '32066757+storybook-bot@users.noreply.github.com'
git checkout -b version-prerelease-from-${{ steps.bump-version.outputs.current-version }}
git add .
git commit -m "Bump version from ${{ steps.bump-version.outputs.current-version }} to ${{ steps.bump-version.outputs.next-version }}" || true
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -112,8 +112,8 @@ jobs:
- name: Merge ${{ github.ref_name }} into ${{ steps.target.outputs.target }}
run: |
git config --global user.name "github-actions[bot]"
git config --global user.email "github-actions[bot]@users.noreply.github.com"
git config --global user.name "storybook-bot"
git config --global user.email "32066757+storybook-bot@users.noreply.github.com"
git fetch origin ${{ steps.target.outputs.target }}
git checkout ${{ steps.target.outputs.target }}
git merge ${{ github.ref_name }}
Expand Down
3 changes: 2 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,5 +51,6 @@
"*.js": "javascriptreact"
},
"prettier.ignorePath": "./code/.prettierignore",
"typescript.tsdk": "./code/node_modules/typescript/lib"
"typescript.tsdk": "./code/node_modules/typescript/lib",
"storyExplorer.storybookConfigDir": "./code/ui/.storybook"
}
5 changes: 5 additions & 0 deletions code/e2e-tests/addon-actions.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@ import { SbPage } from './util';
const storybookUrl = process.env.STORYBOOK_URL || 'http://localhost:8001';

test.describe('addon-actions', () => {
test.afterEach(async ({ page }) => {
await page.evaluate(() => window.localStorage.clear());
await page.evaluate(() => window.sessionStorage.clear());
});

test.beforeEach(async ({ page }) => {
await page.goto(storybookUrl);
await new SbPage(page).waitUntilLoaded();
Expand Down
5 changes: 5 additions & 0 deletions code/e2e-tests/addon-backgrounds.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@ const storybookUrl = process.env.STORYBOOK_URL || 'http://localhost:8001';
const templateName = process.env.STORYBOOK_TEMPLATE_NAME;

test.describe('addon-backgrounds', () => {
test.afterEach(async ({ page }) => {
await page.evaluate(() => window.localStorage.clear());
await page.evaluate(() => window.sessionStorage.clear());
});

test.beforeEach(async ({ page }) => {
await page.goto(storybookUrl);
await new SbPage(page).waitUntilLoaded();
Expand Down
5 changes: 5 additions & 0 deletions code/e2e-tests/addon-controls.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@ import { SbPage } from './util';
const storybookUrl = process.env.STORYBOOK_URL || 'http://localhost:8001';

test.describe('addon-controls', () => {
test.afterEach(async ({ page }) => {
await page.evaluate(() => window.localStorage.clear());
await page.evaluate(() => window.sessionStorage.clear());
});

test('should change component when changing controls', async ({ page }) => {
await page.goto(storybookUrl);
const sbPage = new SbPage(page);
Expand Down
4 changes: 4 additions & 0 deletions code/e2e-tests/addon-docs.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@ test.describe('addon-docs', () => {
await page.goto(storybookUrl);
await new SbPage(page).waitUntilLoaded();
});
test.afterEach(async ({ page }) => {
await page.evaluate(() => window.localStorage.clear());
await page.evaluate(() => window.sessionStorage.clear());
});

test('should show descriptions for stories', async ({ page }) => {
const skipped = [
Expand Down
4 changes: 4 additions & 0 deletions code/e2e-tests/addon-interactions.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ test.describe('addon-interactions', () => {
await page.goto(storybookUrl);
await new SbPage(page).waitUntilLoaded();
});
test.afterEach(async ({ page }) => {
await page.evaluate(() => window.localStorage.clear());
await page.evaluate(() => window.sessionStorage.clear());
});

// FIXME: skip xxx
test('should have interactions', async ({ page }) => {
Expand Down
4 changes: 4 additions & 0 deletions code/e2e-tests/addon-viewport.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ test.describe('addon-viewport', () => {
await page.goto(storybookUrl);
await new SbPage(page).waitUntilLoaded();
});
test.afterEach(async ({ page }) => {
await page.evaluate(() => window.localStorage.clear());
await page.evaluate(() => window.sessionStorage.clear());
});

test('should have viewport button in the toolbar', async ({ page }) => {
const sbPage = new SbPage(page);
Expand Down
6 changes: 5 additions & 1 deletion code/e2e-tests/framework-nextjs.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,18 @@ test.describe('Next.js', () => {
// and this only tests nextjs/default-js
test.skip(
// eslint-disable-next-line jest/valid-title
!templateName.includes('nextjs/default-js'),
!templateName?.includes('nextjs/default-js'),
'Only run this test for the Frameworks that support next/navigation'
);

test.beforeEach(async ({ page }) => {
await page.goto(storybookUrl);
await new SbPage(page).waitUntilLoaded();
});
test.afterEach(async ({ page }) => {
await page.evaluate(() => window.localStorage.clear());
await page.evaluate(() => window.sessionStorage.clear());
});

test.describe('next/image', () => {
let sbPage: SbPage;
Expand Down
4 changes: 4 additions & 0 deletions code/e2e-tests/json-files.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ test.describe('JSON files', () => {
test.beforeEach(async ({ page }) => {
await page.goto(storybookUrl);
});
test.afterEach(async ({ page }) => {
await page.evaluate(() => window.localStorage.clear());
await page.evaluate(() => window.sessionStorage.clear());
});

test('should have index.json', async ({ page }) => {
test.skip(
Expand Down
7 changes: 4 additions & 3 deletions code/e2e-tests/manager.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,11 @@ test.describe('manager', () => {
test.beforeEach(async ({ page }) => {
await page.goto(storybookUrl);

await new SbPage(page).waitUntilLoaded();
});
test.afterEach(async ({ page }) => {
await page.evaluate(() => window.localStorage.clear());
await page.evaluate(() => window.sessionStorage.clear());

await new SbPage(page).waitUntilLoaded();
});

test('shortcuts sidebar', async ({ page }) => {
Expand Down Expand Up @@ -92,6 +93,6 @@ test.describe('manager', () => {
await expect(sbPage.page.url()).toContain('/settings/about');

await sbPage.page.locator('[title="Close settings page"]').click();
await expect(sbPage.page.url()).toContain('/docs/configure-your-project--docs');
await expect(sbPage.page.url()).not.toContain('/settings/about');
});
});
5 changes: 5 additions & 0 deletions code/e2e-tests/preview-web.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,13 @@ const storybookUrl = process.env.STORYBOOK_URL || 'http://localhost:8001';
test.describe('preview-web', () => {
test.beforeEach(async ({ page }) => {
await page.goto(storybookUrl);

await new SbPage(page).waitUntilLoaded();
});
test.afterEach(async ({ page }) => {
await page.evaluate(() => window.localStorage.clear());
await page.evaluate(() => window.sessionStorage.clear());
});

test('should pass over shortcuts, but not from play functions, story', async ({ page }) => {
const sbPage = new SbPage(page);
Expand Down
Loading

0 comments on commit 56378d1

Please sign in to comment.