diff --git a/testing-projects/smoke-affected/nx-boot-gradle-smoke-affected/tests/nx-boot-gradle.spec.ts b/testing-projects/smoke-affected/nx-boot-gradle-smoke-affected/tests/nx-boot-gradle.spec.ts index aab9e095b..445222609 100644 --- a/testing-projects/smoke-affected/nx-boot-gradle-smoke-affected/tests/nx-boot-gradle.spec.ts +++ b/testing-projects/smoke-affected/nx-boot-gradle-smoke-affected/tests/nx-boot-gradle.spec.ts @@ -108,15 +108,19 @@ describe('@jnxplus/nx-gradle spring-boot smoke', () => { execSync(`git commit -am "chore: scaffold projects"`, execSyncOptions()); - const affected = execSync( - 'npx nx show projects --affected', + execSync( + `npx nx graph --affected --file=dep-graph-affected.json`, execSyncOptions(), ); - expect(affected).not.toContain(testApp); - expect(affected).not.toContain(testApp2); - expect(affected).not.toContain(testApp3); - expect(affected).not.toContain(testApp4); - expect(affected).not.toContain(testLib); - expect(affected).not.toContain(testLib2); + + const depGraphAffectedJson = await readJson( + join(smokeDirectory, 'test', 'dep-graph-affected.json'), + ); + expect(depGraphAffectedJson.graph.nodes[testApp]).toBeDefined(); + expect(depGraphAffectedJson.graph.nodes[testApp2]).toBeDefined(); + expect(depGraphAffectedJson.graph.nodes[testApp3]).toBeDefined(); + expect(depGraphAffectedJson.graph.nodes[testApp4]).toBeDefined(); + expect(depGraphAffectedJson.graph.nodes[testLib]).toBeDefined(); + expect(depGraphAffectedJson.graph.nodes[testLib2]).toBeDefined(); }, 1500000); }); diff --git a/testing-projects/smoke-affected/nx-boot-maven-smoke-affected/tests/nx-boot-maven.spec.ts b/testing-projects/smoke-affected/nx-boot-maven-smoke-affected/tests/nx-boot-maven.spec.ts index 198bc84c5..bd99e60e8 100644 --- a/testing-projects/smoke-affected/nx-boot-maven-smoke-affected/tests/nx-boot-maven.spec.ts +++ b/testing-projects/smoke-affected/nx-boot-maven-smoke-affected/tests/nx-boot-maven.spec.ts @@ -110,15 +110,19 @@ describe('@jnxplus/nx-maven spring-boot smoke', () => { execSync(`git commit -am "chore: scaffold projects"`, execSyncOptions()); - const affected = execSync( - 'npx nx show projects --affected', + execSync( + `npx nx graph --affected --file=dep-graph-affected.json`, execSyncOptions(), ); - expect(affected).not.toContain(testApp); - expect(affected).not.toContain(testApp2); - expect(affected).not.toContain(testApp3); - expect(affected).not.toContain(testApp4); - expect(affected).not.toContain(testLib); - expect(affected).not.toContain(testLib2); + + const depGraphAffectedJson = await readJson( + join(smokeDirectory, 'test', 'dep-graph-affected.json'), + ); + expect(depGraphAffectedJson.graph.nodes[testApp]).toBeDefined(); + expect(depGraphAffectedJson.graph.nodes[testApp2]).toBeDefined(); + expect(depGraphAffectedJson.graph.nodes[testApp3]).toBeDefined(); + expect(depGraphAffectedJson.graph.nodes[testApp4]).toBeDefined(); + expect(depGraphAffectedJson.graph.nodes[testLib]).toBeDefined(); + expect(depGraphAffectedJson.graph.nodes[testLib2]).toBeDefined(); }, 1500000); });