chore(e2e): fix the e2e test
This commit is contained in:
@@ -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();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user