Skip to content

Commit 74eeff9

Browse files
committed
User flow tests fixed
1 parent c560997 commit 74eeff9

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

cypress/e2e/auth.cy.js

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,23 @@
1+
import { Default as TaskListDefault } from "../../src/components/TaskList.stories";
2+
13
describe("The Login Page", () => {
4+
beforeEach(() => {
5+
cy.intercept("POST", "/authenticate", {
6+
statusCode: 201,
7+
body: {
8+
user: {
9+
name: "Alice Carr",
10+
token: "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9",
11+
},
12+
},
13+
});
14+
15+
cy.intercept("GET", "/tasks", {
16+
statusCode: 201,
17+
body: TaskListDefault.args,
18+
});
19+
});
20+
221
it("user can authenticate using the login form", () => {
322
const email = "[email protected]";
423
const password = "k12h1k0$5;lpa@Afn";

0 commit comments

Comments
 (0)