Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Problem/Motivation
Let's improve our JS test coverage
- Note: We do have quite a lot of test coverage already in FunctionalJavascript tests. From a pure effort point of view let's expand tests rather than just converting them
- #2973879: Add login/logout Nightwatch commands (and a Drupal "login" command to allow for that)
- #2974619: Create nightwatch command to install modules
- #2973873: [pp-1] Battle test the field UI using nightwatch
- #2973874: [pp-1] Battle test tabledrag
- #2973876: [pp-1] Battle test responsive tables
We can use https://www.drupal.org/node/1777342 to identify in general useful tests.
Before creating a subissue though first try to research whether we do have a functional javascript test first. It might be easier to expand that one, or convert those over and then expand them.
Comment | File | Size | Author |
---|---|---|---|
#2 | 2972229-2.patch | 3.73 KB | samuel.mortenson |
Comments
Comment #2
samuel.mortenson👋I'm new to this but made an attempt to add a login, logout, and isLoggedIn command to our Nightwatch instance. Test coverage for the new commands are included. Only settings to "Needs review" for this portion of the work required to port manual tests over, we still need to actually port the tests.
Edit: We could also have a PHP script that returns an appropriate session cookie based on a user ID, then call that with child_process, if setting a username and password feels weird to people.
Comment #3
dawehnerI think it makes sense to add the commands in its own issue.
Humans are surprisingly good in pattern recognition. I think to get the same benefit from a machine we need a more structured approach
I've updated the issue summary
Comment #4
dawehner@samuel.mortenson
I created its own issue for these basics commands: #2973879: Add login/logout Nightwatch commands (and a Drupal "login" command to allow for that) Do you mind posting your patch there? I'm happy to review it.
Comment #5
samuel.mortenson@dawehner Done!
Comment #6
tedbowComment #7
jansete CreditAttribution: jansete commentedHi!
I've created an issue to add page objects, maybe it could be a new child issue from this.
https://www.drupal.org/project/drupal/issues/2981602