DEV Community

Cover image for Devlog #01
Martin Emmert
Martin Emmert

Posted on β€’ Edited on

1

Devlog #01

27.08.2020

After bootstrapping my new application with my personal example NextJs application, I prepared the phrasing of test cases that should be passed to match the acceptance criteria of the first user story.

As a user, I want to write down my thoughts in a bullet list so that I can see them all in one place. #2

Acceptance criteria:

  • [ ] the document is initially empty
  • [ ] each bullet point has a unique id
  • [ ] pressing enter exits the editing of the current bullet point, creates a new one below and enters its editing mode
  • [ ] pressing escape discards the current changes, if nothing was written, the bullet point is removed

Screenshot of empty test descriptions


After that, I added some actual tests and wrote the code needed to pass them.

Screenshot of test cases that describe what my program should do if a button with the text Add is clicked

Screenshot of code that passes the updated test cases

Screenshot of Terminal with green tests

πŸ‘


Finally, I updated the first test case with my expectations of what should happen if the 'Add' button is clicked twice.

Screenshot of test cases that describe what my program should do if a button with the text Add is clicked twice

I really like writing tests with the @testing-library. It gives the reader a clear picture of what to expect without going into the implementation details.

The implementation will be part of the next update.


Cover Photo by Volodymyr Hryshchenko on Unsplash

Image of Docusign

πŸ› οΈ Bring your solution into Docusign. Reach over 1.6M customers.

Docusign is now extensible. Overcome challenges with disconnected products and inaccessible data by bringing your solutions into Docusign and publishing to 1.6M customers in the App Center.

Learn more

Top comments (0)

Sentry image

See why 4M developers consider Sentry, β€œnot bad.”

Fixing code doesn’t have to be the worst part of your day. Learn how Sentry can help.

Learn more

πŸ‘‹ Kindness is contagious

Please leave a ❀️ or a friendly comment on this post if you found it helpful!

Okay