Skip to content

Commit

Permalink
fix(nextjs): Enable failing storybook tests
Browse files Browse the repository at this point in the history
  • Loading branch information
ndcunningham committed Apr 5, 2024
1 parent 3b182e4 commit 10a9918
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ jobs:
- run:
command: |
sudo apt-get update
sudo apt-get install -y ca-certificates lsof
sudo apt-get install -y ca-certificates lsof libvips-dev
- browser-tools/install-chrome
- browser-tools/install-chromedriver
- install-sdkman
Expand Down
13 changes: 7 additions & 6 deletions e2e/next-extensions/src/next-storybook.test.ts
Original file line number Diff line number Diff line change
@@ -1,34 +1,35 @@
import {
checkFilesExist,
cleanupProject,
getPackageManagerCommand,
newProject,
runCLI,
tmpProjPath,
uniq,
} from '@nx/e2e/utils';
import { execSync } from 'node:child_process';

// TODO(katerina): Enable some time?
// This test fails because of sharp. In this PR I have included all related links to the issue.
xdescribe('Next.js Storybook', () => {
describe('Next.js Storybook', () => {
const appName = uniq('app');
beforeAll(() => {
newProject({
name: 'proj',
packageManager: 'npm',
packages: ['@nx/next'],
packages: ['@nx/next', '@nx/react'],
});
runCLI(
`generate @nx/next:app ${appName} --e2eTestRunner=none --project-name-and-root-format=as-provided --no-interactive`
);
runCLI(
`generate @nx/next:component Foo --directory=${appName}/components/foo/Foo.tsx --no-interactive`
`generate @nx/next:component foo --directory=${appName}/components/foo --nameAndDirectoryFormat=as-provided --no-interactive`
);
});

afterAll(() => cleanupProject());

it('should run a Next.js based Storybook setup', async () => {
runCLI(
`generate @nx/next:storybook-configuration ${appName} --generateStories --no-interactive`
`generate @nx/react:storybook-configuration ${appName} --no-interactive`
);
runCLI(`build-storybook ${appName}`);
checkFilesExist(`${appName}/storybook-static/index.html`);
Expand Down

0 comments on commit 10a9918

Please sign in to comment.