mirror of
https://github.com/Kong/insomnia
synced 2024-11-08 06:39:48 +00:00
Improve Locators for new create HTTP test (#5406)
This commit is contained in:
parent
7eb3725781
commit
e5af9ba6b8
@ -84,8 +84,8 @@ test.describe('Debug-Sidebar', async () => {
|
||||
});
|
||||
|
||||
test('Create a new HTTP request', async ({ page }) => {
|
||||
await page.locator('div:nth-child(3) > .btn').click();
|
||||
await page.locator('button:has-text("HTTP RequestCtrl + N")').first().click();
|
||||
await page.locator('[data-testid="SidebarFilter"] [data-testid="SidebarCreateDropdown"] button').click();
|
||||
await page.locator('[data-testid="CreateHttpRequest"]').first().click();
|
||||
await expect(page.locator('.app')).toContainText('New Request');
|
||||
});
|
||||
});
|
||||
|
@ -34,15 +34,15 @@ export const SidebarCreateDropdown: FC<Props> = ({ right }) => {
|
||||
|
||||
createRequestGroup(activeWorkspaceId);
|
||||
}, [activeWorkspaceId]);
|
||||
|
||||
const dataTestId = 'SidebarCreateDropdown';
|
||||
return (
|
||||
<Dropdown right={right}>
|
||||
<Dropdown right={right} dataTestId={dataTestId}>
|
||||
<DropdownButton className="btn btn--compact">
|
||||
<i className="fa fa-plus-circle" />
|
||||
<i className="fa fa-caret-down" />
|
||||
</DropdownButton>
|
||||
|
||||
<DropdownItem onClick={() => create('HTTP')}>
|
||||
<DropdownItem dataTestId='CreateHttpRequest' onClick={() => create('HTTP')}>
|
||||
<i className="fa fa-plus-circle" />HTTP Request
|
||||
<DropdownHint keyBindings={hotKeyRegistry.request_createHTTP} />
|
||||
</DropdownItem>
|
||||
|
@ -67,9 +67,9 @@ export const SidebarFilter: FC<Props> = ({ filter }) => {
|
||||
await db.flushChanges(flushId);
|
||||
}
|
||||
};
|
||||
|
||||
const dataTestId = 'SidebarFilter';
|
||||
return (
|
||||
<div className="sidebar__filter">
|
||||
<div className="sidebar__filter" data-testid={dataTestId}>
|
||||
<div className="form-control form-control--outlined form-control--btn-right">
|
||||
<input
|
||||
ref={inputRef}
|
||||
|
Loading…
Reference in New Issue
Block a user