mirror of
https://github.com/wassname/Open-Assistant.git
synced 2026-07-19 11:20:04 +08:00
* website: Support new widget types for labelling Adds proper support for yes/no spam style questions as well as a simple interface for flag style labels. Also cleaned up the Task component to fix some rerender issues. * website: Fix some UI text, adjust yes/no button alignment * website: Remove left over console.log Co-authored-by: notmd <33456881+notmd@users.noreply.github.com> --------- Co-authored-by: notmd <33456881+notmd@users.noreply.github.com>
31 lines
985 B
TypeScript
31 lines
985 B
TypeScript
describe("labeling assistant replies", () => {
|
|
it("completes the current task on submit and on request shows a new task", () => {
|
|
cy.signInWithEmail("cypress@example.com");
|
|
cy.visit("/label/label_assistant_reply");
|
|
|
|
cy.get('[data-cy="task"]')
|
|
.invoke("attr", "data-task-type")
|
|
.then((type) => {
|
|
cy.log("Task type", type);
|
|
|
|
// For specific task pages the no task available result is normal.
|
|
if (type === undefined) return;
|
|
|
|
cy.get('[data-cy="label-question"]').each((label) => {
|
|
// Click the no button, this generally approves the spam check
|
|
cy.wrap(label).find('[data-cy="no"]').click();
|
|
});
|
|
cy.get('[data-cy="label-options"]').each((label) => {
|
|
// Click the 4th option
|
|
cy.wrap(label).find('[data-cy="radio-option"]').eq(3).click();
|
|
});
|
|
|
|
cy.get('[data-cy="review"]').click();
|
|
|
|
cy.get('[data-cy="submit"]').click();
|
|
});
|
|
});
|
|
});
|
|
|
|
export {};
|