test: improve element interactions in generalBugs shard 7 tests (nightly fix) (#5646)

This commit is contained in:
Cristhian Zanforlin Lousa 2025-01-13 11:48:21 -03:00 committed by GitHub
commit 5122d56ed3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -32,7 +32,12 @@ test(
await page
.getByTestId("embeddingsOllama Embeddings")
.dragTo(page.locator('//*[@id="react-flow-id"]'));
.hover()
.then(async () => {
await page
.getByTestId("add-component-button-ollama-embeddings")
.click();
});
await page.getByTestId("fit_view").click();
await zoomOut(page, 3);
@ -52,11 +57,11 @@ test(
await page
.getByPlaceholder("Type something...")
.nth(2)
.first()
.fill("ollama_test_ctrl_a_first_input");
let value = await page
.getByPlaceholder("Type something...")
.nth(2)
.first()
.inputValue();
expect(value).toBe("ollama_test_ctrl_a_first_input");
@ -76,7 +81,7 @@ test(
await page.keyboard.press("ControlOrMeta+c");
await page.getByPlaceholder("Type something...").nth(2).click();
await page.getByPlaceholder("Type something...").first().click();
await page.keyboard.press("ControlOrMeta+a");
@ -84,7 +89,7 @@ test(
value = await page
.getByPlaceholder("Type something...")
.nth(2)
.first()
.inputValue();
expect(value).toBe("ollama_test_ctrl_a_second_input");
},