Skip to content

Commit

Permalink
chore(misc): fix e2e tests
Browse files Browse the repository at this point in the history
  • Loading branch information
jaysoo committed May 1, 2024
1 parent 6c78231 commit 81687ee
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions e2e/cypress/src/cypress.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -154,10 +154,10 @@ export default defineConfig({
async () => {
const appName = uniq('next-cy-app');
runCLI(
`generate @nx/next:app ${appName} --e2eTestRunner=none --no-interactive`
`generate @nx/next:app ${appName} --directory=apps/${appName} --e2eTestRunner=none --no-interactive --projectNameAndRootFormat=as-provided`
);
runCLI(
`generate @nx/next:component btn --project=${appName} --no-interactive`
`generate @nx/next:component btn --project=${appName} --directory=apps/${appName}/components --nameAndDirectoryFormat=as-provided --no-interactive`
);
runCLI(
`generate @nx/next:cypress-component-configuration --project=${appName} --generate-tests --no-interactive`
Expand Down
4 changes: 2 additions & 2 deletions e2e/next/src/next-component-tests.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -118,10 +118,10 @@ function addBabelSupport(path: string) {

function createAppWithCt(appName: string) {
runCLI(
`generate @nx/next:app ${appName} --no-interactive --appDir=false --src=false`
`generate @nx/next:app ${appName} --directory=apps/${appName} --no-interactive --appDir=false --src=false --projectNameAndRootFormat=as-provided`
);
runCLI(
`generate @nx/next:component button --project=${appName} --directory=components --flat --no-interactive`
`generate @nx/next:component button --project=${appName} --directory=apps/${appName}/components --nameAndDirectoryFormat=as-provided --no-interactive`
);
createFile(
`apps/${appName}/public/data.json`,
Expand Down
4 changes: 2 additions & 2 deletions e2e/web/src/web.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -361,14 +361,14 @@ describe('index.html interpolation', () => {
</head>
<body>
<div id='root'></div>
<div>Nx Variable: %NX_VARIABLE%</div>
<div>Nx Variable: %NX_PUBLIC_VARIABLE%</div>
<div>Some other variable: %SOME_OTHER_VARIABLE%</div>
</body>
</html>
`;
const envFilePath = `apps/${appName}/.env`;
const envFileContents = `
NX_VARIABLE=foo
NX_PUBLIC_VARIABLE=foo
SOME_OTHER_VARIABLE=bar
}`;

Expand Down

0 comments on commit 81687ee

Please sign in to comment.