This commit is contained in:
jackkav
2026-05-31 14:00:46 +02:00
parent 45a22b1af0
commit 99e24bc1f3
2 changed files with 2 additions and 36 deletions

View File

@@ -110,21 +110,7 @@ test('Setup external vault and used in request', async ({ app, page, insomnia })
await expect.soft(responsePane).toContainText(externalVaultTestCases.aws.expectedResult);
await expect.soft(responsePane).toContainText(externalVaultTestCases.gcp.expectedResult);
await expect.soft(responsePane).toContainText(externalVaultTestCases.hashicorp.expectedResult);
// enable elevated access and execute again in renderer process
await page.getByTestId('settings-button').click();
await page.getByRole('tab', { name: 'Plugins' }).click();
const allowElevatedAccessForPlugins = page.getByRole('checkbox', {
name: 'Allow elevated access for plugins',
});
await expect.soft(allowElevatedAccessForPlugins).toBeVisible();
await allowElevatedAccessForPlugins.evaluate(element => {
if (element instanceof HTMLInputElement && !element.checked) {
element.click();
}
});
// close the settings
await page.locator('.app').press('Escape');
// send request and execute the tags in renderer process
// send request again to verify vault tags work via render-adapter worker
await page.getByTestId('request-pane').getByRole('button', { name: 'Send' }).click();
await page.getByRole('tab', { name: 'Console' }).click();
await expect.soft(responsePane).toContainText(externalVaultTestCases.aws.expectedResult);

View File

@@ -150,27 +150,7 @@ test('Critical Path For Template Tags Interactions', async ({ page, app, insomni
const { tagPrefix } = templateTagTestCases.prompt[0];
await page.locator(`[data-template^="${tagPrefix}"]`).isVisible();
await page.getByTestId('request-pane').getByRole('button', { name: 'Send' }).click();
// prompt is not allowed to use by default
// prompt tag is blocked in the sandboxed render-adapter worker
await expect.soft(page.getByText('Unexpected Request Failure')).toBeVisible();
await page.getByRole('dialog').getByRole('button', { name: 'OK' }).click();
// elevate access for plugins
await page.getByTestId('settings-button').click();
await page.getByRole('tab', { name: 'Plugins' }).click();
const allowElevatedAccessForPlugins = page.getByRole('checkbox', {
name: 'Allow elevated access for plugins',
});
await expect.soft(allowElevatedAccessForPlugins).toBeVisible();
await allowElevatedAccessForPlugins.evaluate(element => {
if (element instanceof HTMLInputElement && !element.checked) {
element.click();
}
});
await expect.soft(allowElevatedAccessForPlugins).toBeChecked();
await page.locator('.app').press('Escape');
await page.getByTestId('request-pane').getByRole('button', { name: 'Send' }).click();
await page.getByRole('dialog').locator('#prompt-input').fill('prompt-value');
await page.getByRole('dialog').getByRole('button', { name: 'Submit' }).click();
await page.click('text=Console');
const responsePane = page.getByTestId('response-pane');
await expect.soft(responsePane).toContainText('prompt-value');
});