mirror of
https://github.com/Kong/insomnia.git
synced 2026-06-15 11:30:07 -04:00
fix e2e
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -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');
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user