Skip to content

Commit

Permalink
added dataset attribute and check for evaluations
Browse files Browse the repository at this point in the history
  • Loading branch information
bekossy committed Feb 15, 2024
1 parent 7960a48 commit 2dc4b22
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
11 changes: 10 additions & 1 deletion agenta-web/cypress/support/commands/evaluations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,16 @@ Cypress.Commands.add("removeLlmProviderKey", () => {
})

Cypress.Commands.add("createNewEvaluation", () => {
cy.get('[data-cy="new-evaluation-button"]').click()
cy.request({
url: `${Cypress.env().baseApiURL}/evaluations/?app_id=${app_id}`,
method: "GET",
}).then((resp) => {
if (resp.body.length) {
cy.get('[data-cy="new-evaluation-button"]').click()
} else {
cy.get('[data-cy="new-evaluation-button__no_variants"]').click()
}
})
cy.get(".ant-modal-content").should("exist")

cy.get('[data-cy="select-testset-group"]').click()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ const EmptyEvaluations: React.FC<Props> = ({onConfigureEvaluators, onBeginEvalua
icon={<PlusCircleOutlined />}
type="default"
onClick={onBeginEvaluation}
data-cy={"new-evaluation-button__no_variants"}
>
Begin Evaluation Now
</Button>
Expand Down

0 comments on commit 2dc4b22

Please sign in to comment.