Files
Open-Assistant/website/cypress/e2e/tasks/no_tasks_available.cy.ts
T
rjmacarthy 24f4c08796 Refactor task page routes and repetition
Remove blank line

Lint add blank line

Link pre-commit
2023-01-27 10:16:02 +00:00

24 lines
665 B
TypeScript

describe("no tasks available", () => {
it("displays an empty state when no tasks are available", () => {
cy.signInWithEmail("cypress@example.com");
cy.intercept(
{
method: "GET",
url: "/api/new_task/prompter_reply",
},
{
statusCode: 500,
body: {
message: "No tasks of type 'label_prompter_reply' are currently available.",
errorCode: 1006,
httpStatusCode: 503,
},
}
).as("newTaskPrompterReply");
cy.visit("/create/user_reply");
cy.wait("@newTaskPrompterReply").then(() => {
cy.get('[data-cy="cy-no-tasks"]').should("exist");
});
});
});