magefree / magefree/mage

Refactor: tests must use good commands order (need some fixes)

Open
#13,123 0 comments 0 reactions 0 assignees View on GitHub
refactoring tests
Dominant language
Java
Stars
2.4k
Forks
940
Avg merge
2d 12h
Merged PRs (30d)
160

Description

There are ~50 false positive tests with wrong commands order. It's fine in most use cases and require only commands rearrange (e.g. put check or activate/attack to another line). But some tests can be badly designed in theory, so it must be fixed with carefully (make sure it's fine with test logic).

Search new code 9816ec7c26aeac588a35e56a781fc897b9809cf8 for `TODO: delete/comment and fix all failed tests` and enable that check. New check must catch some type of typos in commands to fail it fast.

Error example:
```
java.lang.AssertionError: Found wrong commands order for PlayerA:
T5.M2: activate:{T}: {this} deals$target=Shambling Ghoul
T5.DA: attack:Silvercoat Lion
```

Fix example:
![shot_241207_224504](https://github.com/user-attachments/assets/ca3c34ca-5cb1-47d3-af26-6371eca86d97)

Contributor guide

No contributing guide indexed for this repository

Research direction

Search commit 9816ec7c26aeac588a35e56a781fc897b9809cf8 for `TODO: delete/comment and fix all failed tests`, then inspect the roughly 50 tests with wrong command order. Verify each rearrangement against its test logic, enable the check, and run the affected tests to confirm it catches command-order typos without false positives.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
testing-qa
Issue type
Refactor
Difficulty
4/5
Estimated time
3-5 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.