fix(nodeToolbarComponent): add data-testid attribute to more options modal for easier testing

fix(floatComponent.spec): update element locator for sideLlamaCpp to llmsLlamaCpp to match changes in the codebase
fix(floatComponent.spec): update element locator for editAdvancedIcon to use getByTestId for more reliable testing
This commit is contained in:
cristhianzl 2023-11-22 22:08:04 -03:00
commit 08b6739e1e
2 changed files with 3 additions and 2 deletions

View file

@ -173,6 +173,7 @@ export default function NodeToolbarComponent({
<SelectTrigger>
<div>
<div
data-testid="more-options-modal"
className={classNames(
"relative -ml-px inline-flex h-8 w-[31px] items-center rounded-r-md bg-background text-foreground shadow-md ring-1 ring-inset ring-ring transition-all duration-500 ease-in-out hover:bg-muted focus:z-10" +
(nodeLength == 0

View file

@ -13,7 +13,7 @@ test("FloatComponent", async ({ page }) => {
await page.waitForTimeout(2000);
await page
.locator('//*[@id="sideLlamaCpp"]')
.locator('//*[@id="llmsLlamaCpp"]')
.dragTo(page.locator('//*[@id="react-flow-id"]'));
await page.mouse.up();
await page.mouse.down();
@ -41,7 +41,7 @@ test("FloatComponent", async ({ page }) => {
'//*[@id="react-flow-id"]/div[1]/div[1]/div[1]/div/div[2]/div/div/div[1]/div/div[1]/div'
)
.click();
await page.locator('//*[@id="editAdvancedIcon"]').click();
await page.getByTestId("more-options-modal").click();
await page.locator('//*[@id="showcache"]').click();
expect(await page.locator('//*[@id="showcache"]').isChecked()).toBeTruthy();