refactor: Replace InputComponent with Select dropdown (#4719)
* 🔧 (nodeToolbarComponent/index.tsx): improve positioning logic for node toolbar based on scale and tool mode to enhance user experience * ✨ (GlobalVariableModal.tsx): Refactor type selection in GlobalVariableModal to use a dropdown select component for better user experience and consistency. * Revert "🔧 (nodeToolbarComponent/index.tsx): improve positioning logic for node toolbar based on scale and tool mode to enhance user experience" This reverts commit 322ba353a6984fcf870cba8c82c26689381842da. * ✨ (GlobalVariableModal.tsx): Add data-testid attribute to SelectTrigger for testing purposes 🔧 (globalVariables.spec.ts, userSettings.spec.ts): Update test scripts to interact with the SelectTrigger using data-testid attribute for consistency and improved testing accuracy * 📝 (userSettings.spec.ts): remove commented out code for focusElementsOnBoard function to improve code readability and maintainability
This commit is contained in:
parent
76890822b6
commit
226453a606
3 changed files with 33 additions and 38 deletions
|
|
@ -35,15 +35,7 @@ test("should interact with global variables", async ({ page }) => {
|
|||
await page
|
||||
.getByPlaceholder("Insert a name for the variable...")
|
||||
.fill(randomName);
|
||||
await page.getByTestId("anchor-popover-anchor-type-global-variables").click();
|
||||
await page.getByPlaceholder("Search options...").fill("Generic");
|
||||
await page.waitForTimeout(1000);
|
||||
await page.getByText("Generic", { exact: true }).last().isVisible();
|
||||
await page.getByText("Generic", { exact: true }).last().click();
|
||||
|
||||
await page.getByTestId("popover-anchor-type-global-variables").click();
|
||||
await page.waitForTimeout(1000);
|
||||
await page.getByPlaceholder("Search options...").fill("Generic");
|
||||
await page.getByTestId("select-type-global-variables").first().click();
|
||||
await page.getByText("Generic", { exact: true }).last().isVisible();
|
||||
await page.getByText("Generic", { exact: true }).last().click();
|
||||
|
||||
|
|
@ -108,18 +100,6 @@ test("should interact with global variables", async ({ page }) => {
|
|||
|
||||
await page.waitForTimeout(2000);
|
||||
|
||||
// const focusElementsOnBoard = async ({ page }) => {
|
||||
// await page.waitForSelector(
|
||||
// '[aria-label="Press Space to toggle all rows selection (unchecked)"]',
|
||||
// { timeout: 30000, state: "visible" },
|
||||
// );
|
||||
// const focusElements = await page
|
||||
// .getByLabel("Press Space to toggle all rows selection (unchecked)")
|
||||
// .first();
|
||||
// await focusElements.click();
|
||||
// };
|
||||
// await focusElementsOnBoard({ page });
|
||||
|
||||
await page.locator(".ag-checkbox-input").first().click();
|
||||
await page.getByTestId("icon-Trash2").click();
|
||||
await page.getByText("No data available").isVisible();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue