Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reauthenticate behat feature failing on 1.3 branch #778

Closed
6 tasks done
dnsl48 opened this issue Dec 11, 2018 · 0 comments
Closed
6 tasks done

Reauthenticate behat feature failing on 1.3 branch #778

dnsl48 opened this issue Dec 11, 2018 · 0 comments

Comments

@dnsl48
Copy link
Contributor

dnsl48 commented Dec 11, 2018

Affected versions

silverstripe-admin 1.3, 1.3.0

Feature

@modal @retry        
Feature: Reauthenticate
  As a content editor
  I want to be able to log in through a CMS popup when my session expires
  So that I can avoid losing unsaved work

Problem

The same exact commit may pass and break on CI in two consequent builds (e.g. 6ba4a1f on https://travis-ci.org/open-sausages/silverstripe-admin).

Why this happens

  1. The Search component that has been introduced in 1.3. Underneath it uses FormBuildLoader, which performs asynchronous call to the server on component mounting.

  2. The scenario background after loading the page performs a session expiration.

  3. Apparently, sometimes the session expiration step goes ahead of the search component rendering, so that the ajax request to the server triggers a new session generation. At this stage, LeftAndMain controller handles it as a security failure and the Security module registers a session flush message, given by the LeftAndMain controller.

  4. Sometimes, at this point the test kicks in before the browser handles the redirect and tries to perform Add Member action.

  5. At this point the IFrame with the login form gets rendered with the session flush message, registered in the step 3. Which has different copy from the default one. At this point the scenario fails with the following screenshot:

reauthenticate feature_30

PRs

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants