mirror of
https://github.com/Kong/insomnia
synced 2024-11-08 23:00:30 +00:00
aeafe4a7c9
* feat: add swagger2 for prism * feat: add test stub * feat: can import from clipboard * feat: click folder, request and send * chore: add comments * fix: now it actually breaks * fix: typo * fix: update webdriver implicit timeout * feat: replace prism with tinyhttp (similar to express)
21 lines
618 B
JavaScript
21 lines
618 B
JavaScript
import findAsync from './find-async';
|
|
|
|
export const clickDropdownItemByText = async (dropdown, text) => {
|
|
let item;
|
|
await dropdown.waitUntil(async () => {
|
|
const items = await dropdown.react$$('DropdownItem');
|
|
item = await findAsync(items, async i => (await i.getText()) === text);
|
|
return !!item;
|
|
});
|
|
await item.waitForDisplayed();
|
|
await item.click();
|
|
};
|
|
|
|
export const clickOpenDropdownItemByText = async (app, text) => {
|
|
const item = await app.client
|
|
.$('.dropdown__menu[aria-hidden=false]')
|
|
.then(e => e.$(`button*=${text}`));
|
|
await item.waitForDisplayed();
|
|
await item.click();
|
|
};
|