Skip to content

Commit 1be3740

Browse files
committed
Enable VRT inputs
1 parent 7aecca0 commit 1be3740

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

src/mocks/handlers.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,12 @@ export const handlers = [
213213
status: 200,
214214
});
215215
}),
216-
http.post(API_PATH + "/questions/_llm_marked_regression_test_|INSERTID/answer", () => {
216+
http.get(API_PATH + "/questions/isaacLLMFreeTextQuestion/can_attempt", () => {
217+
return HttpResponse.json({"remainingAttempts": 30}, {
218+
status: 200,
219+
});
220+
}),
221+
http.post(API_PATH + "/questions/_regression_test_llm_/answer", () => {
217222
return HttpResponse.json(mockLLMMarkedValidationResponse, {
218223
status: 200,
219224
});

src/test/pages/LLMFreeTextQuestion.cy.tsx

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,10 @@ it('LLM-marked question page should have no visual regressions', () => {
88

99
cy.get('[data-testid="loading"]').should('not.exist');
1010

11+
cy.get('textarea').type('Hello world');
12+
cy.get('input').contains('Check my answer').click();
13+
14+
cy.scrollTo('top');
15+
1116
cy.matchImage();
1217
});

0 commit comments

Comments
 (0)