fix merge on tests
This commit is contained in:
commit
2f1a7081b9
7 changed files with 55 additions and 86 deletions
|
|
@ -62,7 +62,7 @@ test("chat_io_teste", async ({ page }) => {
|
|||
// Click and hold on the first element
|
||||
await page
|
||||
.locator(
|
||||
'//*[@id="react-flow-id"]/div/div[1]/div[1]/div/div[2]/div[2]/div/div[2]/div[10]/button/div/div'
|
||||
'//*[@id="react-flow-id"]/div/div[1]/div[1]/div/div[2]/div[2]/div/div[2]/div[8]/button/div/div',
|
||||
)
|
||||
.hover();
|
||||
await page.mouse.down();
|
||||
|
|
@ -70,7 +70,7 @@ test("chat_io_teste", async ({ page }) => {
|
|||
// Move to the second element
|
||||
await page
|
||||
.locator(
|
||||
'//*[@id="react-flow-id"]/div/div[1]/div[1]/div/div[2]/div[1]/div/div[2]/div[4]/div/button/div/div'
|
||||
'//*[@id="react-flow-id"]/div/div[1]/div[1]/div/div[2]/div[1]/div/div[2]/div[3]/div/button/div/div',
|
||||
)
|
||||
.hover();
|
||||
|
||||
|
|
|
|||
|
|
@ -56,7 +56,7 @@ test("user must interact with chat with Input/Output", async ({ page }) => {
|
|||
.getByTestId("textarea-input_value")
|
||||
.nth(1)
|
||||
.fill(
|
||||
"testtesttesttesttesttestte;.;.,;,.;,.;.,;,..,;;;;;;;;;;;;;;;;;;;;;,;.;,.;,.,;.,;.;.,~~çççççççççççççççççççççççççççççççççççççççisdajfdasiopjfaodisjhvoicxjiovjcxizopjviopasjioasfhjaiohf23432432432423423sttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttestççççççççççççççççççççççççççççççççç,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,!"
|
||||
"testtesttesttesttesttestte;.;.,;,.;,.;.,;,..,;;;;;;;;;;;;;;;;;;;;;,;.;,.;,.,;.,;.;.,~~çççççççççççççççççççççççççççççççççççççççisdajfdasiopjfaodisjhvoicxjiovjcxizopjviopasjioasfhjaiohf23432432432423423sttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttestççççççççççççççççççççççççççççççççç,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,!",
|
||||
);
|
||||
await page.getByText("Playground", { exact: true }).last().click();
|
||||
await page.getByTestId("icon-LucideSend").click();
|
||||
|
|
@ -66,6 +66,11 @@ test("user must interact with chat with Input/Output", async ({ page }) => {
|
|||
await page.getByTestId("showsender_name").click();
|
||||
await page.getByText("Save Changes", { exact: true }).click();
|
||||
|
||||
await page.getByText("Chat Output", { exact: true }).click();
|
||||
await page.getByTestId("advanced-button-modal").click();
|
||||
await page.getByTestId("showsender_name").click();
|
||||
await page.getByText("Save Changes", { exact: true }).click();
|
||||
|
||||
await page
|
||||
.getByTestId("popover-anchor-input-sender_name")
|
||||
.nth(1)
|
||||
|
|
@ -92,9 +97,9 @@ test("user must interact with chat with Input/Output", async ({ page }) => {
|
|||
await page
|
||||
.getByText(
|
||||
"testtesttesttesttesttestte;.;.,;,.;,.;.,;,..,;;;;;;;;;;;;;;;;;;;;;,;.;,.;,.,;.,;.;.,~~çççççççççççççççççççççççççççççççççççççççisdajfdasiopjfaodisjhvoicxjiovjcxizopjviopasjioasfhjaiohf23432432432423423sttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttestççççççççççççççççççççççççççççççççç,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,!",
|
||||
{ exact: true }
|
||||
{ exact: true },
|
||||
)
|
||||
.isVisible()
|
||||
.isVisible(),
|
||||
);
|
||||
});
|
||||
|
||||
|
|
@ -204,7 +209,7 @@ test("user must be able to send an image on chat", async ({ page }) => {
|
|||
|
||||
const jsonContent = readFileSync(
|
||||
"src/frontend/tests/end-to-end/assets/chain.png",
|
||||
"utf-8"
|
||||
"utf-8",
|
||||
);
|
||||
|
||||
// Create the DataTransfer and File
|
||||
|
|
|
|||
|
|
@ -39,41 +39,33 @@ test("FloatComponent", async ({ page }) => {
|
|||
await page.getByTitle("zoom out").click();
|
||||
await page.getByTitle("zoom out").click();
|
||||
|
||||
await page.waitForTimeout(2000);
|
||||
await page.locator('//*[@id="float-input"]').click();
|
||||
await page.locator('//*[@id="float-input"]').fill("");
|
||||
await page.waitForTimeout(2000);
|
||||
await page.locator('//*[@id="float-input"]').fill("3");
|
||||
|
||||
let value = await page.locator('//*[@id="float-input"]').inputValue();
|
||||
|
||||
if (value != "1") {
|
||||
if (value != "2") {
|
||||
expect(false).toBeTruthy();
|
||||
}
|
||||
|
||||
await page.waitForTimeout(2000);
|
||||
await page.locator('//*[@id="float-input"]').click();
|
||||
await page.locator('//*[@id="float-input"]').fill("");
|
||||
await page.waitForTimeout(2000);
|
||||
await page.locator('//*[@id="float-input"]').fill("-3");
|
||||
|
||||
value = await page.locator('//*[@id="float-input"]').inputValue();
|
||||
|
||||
if (value != "-1") {
|
||||
if (value != "-2") {
|
||||
expect(false).toBeTruthy();
|
||||
}
|
||||
|
||||
await page.getByTestId("more-options-modal").click();
|
||||
await page.getByTestId("edit-button-modal").click();
|
||||
|
||||
await page.getByTestId("showformat").click();
|
||||
expect(await page.locator('//*[@id="showformat"]').isChecked()).toBeTruthy();
|
||||
|
||||
await page.getByTestId("showformat").click();
|
||||
expect(await page.locator('//*[@id="showformat"]').isChecked()).toBeFalsy();
|
||||
|
||||
await page.getByTestId("showmirostat").click();
|
||||
expect(await page.locator('//*[@id="showmirostat"]').isChecked()).toBeFalsy();
|
||||
|
||||
await page.getByTestId("showmirostat").click();
|
||||
expect(
|
||||
await page.locator('//*[@id="showmirostat"]').isChecked(),
|
||||
).toBeTruthy();
|
||||
|
||||
await page.getByTestId("showmirostat_eta").click();
|
||||
expect(
|
||||
await page.locator('//*[@id="showmirostat_eta"]').isChecked(),
|
||||
|
|
@ -81,7 +73,17 @@ test("FloatComponent", async ({ page }) => {
|
|||
|
||||
await page.getByTestId("showmirostat_eta").click();
|
||||
expect(
|
||||
await page.locator('//*[@id="showmirostat_eta"]').isChecked()
|
||||
await page.locator('//*[@id="showmirostat_eta"]').isChecked(),
|
||||
).toBeFalsy();
|
||||
|
||||
await page.getByTestId("showmirostat_eta").click();
|
||||
expect(
|
||||
await page.locator('//*[@id="showmirostat_eta"]').isChecked(),
|
||||
).toBeTruthy();
|
||||
|
||||
await page.getByTestId("showmirostat_eta").click();
|
||||
expect(
|
||||
await page.locator('//*[@id="showmirostat_eta"]').isChecked(),
|
||||
).toBeFalsy();
|
||||
|
||||
await page.getByTestId("showmirostat_tau").click();
|
||||
|
|
@ -94,44 +96,6 @@ test("FloatComponent", async ({ page }) => {
|
|||
await page.locator('//*[@id="showmirostat_tau"]').isChecked(),
|
||||
).toBeFalsy();
|
||||
|
||||
await page.getByTestId("showmodel").click();
|
||||
expect(await page.locator('//*[@id="showmodel"]').isChecked()).toBeFalsy();
|
||||
|
||||
await page.getByTestId("showmodel").click();
|
||||
expect(await page.locator('//*[@id="showmodel"]').isChecked()).toBeTruthy();
|
||||
|
||||
await page.getByTestId("shownum_ctx").click();
|
||||
expect(await page.locator('//*[@id="shownum_ctx"]').isChecked()).toBeTruthy();
|
||||
|
||||
await page.getByTestId("shownum_ctx").click();
|
||||
expect(await page.locator('//*[@id="shownum_ctx"]').isChecked()).toBeFalsy();
|
||||
|
||||
await page.getByTestId("shownum_gpu").click();
|
||||
expect(await page.locator('//*[@id="shownum_gpu"]').isChecked()).toBeTruthy();
|
||||
|
||||
await page.getByTestId("shownum_gpu").click();
|
||||
expect(await page.locator('//*[@id="shownum_gpu"]').isChecked()).toBeFalsy();
|
||||
|
||||
await page.getByTestId("shownum_thread").click();
|
||||
expect(
|
||||
await page.locator('//*[@id="shownum_thread"]').isChecked(),
|
||||
).toBeTruthy();
|
||||
|
||||
await page.getByTestId("shownum_thread").click();
|
||||
expect(
|
||||
await page.locator('//*[@id="shownum_thread"]').isChecked(),
|
||||
).toBeFalsy();
|
||||
|
||||
await page.getByTestId("showrepeat_last_n").click();
|
||||
expect(
|
||||
await page.locator('//*[@id="showrepeat_last_n"]').isChecked(),
|
||||
).toBeTruthy();
|
||||
|
||||
await page.getByTestId("showrepeat_last_n").click();
|
||||
expect(
|
||||
await page.locator('//*[@id="showrepeat_last_n"]').isChecked(),
|
||||
).toBeFalsy();
|
||||
|
||||
await page.getByText("Save Changes", { exact: true }).click();
|
||||
|
||||
const plusButtonLocator = page.locator('//*[@id="float-input"]');
|
||||
|
|
|
|||
|
|
@ -41,19 +41,19 @@ test("InputListComponent", async ({ page }) => {
|
|||
await page.getByTestId("edit-button-modal").click();
|
||||
|
||||
expect(
|
||||
await page.getByTestId("showmetadata_indexing_exclude").isChecked()
|
||||
await page.getByTestId("showmetadata_indexing_exclude").isChecked(),
|
||||
).toBeFalsy();
|
||||
await page.getByTestId("showmetadata_indexing_exclude").click();
|
||||
expect(
|
||||
await page.getByTestId("showmetadata_indexing_exclude").isChecked()
|
||||
await page.getByTestId("showmetadata_indexing_exclude").isChecked(),
|
||||
).toBeTruthy();
|
||||
|
||||
expect(
|
||||
await page.getByTestId("showmetadata_indexing_include").isChecked()
|
||||
await page.getByTestId("showmetadata_indexing_include").isChecked(),
|
||||
).toBeFalsy();
|
||||
await page.getByTestId("showmetadata_indexing_include").click();
|
||||
expect(
|
||||
await page.getByTestId("showmetadata_indexing_include").isChecked()
|
||||
await page.getByTestId("showmetadata_indexing_include").isChecked(),
|
||||
).toBeTruthy();
|
||||
|
||||
await page
|
||||
|
|
@ -89,11 +89,11 @@ test("InputListComponent", async ({ page }) => {
|
|||
}
|
||||
|
||||
await page
|
||||
.getByTestId("input-list-minus-btn_metadata_indexing_include-0")
|
||||
.getByTestId("input-list-minus-btn_metadata_indexing_include-1")
|
||||
.click();
|
||||
|
||||
const plusButtonLocator = page.getByTestId(
|
||||
"input-list-plus-btn_metadata_indexing_include-1"
|
||||
"input-list-plus-btn_metadata_indexing_include-1",
|
||||
);
|
||||
const elementCount = await plusButtonLocator?.count();
|
||||
|
||||
|
|
@ -105,13 +105,13 @@ test("InputListComponent", async ({ page }) => {
|
|||
.getByTestId("input-list-plus-btn_metadata_indexing_include-0")
|
||||
.click();
|
||||
await page
|
||||
.getByTestId("input-list-plus-btn_metadata_indexing_include-1")
|
||||
.getByTestId("input-list-plus-btn_metadata_indexing_include-0")
|
||||
.click();
|
||||
await page
|
||||
.getByTestId("input-list-plus-btn_metadata_indexing_include-2")
|
||||
.getByTestId("input-list-plus-btn_metadata_indexing_include-0")
|
||||
.click();
|
||||
await page
|
||||
.getByTestId("input-list-plus-btn_metadata_indexing_include-3")
|
||||
.getByTestId("input-list-plus-btn_metadata_indexing_include-0")
|
||||
.click();
|
||||
|
||||
await page
|
||||
|
|
@ -154,7 +154,7 @@ test("InputListComponent", async ({ page }) => {
|
|||
}
|
||||
|
||||
await page
|
||||
.getByTestId("input-list-minus-btn-edit_metadata_indexing_include-0")
|
||||
.getByTestId("input-list-minus-btn-edit_metadata_indexing_include-1")
|
||||
.click();
|
||||
await page
|
||||
.getByTestId("input-list-minus-btn-edit_metadata_indexing_include-1")
|
||||
|
|
@ -164,32 +164,32 @@ test("InputListComponent", async ({ page }) => {
|
|||
.click();
|
||||
|
||||
const plusButtonLocatorEdit0 = await page.getByTestId(
|
||||
"input-list-plus-btn-edit_metadata_indexing_include-0"
|
||||
"input-list-plus-btn-edit_metadata_indexing_include-0",
|
||||
);
|
||||
const elementCountEdit0 = await plusButtonLocatorEdit0?.count();
|
||||
|
||||
const plusButtonLocatorEdit2 = await page.getByTestId(
|
||||
"input-list-plus-btn-edit_metadata_indexing_include-2"
|
||||
"input-list-plus-btn-edit_metadata_indexing_include-2",
|
||||
);
|
||||
const elementCountEdit2 = await plusButtonLocatorEdit2?.count();
|
||||
|
||||
if (elementCountEdit0 > 0 || elementCountEdit2 > 0) {
|
||||
if (elementCountEdit0 > 1 || elementCountEdit2 > 0) {
|
||||
expect(false).toBeTruthy();
|
||||
}
|
||||
|
||||
const minusButtonLocatorEdit1 = await page.getByTestId(
|
||||
"input-list-minus-btn-edit_metadata_indexing_include-1"
|
||||
"input-list-minus-btn-edit_metadata_indexing_include-1",
|
||||
);
|
||||
|
||||
const elementCountMinusEdit1 = await minusButtonLocatorEdit1?.count();
|
||||
|
||||
const minusButtonLocatorEdit2 = await page.getByTestId(
|
||||
"input-list-minus-btn-edit_metadata_indexing_include-2"
|
||||
"input-list-minus-btn-edit_metadata_indexing_include-2",
|
||||
);
|
||||
|
||||
const elementCountMinusEdit2 = await minusButtonLocatorEdit2?.count();
|
||||
|
||||
if (elementCountMinusEdit1 > 0 || elementCountMinusEdit2 > 0) {
|
||||
if (elementCountMinusEdit1 > 1 || elementCountMinusEdit2 > 0) {
|
||||
expect(false).toBeTruthy();
|
||||
}
|
||||
});
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ test("PromptTemplateComponent", async ({ page }) => {
|
|||
await page.waitForTimeout(1000);
|
||||
|
||||
await page
|
||||
.locator('//*[@id="inputsPrompt"]')
|
||||
.locator('//*[@id="promptsPrompt"]')
|
||||
.dragTo(page.locator('//*[@id="react-flow-id"]'));
|
||||
await page.mouse.up();
|
||||
await page.mouse.down();
|
||||
|
|
@ -140,7 +140,7 @@ test("PromptTemplateComponent", async ({ page }) => {
|
|||
|
||||
await page.locator('//*[@id="showtemplate"]').click();
|
||||
expect(
|
||||
await page.locator('//*[@id="showtemplate"]').isChecked()
|
||||
await page.locator('//*[@id="showtemplate"]').isChecked(),
|
||||
).toBeTruthy();
|
||||
|
||||
await page.locator('//*[@id="showprompt"]').click();
|
||||
|
|
@ -160,7 +160,7 @@ test("PromptTemplateComponent", async ({ page }) => {
|
|||
|
||||
await page.locator('//*[@id="showtemplate"]').click();
|
||||
expect(
|
||||
await page.locator('//*[@id="showtemplate"]').isChecked()
|
||||
await page.locator('//*[@id="showtemplate"]').isChecked(),
|
||||
).toBeTruthy();
|
||||
|
||||
await page.locator('//*[@id="showprompt"]').click();
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ test("TextAreaModalComponent", async ({ page }) => {
|
|||
await page.waitForTimeout(1000);
|
||||
|
||||
await page
|
||||
.locator('//*[@id="inputsPrompt"]')
|
||||
.locator('//*[@id="promptsPrompt"]')
|
||||
.dragTo(page.locator('//*[@id="react-flow-id"]'));
|
||||
await page.mouse.up();
|
||||
await page.mouse.down();
|
||||
|
|
@ -51,7 +51,7 @@ test("TextAreaModalComponent", async ({ page }) => {
|
|||
await page
|
||||
.getByTestId("textarea-text")
|
||||
.fill(
|
||||
"test test test test test test test test test test test !@#%*)( 123456789101010101010101111111111 !!!!!!!!!!"
|
||||
"test test test test test test test test test test test !@#%*)( 123456789101010101010101111111111 !!!!!!!!!!",
|
||||
);
|
||||
|
||||
await page.getByTestId("textarea-text-ExternalLink").click();
|
||||
|
|
|
|||
|
|
@ -60,7 +60,7 @@ test("TextInputOutputComponent", async ({ page }) => {
|
|||
// Click and hold on the first element
|
||||
await page
|
||||
.locator(
|
||||
'//*[@id="react-flow-id"]/div/div[1]/div[1]/div/div[2]/div[1]/div/div[2]/div[6]/button/div/div'
|
||||
'//*[@id="react-flow-id"]/div/div[1]/div[1]/div/div[2]/div[1]/div/div[2]/div[6]/button/div/div',
|
||||
)
|
||||
.hover();
|
||||
await page.mouse.down();
|
||||
|
|
@ -68,7 +68,7 @@ test("TextInputOutputComponent", async ({ page }) => {
|
|||
// Move to the second element
|
||||
await page
|
||||
.locator(
|
||||
'//*[@id="react-flow-id"]/div/div[1]/div[1]/div/div[2]/div[2]/div/div[2]/div[9]/div/button/div/div'
|
||||
'//*[@id="react-flow-id"]/div/div[1]/div[1]/div/div[2]/div[2]/div/div[2]/div[3]/div/button/div/div',
|
||||
)
|
||||
.hover();
|
||||
|
||||
|
|
@ -92,7 +92,7 @@ test("TextInputOutputComponent", async ({ page }) => {
|
|||
// Click and hold on the first element
|
||||
await page
|
||||
.locator(
|
||||
'//*[@id="react-flow-id"]/div/div[1]/div[1]/div/div[2]/div[2]/div/div[2]/div[13]/button/div/div'
|
||||
'//*[@id="react-flow-id"]/div/div[1]/div[1]/div/div[2]/div[2]/div/div[2]/div[13]/button/div/div',
|
||||
)
|
||||
.hover();
|
||||
await page.mouse.down();
|
||||
|
|
@ -100,7 +100,7 @@ test("TextInputOutputComponent", async ({ page }) => {
|
|||
// Move to the second element
|
||||
await page
|
||||
.locator(
|
||||
'//*[@id="react-flow-id"]/div/div[1]/div[1]/div/div[2]/div[3]/div/div[2]/div[3]/div/button/div/div'
|
||||
'//*[@id="react-flow-id"]/div/div[1]/div[1]/div/div[2]/div[3]/div/div[2]/div[3]/div/button/div/div',
|
||||
)
|
||||
.hover();
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue