From f48983def44f3e7d3734b785c045e1065531aa42 Mon Sep 17 00:00:00 2001 From: Nicholas Cunningham Date: Thu, 4 Apr 2024 12:16:26 -0600 Subject: [PATCH] fix(nextjs): Enable failing storybook tests --- .circleci/config.yml | 2 +- .nx/workflows/agents.yaml | 2 +- Cargo.lock | 4 ++-- e2e/next-extensions/src/next-storybook.test.ts | 13 +++++++------ 4 files changed, 11 insertions(+), 10 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index b9564435f9ab6d..736c0467fe597d 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -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 libglib2.0-dev libgirepository1.0-dev - browser-tools/install-chrome - browser-tools/install-chromedriver - install-sdkman diff --git a/.nx/workflows/agents.yaml b/.nx/workflows/agents.yaml index 419637500ea0f4..56cea00ce1d3e5 100644 --- a/.nx/workflows/agents.yaml +++ b/.nx/workflows/agents.yaml @@ -27,7 +27,7 @@ launch-templates: - name: Install e2e deps script: | sudo apt-get update - sudo apt-get install -y ca-certificates lsof + sudo apt-get install -y ca-certificates lsof libvips-dev libglib2.0-dev libgirepository1.0-dev - name: Install Pnpm script: | npm install -g pnpm@8.15.5 diff --git a/Cargo.lock b/Cargo.lock index 8258fbc20ed03d..a3b198d7ab2603 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -483,7 +483,7 @@ checksum = "25cbce373ec4653f1a01a31e8a5e5ec0c622dc27ff9c4e6606eefef5cbbed4a5" [[package]] name = "filedescriptor" version = "0.8.3" -source = "git+https://github.com/cammisuli/wezterm#3db3f2d05f7188af9c7527214605f18332fac06d" +source = "git+https://github.com/cammisuli/wezterm#b538ee29e1e89eeb4832fb35ae095564dce34c29" dependencies = [ "libc", "thiserror", @@ -1660,7 +1660,7 @@ dependencies = [ [[package]] name = "portable-pty" version = "0.8.1" -source = "git+https://github.com/cammisuli/wezterm#3db3f2d05f7188af9c7527214605f18332fac06d" +source = "git+https://github.com/cammisuli/wezterm#b538ee29e1e89eeb4832fb35ae095564dce34c29" dependencies = [ "anyhow", "bitflags 1.3.2", diff --git a/e2e/next-extensions/src/next-storybook.test.ts b/e2e/next-extensions/src/next-storybook.test.ts index 866fe445357611..53a2a26b5c38d0 100644 --- a/e2e/next-extensions/src/next-storybook.test.ts +++ b/e2e/next-extensions/src/next-storybook.test.ts @@ -1,26 +1,27 @@ 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` ); }); @@ -28,7 +29,7 @@ xdescribe('Next.js Storybook', () => { 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`);