Problem/Motivation

/user is a redirect in 8.x if you are not logged in. Right now all browser tests need to do an additional, useless roundtrip when logging in.

Each request doesn't make a bug difference but we are obviously doing this *a lot* across all tests, so this should help a small bit.

Proposed resolution

Change /user to /user/login in that method.

Remaining tasks

Verify manually that we save a request with the verbose output.

User interface changes

API changes

Data model changes

CommentFileSizeAuthor
#5 2832080-1.patch544 bytescebasqueira
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Berdir created an issue. See original summary.

Berdir’s picture

Issue summary: View changes
Berdir’s picture

Title: \Drupal\Tests\BrowserTestBase::drupalLogin() does an unnecessary redirect from /user to /user/login for each login » BrowserTestBase::drupalLogin() does an unnecessary redirect from /user to /user/login for each login
klausi’s picture

Component: simpletest.module » phpunit
cebasqueira’s picture

Status: Active » Needs review
FileSize
544 bytes

Version: 8.3.x-dev » 8.4.x-dev

Drupal 8.3.0-alpha1 will be released the week of January 30, 2017, which means new developments and disruptive changes should now be targeted against the 8.4.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

programemos’s picture

Status: Needs review » Reviewed & tested by the community

I applied the patche and everything is working correctly

programemos’s picture

Issue tags: +SprintWeekend2017
alexpott’s picture

Status: Reviewed & tested by the community » Fixed

Nice find. Committed and pushed ac55a70 to 8.4.x and 61a0850 to 8.3.x. Thanks!

  • alexpott committed ac55a70 on 8.4.x
    Issue #2832080 by cebasqueira, Berdir: BrowserTestBase::drupalLogin()...

  • alexpott committed 61a0850 on 8.3.x
    Issue #2832080 by cebasqueira, Berdir: BrowserTestBase::drupalLogin()...

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.