Skip to content

Commit

Permalink
fix last thing
Browse files Browse the repository at this point in the history
  • Loading branch information
kentcdodds committed Mar 11, 2022
1 parent c3027f6 commit 0d692fb
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
2 changes: 1 addition & 1 deletion app/routes/notes.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ export default function NotesPage() {
<hr />

{data.noteListItems.length === 0 ? (
<p>No notes yet</p>
<p className="p-4">No notes yet</p>
) : (
<ol>
{data.noteListItems.map((note) => (
Expand Down
8 changes: 3 additions & 5 deletions cypress/e2e/smoke.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,15 @@ describe("smoke tests", () => {
cy.then(() => ({ email: loginForm.email })).as("user");

cy.visit("/");
cy.findByRole("link", { name: /login/i }).click();
cy.findByRole("link", { name: /sign up/i }).click();
cy.findByRole("heading", { name: /join/i });

cy.findByRole("textbox", { name: /email/i }).type(loginForm.email);
cy.findByLabelText(/password/i).type(loginForm.password);
cy.findByRole("button", { name: /join/i }).click();
cy.findByRole("button", { name: /create account/i }).click();

cy.findByRole("link", { name: /notes/i }).click();
cy.findByRole("button", { name: /logout/i }).click();
cy.findByRole("link", { name: /login/i });
cy.findByRole("link", { name: /log in/i });
});

it("should allow you to make a note", () => {
Expand All @@ -37,7 +35,7 @@ describe("smoke tests", () => {
cy.findByRole("link", { name: /notes/i }).click();
cy.findByText("No notes yet");

cy.findByRole("link", { name: /create new note/i }).click();
cy.findByRole("link", { name: /\+ new note/i }).click();

cy.findByRole("textbox", { name: /title/i }).type(testNote.title);
cy.findByRole("textbox", { name: /body/i }).type(testNote.body);
Expand Down

0 comments on commit 0d692fb

Please sign in to comment.