feat: Enhance API request component (#8070)
* update the api request component * [autofix.ci] apply automated fixes * update the component * Update test_api_request_component.py * [autofix.ci] apply automated fixes * remove MODE_CONFIG unused variable * [autofix.ci] apply automated fixes * use normalize function * Update template * Update test_api_request_component.py * UI test fix * selector fix --------- Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com> Co-authored-by: Yuqi Tang <yuqi.tang@datastax.com> Co-authored-by: Mike Fortman <michael.fortman@datastax.com>
This commit is contained in:
parent
c02c237567
commit
ba92fc1e78
5 changed files with 256 additions and 351 deletions
|
|
@ -9,17 +9,17 @@ test(
|
|||
await page.getByTestId("blank-flow").click();
|
||||
|
||||
await page.getByTestId("sidebar-search-input").click();
|
||||
await page.getByTestId("sidebar-search-input").fill("api request");
|
||||
await page.getByTestId("sidebar-search-input").fill("url");
|
||||
|
||||
await page.waitForSelector('[data-testid="dataAPI Request"]', {
|
||||
await page.waitForSelector('[data-testid="dataURL"]', {
|
||||
timeout: 3000,
|
||||
});
|
||||
|
||||
await page
|
||||
.getByTestId("dataAPI Request")
|
||||
.getByTestId("dataURL")
|
||||
.hover()
|
||||
.then(async () => {
|
||||
await page.getByTestId("add-component-button-api-request").click();
|
||||
await page.getByTestId("add-component-button-url").click();
|
||||
});
|
||||
|
||||
await page.waitForSelector(
|
||||
|
|
@ -44,7 +44,7 @@ test(
|
|||
|
||||
await page.getByTestId("button_open_actions").click();
|
||||
|
||||
await page.waitForSelector("text=API Request", { timeout: 30000 });
|
||||
await page.waitForSelector("text=URL", { timeout: 30000 });
|
||||
|
||||
const rowsCount = await page.getByRole("gridcell").count();
|
||||
|
||||
|
|
@ -200,7 +200,11 @@ test(
|
|||
await page.getByText("Close").last().click();
|
||||
|
||||
expect(
|
||||
await page.locator('[data-testid="tool_make_requests"]').isVisible(),
|
||||
await page.locator('[data-testid="tool_fetch_content"]').isVisible(),
|
||||
).toBe(true);
|
||||
|
||||
expect(
|
||||
await page.locator('[data-testid="tool_as_dataframe"]').isVisible(),
|
||||
).toBe(true);
|
||||
},
|
||||
);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue