Problem/Motivation
As #3004840: Fix testbot errors is resolved we can fix the tests.
The tests are currently XPath selecting wrong. Please fix them.
Proposed resolution
Fix tests and preferably use CSS Selectors.
Remaining tasks
- The form flow is different then tested: no messages, the edit form keeps active
- Delete is a link so we cannot post and it has a confirms from.
- Counts for number of items changed as Tour UI added tours too
- Having separate tests for the List, Edit Tour and Edit Tip would help improving fixing test as TestUI now always fails.
User interface changes
API changes
Data model changes
| Comment | File | Size | Author |
|---|---|---|---|
| #19 | tour_ui-3009733-19.patch | 1.88 KB | clemens.tolboom |
| #17 | tour_ui-3009733-15.patch | 912 bytes | clemens.tolboom |
| #16 | Screenshot 2020-05-22 at 17.27.01.png | 32.6 KB | clemens.tolboom |
| #15 | Screenshot 2020-05-22 at 17.19.35.png | 39.14 KB | clemens.tolboom |
| #15 | Screenshot 2020-05-22 at 14.36.33.png | 24.8 KB | clemens.tolboom |
Comments
Comment #2
clemens.tolboomI'm lost regarding running tests locally so will using the testbot
Testbot result 1.
This is about CR drupalPost() and drupalPostAJAX() have been renamed
Comment #3
clemens.tolboomComment #4
clemens.tolboomconfig() is deprecated and should be replaced by \Drupal::config()
Comment #5
clemens.tolboomComment #7
clemens.tolboomI've committed work so far from patch #5.
Bottom line is
- the form flow is different then tested: no messages, the edit form keeps active
- delete is a link so we cannot post and it has a confirms from.
- counts for number of items changed as Tour UI added tours too
- I think having separate tests for the List, Edit Tour and Edit Tip would help improving fixing test as TestUI now always fails.
Comment #8
clemens.tolboomIn #3073427: Run deprecation tests tests where touched too but I was struggling with the test(s)/bot. So we continue here for fixing the last mile.
Comment #9
clemens.tolboomTestbot gives (D8 and D9)
Local testing
PHP Unit
Comment #10
clemens.tolboomhttps://www.drupal.org/docs/8/testing/phpunit-in-drupal hints for PHP Unit 6.5
Downgrading to 6.5 then run test locally on http://drupal.d8/admin/config/development/testing gives
Comment #11
mradcliffeI think phpunit.xml would need to be modified if downgrading phpunit, but that may be not remembering something about the listener class exception.
My intuition is that not having double quotes around
@class=:classmight be causing the issue. Although I was looking in some other code, and I haven't been using xpath method directly, but usingHope that helps.
Comment #12
mradcliffeYes, something is going on with the xpath expression using the xpathQueryBuilder.
Doing something like this works, somewhat (although the assertions are failing)
It really doesn't like using
#tour-routesin an xpath expression.Comment #13
clemens.tolboom@mradcliffe thanks for chiming in.
I am testing locally through the Drupal UI and did nothing in particular with
phpunit.xmlassuming Drupal will complain for wrong stuff :-/. There isls web/core/phpunit.xml.dist.As D9 testbot complains maybe we shorten the path to
Checking with https://www.php.net/manual/en/domxpath.query.php and web/core/tests/Drupal/Tests/BrowserTestBase.php:630 did not help supporting that.
But I give it a try by committing yet another snippet :-(
Comment #14
clemens.tolboomComment #15
clemens.tolboomWhy is it waiting for branch ... we all know that will fail :-/
Here just some images from the https://www.drupal.org/node/1933602/qa page driving me mad
4 items / 2 configured
This is probably old versus new running tests.
2 configured
Waiting for branch test
Comment #16
clemens.tolboomI clicked the link 'Waiting for branch to pass' then could skip this. Now got
Comment #17
clemens.tolboomThere is NO id '#tour-routes' ONLY a class.
As I cannot test locally hope this will do?
Comment #19
clemens.tolboomAdded code sniffer fixes and changed some stuff
Comment #20
clemens.tolboomComment #21
clemens.tolboomComment #24
clemens.tolboomI stop trying to fix this ... will make a new issue #3139157: Fix tests NG with my findings.
Comment #25
clemens.tolboomSet status to fixed (which it is not but added some fixes reported by testbot / @mradcliffe
/ @clemens.tolboom
tbc through #3139157: Fix tests NG