Skip to content

Commit

Permalink
fix(nx-plugin): use plugin name in e2e tests for running schematic
Browse files Browse the repository at this point in the history
replace the property name version with the plain version of the plugin name in the plugins e2e tests
in order to coincide with the generated schematic name

ISSUES CLOSED: nrwl#3933
  • Loading branch information
sebastiandg7 authored and Doginal committed Nov 25, 2020
1 parent 7a45b68 commit ca1d9f7
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ describe('<%= pluginName %> e2e', () => {
it('should create <%= pluginName %>', async (done) => {
const plugin = uniq('<%= pluginName %>');
ensureNxProject('<%= npmPackageName %>', '<%= pluginOutputPath %>');
await runNxCommandAsync(`generate <%=npmPackageName%>:<%= pluginPropertyName %> ${plugin}`);
await runNxCommandAsync(`generate <%=npmPackageName%>:<%= pluginName %> ${plugin}`);

const result = await runNxCommandAsync(`build ${plugin}`);
expect(result.stdout).toContain('Builder ran');
Expand All @@ -22,7 +22,7 @@ describe('<%= pluginName %> e2e', () => {
const plugin = uniq('<%= pluginName %>');
ensureNxProject('<%= npmPackageName %>', '<%= pluginOutputPath %>');
await runNxCommandAsync(
`generate <%=npmPackageName%>:<%= pluginPropertyName %> ${plugin} --directory subdir`
`generate <%=npmPackageName%>:<%= pluginName %> ${plugin} --directory subdir`
);
expect(() => checkFilesExist(`libs/subdir/${plugin}/src/index.ts`)).not.toThrow();
done();
Expand All @@ -34,7 +34,7 @@ describe('<%= pluginName %> e2e', () => {
const plugin = uniq('<%= pluginName %>');
ensureNxProject('<%= npmPackageName %>', '<%= pluginOutputPath %>');
await runNxCommandAsync(
`generate <%=npmPackageName%>:<%= pluginPropertyName %> ${plugin} --tags e2etag,e2ePackage`
`generate <%=npmPackageName%>:<%= pluginName %> ${plugin} --tags e2etag,e2ePackage`
);
const nxJson = readJson('nx.json');
expect(nxJson.projects[plugin].tags).toEqual(['e2etag', 'e2ePackage']);
Expand Down

0 comments on commit ca1d9f7

Please sign in to comment.