Review main Merged

84403[TASK] Avoid wantTo() and wantToTest() in ac tests

Garvin Hicking CR +2 V +2 Normal +12 −76 updated 05/27/24, 12:01

Commit message

Using the methods does not improve output, but makes
reading harder: A first wantTo() changes the title
of a test within the output - that is usually derived
from the test method name - to the wantTo() message.
This leads to things like different tests having the
same name. Our test names are good, use them!
Any second or other use of wantTo() does nothing in
the output at all.

The patch removes wantTo() and wantToTest() (similar
behavior), and turns some of them into code comments.

This should make the test logs more easy to understand
and follow.

Review

  • Code review CR +2 Done
    • Christian Kuhn +2
    • Stefan Bürk +1
  • Verified V +2 Done
    • Christian Kuhn +2
    • Stefan Bürk +1
    • core-ci +1 CI

Issues 1

Files 12

Review log 1518

  1. Garvin Hicking uploaded patch set 1 05/25/24, 23:10

  2. Garvin Hicking commented on patch set 1 05/25/24, 23:11

    This may help for better readability of this flailing test cest?
  3. core-ci voted on patch set 1 V +1 05/25/24, 23:15 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/58231

  4. Christian Kuhn commented on patch set 1 CR -1 05/26/24, 06:56

    TasksCest.php:39

    what's the point? that's close to indentical to the method name and follows it directly in the output?
  5. Garvin Hicking commented on patch set 1 05/26/24, 07:30

    TasksCest.php:39 Reply

    The point is the output difference. Without it the output says twice "click save". Thats not what the test is about.
  6. Christian Kuhn commented on patch set 1 05/26/24, 09:18

    TasksCest.php:39 Reply

    remove the $I->wantTo('Click "Save"'); then? i'm not a huge fan of wantTo() - they tend to be more puzzling than helpful.
  7. Garvin Hicking uploaded patch set 2 CR -1 V +1 05/27/24, 07:50

    Remove wantTo
  8. Garvin Hicking commented on patch set 2 05/27/24, 07:51

    TasksCest.php:39 Reply

    Sure, that could work too. Adapted the patch. BTW, I had the failure on my local acceptance test (ran via `./Build/Scripts/runTests.sh -s acceptance typo3/sysext/core/Tests/Acceptance/Application/Scheduler/TasksCest.php`) too once now.
  9. core-ci voted on patch set 2 V +1 05/27/24, 07:55 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/58324

  10. Benjamin Franzke commented on patch set 2 CR -1 05/27/24, 08:19

    TasksCest.php:39 Reply

    I think the commit message now needs to be adapted accordingly, right(?)
  11. Garvin Hicking commented on patch set 2 05/27/24, 08:30

    TasksCest.php:39 Reply

    IMO not, because by removing "wantTo" the specifity now falls back to the name of the method. But open to suggestions, feel free to edit the title please :-)
  12. Christian Kuhn uploaded patch set 3 CR -1 V +1 05/27/24, 08:53

  13. Christian Kuhn commented on patch set 3 05/27/24, 08:54

    TasksCest.php:39 Reply

    Done
  14. core-ci voted on patch set 3 V +1 05/27/24, 09:00 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/58329

  15. Christian Kuhn voted on patch set 3 CR +1 V +1 05/27/24, 09:28

  16. Stefan Bürk voted on patch set 3 CR +1 V +1 05/27/24, 09:38

  17. Christian Kuhn voted on patch set 3 CR +2 V +2 05/27/24, 12:01

  18. Christian Kuhn merged patch set 4 05/27/24, 12:01