chore(e2e): fix the e2e test

This commit is contained in:
blam
2020-10-12 22:51:17 +02:00
parent a8a4f41380
commit bd3864385b
+6 -3
View File
@@ -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();
}