Skip to content

VadymSavchenko/PDF-Expert-task

Repository files navigation

Instructions:

  1. Install dependencies: npm install and npx playwright install --with-deps
  2. Check .env file for parameters
  3. Run tests: npx playwright test

Short Test Plan

Environment

  • Node.js v20
  • Playwright v1.50.1
  • Server: localhost:3000 with possible deployment to CI/CD with automatic server initialization

What Will Be Tested

  • Authentication
  • File Upload and Conversion
  • Upload history
  • Security

Test Cases

  • User cannot login with an invalid email
  • User cannot login with an invalid password
  • User can login with valid credentials and logout
  • Empty Field Validations
  • History entry for a converted PDF file
  • History entry for an unconverted file
  • History entry for an invalid file
  • Secure Cookie Verification
  • Access to Protected Routes Without Authentication
  • Redirect After Logout
  • Application Health Check
  • Basic UI Navigation
  • Valid PDF File Upload via Drag and Drop
  • Invalid File Upload via Drag and Drop
  • Valid PDF File Upload via File Input
  • Multiple Consecutive File Uploads

Bugs

  • /history endpoint can be accessed without authentication. This also exposes /convert from the history page.
  • The /api/health endpoint can hang the application
  • Document download ocasionaly returns a 500 error, causing file download failures.
  • The processed file may be an empty DOCX file instead of valid content.
  • Flaky upload behavior with valid input file.
  • The download button ocasionaly does not show up.
  • Removing a file from the dropzone triggers a conversion submission without file data, resulting in a "No file provided" error.
  • File name overflows the width of the column in the history page if the file name is long.
  • Login ocasionaly fails with no error message.
  • The authentcation cookie is set with httpOnly: false, which exposes sensitive credentials to client-side scripts.
  • Unreliable Authentication Check on Convert Page:

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published