diff --git a/packages/e2e-test/src/commands/run.ts b/packages/e2e-test/src/commands/run.ts index 2a0f641014..7111ff1867 100644 --- a/packages/e2e-test/src/commands/run.ts +++ b/packages/e2e-test/src/commands/run.ts @@ -56,7 +56,7 @@ export async function run() { const pluginName = await createPlugin('test-plugin', appDir); print('Creating a Backstage Backend Plugin'); - await createPlugin('test-backend-plugin', appDir, ['--backend']); + await createPlugin('test-plugin', appDir, ['--backend']); print('Starting the app'); await testAppServe(pluginName, appDir); @@ -265,13 +265,16 @@ async function createPlugin( print('Waiting for plugin create script to be done'); await waitForExit(child); - const pluginDir = resolvePath(appDir, 'plugins', pluginName); + const canonicalName = options.includes('--backend') + ? `${pluginName}-backend}` + : pluginName; + const pluginDir = resolvePath(appDir, 'plugins', canonicalName); for (const cmd of [['tsc'], ['lint'], ['test', '--no-watch']]) { print(`Running 'yarn ${cmd.join(' ')}' in newly created plugin`); await runPlain(['yarn', ...cmd], { cwd: pluginDir }); } - return pluginName; + return canonicalName; } finally { child.kill(); }