You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
At some point in the not-too-distant past, the boilerplate code that drush generate test:browser generated passed without making any changes. I'm pretty sure that it was passing within the last 6 months.
But, when I tried to run the tests as-is today, the test failed. I'm pretty sure this is due to a change to Drupal core code, but I have been unsuccessful so far in tracking it down.
I did figure out (with the help of some of my students) that if the $admin_user is given an additional permission, then the test passes:
$admin_user = $this->drupalCreateUser([
'access administration pages',
'administer site configuration',
]);
I'm pretty sure that the administer site configuration permission needs to be added to the drush generate test:browser output, but what I'd really like is to figure out exactly why it is now needed. The route for the 'admin' path indicates that only the "access administration pages" permission is required. From system.routing.yml:
Describe the bug
At some point in the not-too-distant past, the boilerplate code that
drush generate test:browser
generated passed without making any changes. I'm pretty sure that it was passing within the last 6 months.But, when I tried to run the tests as-is today, the test failed. I'm pretty sure this is due to a change to Drupal core code, but I have been unsuccessful so far in tracking it down.
I did figure out (with the help of some of my students) that if the
$admin_user
is given an additional permission, then the test passes:Before (test fails):
After (test passes):
I'm pretty sure that the
administer site configuration
permission needs to be added to thedrush generate test:browser
output, but what I'd really like is to figure out exactly why it is now needed. The route for the 'admin' path indicates that only the "access administration pages" permission is required. From system.routing.yml:I'm going to continue to research why this permission is now required - if I find anything I'll add it in a comment below.
To Reproduce
Run
drush generate test:browser
in a Drupal 10.2.3 environment and run the test. It will fail.Expected behavior
What did you expect would happen?
Actual behavior
What happened instead?
Workaround
Is there another way to do the desired action?
System Configuration
The text was updated successfully, but these errors were encountered: