Skip to content

Commit

Permalink
Merge pull request #22379 from storybookjs/valentin/add-angular-prere…
Browse files Browse the repository at this point in the history
…lease-sandbox

Add Angular Prerelease sandbox
  • Loading branch information
valentinpalkovic authored May 4, 2023
2 parents c53db1f + a19905f commit 7e57324
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 15 deletions.
10 changes: 5 additions & 5 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -701,30 +701,30 @@ workflows:
requires:
- build
- create-sandboxes:
parallelism: 31
parallelism: 32
requires:
- build
# - smoke-test-sandboxes: # disabled for now
# requires:
# - create-sandboxes
- build-sandboxes:
parallelism: 31
parallelism: 32
requires:
- create-sandboxes
- chromatic-sandboxes:
parallelism: 31
parallelism: 32
requires:
- build-sandboxes
- e2e-production:
parallelism: 31
parallelism: 32
requires:
- build-sandboxes
- e2e-dev:
parallelism: 4
requires:
- create-sandboxes
- test-runner-production:
parallelism: 31
parallelism: 32
requires:
- build-sandboxes
# TODO: reenable once we find out the source of flakyness
Expand Down
15 changes: 8 additions & 7 deletions code/e2e-tests/framework-nextjs.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,22 +28,23 @@ test.describe('Next.js', () => {
sbPage = new SbPage(page);
});

test('should lazy load images by default', async () => {
// TODO: Test is flaky, investigate why
test.skip('should lazy load images by default', async () => {
await sbPage.navigateToStory('frameworks/nextjs/Image', 'lazy');

const img = sbPage.previewRoot().locator('img');

expect(await img.evaluate<boolean, HTMLImageElement>((image) => image.complete)).toBeFalsy();
});

// TODO: Test is very flaky, investigate why
// test('should eager load images when loading parameter is set to eager', async () => {
// await sbPage.navigateToStory('frameworks/nextjs/Image', 'eager');
// TODO: Test is flaky, investigate why
test.skip('should eager load images when loading parameter is set to eager', async () => {
await sbPage.navigateToStory('frameworks/nextjs/Image', 'eager');

// const img = sbPage.previewRoot().locator('img');
const img = sbPage.previewRoot().locator('img');

// expect(await img.evaluate<boolean, HTMLImageElement>((image) => image.complete)).toBeTruthy();
// });
expect(await img.evaluate<boolean, HTMLImageElement>((image) => image.complete)).toBeTruthy();
});
});

test.describe('next/navigation', () => {
Expand Down
4 changes: 1 addition & 3 deletions code/lib/cli/src/sandbox-templates.ts
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,6 @@ const baseTemplates = {
builder: '@storybook/builder-webpack5',
},
skipTasks: ['e2e-tests-dev'],
inDevelopment: true,
},
'angular-cli/default-ts': {
name: 'Angular CLI (latest)',
Expand Down Expand Up @@ -473,8 +472,6 @@ export const allTemplates: Record<TemplateKey, Template> = {
export const ci: TemplateKey[] = ['cra/default-ts', 'react-vite/default-ts'];
export const pr: TemplateKey[] = [
...ci,
// TODO: add this after the sandbox is ready in the sandboxes repo
// 'angular-cli/prerelease',
'angular-cli/default-ts',
'vue3-vite/default-ts',
'vue-cli/vue2-default-js',
Expand All @@ -497,6 +494,7 @@ export const merged: TemplateKey[] = [
];
export const daily: TemplateKey[] = [
...merged,
'angular-cli/prerelease',
'cra/default-js',
'react-vite/default-js',
'vue3-vite/default-js',
Expand Down

0 comments on commit 7e57324

Please sign in to comment.