diff --git a/agenta-web/cypress/e2e/ab-testing-evaluation.cy.ts b/agenta-web/cypress/e2e/ab-testing-evaluation.cy.ts index 6e85f00a94..fab3aaf1bc 100644 --- a/agenta-web/cypress/e2e/ab-testing-evaluation.cy.ts +++ b/agenta-web/cypress/e2e/ab-testing-evaluation.cy.ts @@ -48,25 +48,14 @@ describe("A/B Testing Evaluation workflow", () => { cy.clickLinkAndWait('[data-cy="new-human-eval-modal-button"]') cy.get(".ant-modal-content").should("exist") - cy.get('[data-cy="variants-dropdown-0"]').trigger("mouseover") - cy.get(".ant-dropdown") - .eq(0) - .within(() => { - cy.get('[data-cy="variant-0"]').contains("app.default").click() - }) - cy.get('[data-cy="variants-dropdown-0"]').trigger("mouseout") + cy.get('[data-cy="variants-dropdown-0"]').click() + cy.get('[data-cy="variant-0"]').contains("app.default").click() - cy.get('[data-cy="variants-dropdown-1"]').trigger("mouseover") - cy.get(".ant-dropdown") - .eq(1) - .within(() => { - cy.get('[data-cy="variant-1"]').contains(`app.${app_v2}`).click() - }) - cy.get('[data-cy="variants-dropdown-1"]').trigger("mouseout") + cy.get('[data-cy="variants-dropdown-1"]').click() + cy.get('[data-cy="variant-1"]').contains(`app.${app_v2}`).click() - cy.get('[data-cy="selected-testset"]').trigger("mouseover") + cy.get('[data-cy="selected-testset"]').click() cy.get('[data-cy^="testset"]').contains(testset_name).click() - cy.get('[data-cy="selected-testset"]').trigger("mouseout") cy.clickLinkAndWait('[data-cy="start-new-evaluation-button"]') cy.url().should("include", "/human_a_b_testing") diff --git a/agenta-web/cypress/e2e/single-model-test-evaluation.cy.ts b/agenta-web/cypress/e2e/single-model-test-evaluation.cy.ts index 9414bb71d6..5a702215d0 100644 --- a/agenta-web/cypress/e2e/single-model-test-evaluation.cy.ts +++ b/agenta-web/cypress/e2e/single-model-test-evaluation.cy.ts @@ -22,13 +22,11 @@ describe("Single Model Test workflow", () => { cy.get(".ant-modal-content").should("exist") - cy.get('[data-cy="variants-dropdown-0"]').trigger("mouseover") + cy.get('[data-cy="variants-dropdown-0"]').click() cy.get('[data-cy="variant-0"]').click() - cy.get('[data-cy="variants-dropdown-0"]').trigger("mouseout") - cy.get('[data-cy="selected-testset"]').trigger("mouseover") + cy.get('[data-cy="selected-testset"]').click() cy.get('[data-cy^="testset"]').contains(testset_name).click() - cy.get('[data-cy="selected-testset"]').trigger("mouseout") cy.clickLinkAndWait('[data-cy="start-new-evaluation-button"]') cy.url().should("include", "/single_model_test") diff --git a/agenta-web/src/components/HumanEvaluationModal/HumanEvaluationModal.tsx b/agenta-web/src/components/HumanEvaluationModal/HumanEvaluationModal.tsx index 084bf22fbc..b106f7bdd2 100644 --- a/agenta-web/src/components/HumanEvaluationModal/HumanEvaluationModal.tsx +++ b/agenta-web/src/components/HumanEvaluationModal/HumanEvaluationModal.tsx @@ -3,7 +3,7 @@ import {GenericObject, JSSTheme, Parameter, Variant, StyleProps} from "@/lib/Typ import {fetchVariants} from "@/services/api" import {createNewEvaluation} from "@/services/human-evaluations/api" import {isDemo} from "@/lib/helpers/utils" -import {Button, Col, Dropdown, MenuProps, Modal, ModalProps, Row, Spin, message} from "antd" +import {Button, Col, Modal, ModalProps, Row, Select, Spin, message} from "antd" import {getErrorMessage} from "@/lib/helpers/errorHandler" import {EvaluationType} from "@/lib/enums" import {PERMISSION_ERR_MSG} from "@/lib/helpers/axiosConfig" @@ -14,7 +14,7 @@ import {createUseStyles} from "react-jss" import EvaluationErrorModal from "../Evaluations/EvaluationErrorModal" import {dynamicComponent} from "@/lib/helpers/dynamic" import {useLoadTestsetsList} from "@/services/testsets/api" -import {CaretDown, Play} from "@phosphor-icons/react" +import {Play} from "@phosphor-icons/react" const useStyles = createUseStyles((theme: JSSTheme) => ({ evaluationContainer: { @@ -45,10 +45,6 @@ const useStyles = createUseStyles((theme: JSSTheme) => ({ alignItems: "center", width: "100%", }, - dropdownBtn: { - marginRight: 10, - width: "100%", - }, optionSelected: { border: "1px solid #1668dc", "& .ant-select-selection-item": { @@ -96,10 +92,6 @@ const useStyles = createUseStyles((theme: JSSTheme) => ({ paddingLeft: 10, paddingRight: 10, }, - variantDropdown: { - marginRight: 10, - width: "100%", - }, newCodeEval: { display: "flex", alignItems: "center", @@ -226,28 +218,12 @@ const HumanEvaluationModal = ({ setSelectedTestset(testsetsList[selectedTestsetIndexInTestsetsList]) } - const getTestsetDropdownMenu = (): MenuProps => { - const items: MenuProps["items"] = testsetsList.map((testset, index) => { - return { - label: ( - <> -
Which testset you want to use?
-