chore(testing): fix broken nx-plugin e2e test (#6002)
This commit is contained in:
parent
d4537f75cc
commit
a9945e2946
@ -1,6 +1,7 @@
|
||||
import {
|
||||
checkFilesExist,
|
||||
expectTestsPass,
|
||||
killPorts,
|
||||
newProject,
|
||||
readJson,
|
||||
runCLI,
|
||||
@ -60,9 +61,9 @@ describe('Nx Plugin', () => {
|
||||
runCLI(`generate @nrwl/nx-plugin:plugin ${plugin} --linter=eslint`);
|
||||
|
||||
if (runCypressTests()) {
|
||||
const results = await runCLIAsync(`e2e ${plugin}-e2e`);
|
||||
expect(results.stdout).toContain('Compiling TypeScript files');
|
||||
expectTestsPass(results);
|
||||
const e2eResults = runCLI(`e2e ${plugin}-e2e --no-watch --headless`);
|
||||
expect(e2eResults).toContain('Running target "e2e" succeeded');
|
||||
expect(await killPorts()).toBeTruthy();
|
||||
}
|
||||
}, 250000);
|
||||
|
||||
|
||||
@ -13,7 +13,7 @@ describe('<%= pluginName %> e2e', () => {
|
||||
|
||||
const result = await runNxCommandAsync(`build ${plugin}`);
|
||||
expect(result.stdout).toContain('Executor ran');
|
||||
}, 10000)
|
||||
}, 30000)
|
||||
|
||||
describe('--directory', () => {
|
||||
it('should create src in the specified directory', async () => {
|
||||
@ -23,7 +23,7 @@ describe('<%= pluginName %> e2e', () => {
|
||||
`generate <%=npmPackageName%>:<%= pluginName %> ${plugin} --directory subdir`
|
||||
);
|
||||
expect(() => checkFilesExist(`libs/subdir/${plugin}/src/index.ts`)).not.toThrow();
|
||||
}, 10000);
|
||||
}, 30000);
|
||||
});
|
||||
|
||||
describe('--tags', () => {
|
||||
@ -35,6 +35,6 @@ describe('<%= pluginName %> e2e', () => {
|
||||
);
|
||||
const nxJson = readJson('nx.json');
|
||||
expect(nxJson.projects[plugin].tags).toEqual(['e2etag', 'e2ePackage']);
|
||||
}, 10000);
|
||||
}, 30000);
|
||||
});
|
||||
})
|
||||
18
yarn.lock
18
yarn.lock
@ -16463,6 +16463,16 @@ markdown-to-jsx@^7.1.0:
|
||||
resolved "https://registry.yarnpkg.com/markdown-to-jsx/-/markdown-to-jsx-7.1.2.tgz#19d3da4cd8864045cdd13a0d179147fbd6a088d4"
|
||||
integrity sha512-O8DMCl32V34RrD+ZHxcAPc2+kYytuDIoQYjY36RVdsLK7uHjgNVvFec4yv0X6LgB4YEZgSvK5QtFi5YVqEpoMA==
|
||||
|
||||
marked@2.0.1:
|
||||
version "2.0.1"
|
||||
resolved "https://registry.yarnpkg.com/marked/-/marked-2.0.1.tgz#5e7ed7009bfa5c95182e4eb696f85e948cefcee3"
|
||||
integrity sha512-5+/fKgMv2hARmMW7DOpykr2iLhl0NgjyELk5yn92iE7z8Se1IS9n3UsFm86hFXIkvMBmVxki8+ckcpjBeyo/hw==
|
||||
|
||||
marked@^2.0.1:
|
||||
version "2.0.7"
|
||||
resolved "https://registry.yarnpkg.com/marked/-/marked-2.0.7.tgz#bc5b857a09071b48ce82a1f7304913a993d4b7d1"
|
||||
integrity sha512-BJXxkuIfJchcXOJWTT2DOL+yFWifFv2yGYOUzvXg8Qz610QKw+sHCvTMYwA+qWGhlA2uivBezChZ/pBy1tWdkQ==
|
||||
|
||||
marked@^2.0.3:
|
||||
version "2.0.6"
|
||||
resolved "https://registry.yarnpkg.com/marked/-/marked-2.0.6.tgz#c3ab1403b9b70f26acd92590fc272eb1718e778c"
|
||||
@ -17980,10 +17990,10 @@ onigasm@^2.2.5:
|
||||
dependencies:
|
||||
lru-cache "^5.1.1"
|
||||
|
||||
open@8.0.7:
|
||||
version "8.0.7"
|
||||
resolved "https://registry.yarnpkg.com/open/-/open-8.0.7.tgz#5597eeff14b440f6ff78fb7ced9ede9f69b2122d"
|
||||
integrity sha512-qoyG0kpdaWVoL5MiwTRQWujSdivwBOgfLadVEdpsZNHOK1+kBvmVtLYdgWr8G4cgBpG9zaxezn6jz6PPdQW5xg==
|
||||
open@8.0.2:
|
||||
version "8.0.2"
|
||||
resolved "https://registry.yarnpkg.com/open/-/open-8.0.2.tgz#8c3e95cce93ba2fc8d99968ee8bfefecdb50b84f"
|
||||
integrity sha512-NV5QmWJrTaNBLHABJyrb+nd5dXI5zfea/suWawBhkHzAbVhLLiJdrqMgxMypGK9Eznp2Ltoh7SAVkQ3XAucX7Q==
|
||||
dependencies:
|
||||
define-lazy-prop "^2.0.0"
|
||||
is-docker "^2.1.1"
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user