PrestaShop / PrestaShop/ui-testing-library

isTextInPDF newline comma is really fragile

Open
#298 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
1
Forks
23
Avg merge
56m
Merged PRs (30d)
4

Description

while doing https://github.com/PrestaShop/PrestaShop/pull/35356 I stumbled upon this comma issue and while that pr was using older version of utils/file it had the same issue that 1) deleteComma was not properly documented 2) it is really hard to write a test case where whitespace does not matter.

I will open a pr that at least adds some documentation for the next person who is stuck with this but a better solution would be to rename the parameter to "ignoreWhiteSpaceAndNewLines" or something like that and then do that better.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Locate isTextInPDF and its deleteComma parameter in the TypeScript source, then inspect the existing tests to understand why whitespace makes the behavior difficult to exercise. Done means documenting the parameter clearly; confirm with maintainers whether renaming it and improving the whitespace-sensitive test behavior are also in scope.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
testing
Issue type
Documentation
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.