[RFC] adding test framework
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 8/100
- Issue type
- Feature
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- javascript, python
- Domain
- testing
Research direction
This is an RFC proposing a new shared test module, pos_test_framework, with helpers such as open_session(), sale() and close_session(). Read the existing Python tests linked in the issue, tests/test_pos.py in pos_session_closing_stock_error and test_pos_multiple_control.py in pos_multiple_control, to see the repeated setup. Done means a design agreed by maintainers, since the issue has no assignee, no linked pull request, and no reply in about 1552 days.
Written by the indexing model from the issue text.
Description
Hi all,
Is your feature request related to a problem?
we regurlarly needs to makes python test, regarding PoS. for exemple, https://github.com/OCA/pos/blob/12.0/pos_session_closing_stock_error/tests/test_pos.py by @ivantodorovich, https://github.com/OCA/pos/blob/12.0/pos_multiple_control/tests/test_pos_multiple_control.py#L10 by @quentinDupont and Me.
The test are very verbose. It requires lot of lines of code, just to open a session, make a sale, add payment, etc... and it's quite a mess.
Describe the solution you'd like
Add a module pos_test_framework, that could provide test function like def open_session(), def sale(product=False, qty=False), def close_session(), etc... and make new modules, in V15 depends on that module.
We could also provide helper also for js scripts.
Thanks for your point of view.
CC : @OCA/pos-maintainers
- Dominant language
- HTML
- Stars
- 362
- Forks
- 702
- Avg merge
- 4d 2h
- Merged PRs (30d)
- 8
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from OCA/pos
-
help wanted no stale work in progress
Difficulty 3/5 Half a day Newbie friendliness 50/100
Maintainers usually reply within 1 day
-
help wanted no stale work in progress
Difficulty 4/5 3-5 days Newbie friendliness 15/100
Maintainers usually reply within 1 day
-
help wanted no stale work in progress
Difficulty 3/5 Over a week Newbie friendliness 45/100
Maintainers usually reply within 1 day
-
bug no stale
Difficulty 4/5 3-5 days Newbie friendliness 12/100
Maintainers usually reply within 1 day
-
help wanted no stale work in progress
Difficulty 3/5 1-2 days Newbie friendliness 35/100
Maintainers usually reply within 1 day
Similar issues
-
[prefer-expect-resolves] autofix leaves a stray ")" when the awaited expression is parenthesizedOpen
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
jest-community/eslint-plugin-jest#2052 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 88/100
johanhaleby/occurrent#1505 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
jeanibarz/knowledge-base-mcp-server#1262 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
future-agi/future-agi#4092 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
Maintainers usually reply within 1 day