Details

    • Type: Testing
    • Status: Blocked
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: JS APIs and Utilities
    • Labels:
      None
    • Story Points:
      1
    • Sprint:
      S05E01 - Dark Souls, S05E02 - Path of Exile, S05E03 - Tibia, S05E04 - Half Life
    • Testing Type:
      Automation

      Description

      The focus of this task is to implement automation tests for session auto-extension as detailed in https://github.com/liferay-frontend/liferay-portal/pull/1876#issue-837164210

      Summary:

      We do not have automation test coverage for this feature and is needed since it affects a number of usecases.

      • Create a subtask for each testcase
      • Assign subtask to yourself
      • Send to liferay-frontend and request QA reviewer
      • Close subtask when merged

      Test Scenarios:
      **

      See steps to reproduce in LPS-146459

      Prerequisites:

      • portal-ext has following properties
        session.timeout=2
        session.timeout.auto.extend.offset=115 
      • Open Browser Dev Tools > Network tab: to check for periodic `extend_session` requests

      Case 1: User is not logged in

      • session is extended indefinitely
      • periodic 'extend_session' requests

      Case 2: User is logged in, with 'remember me' option

      • session is extended indefinitely
      • no periodic requests
      • session cookie

      Case 3: User is logged in, without 'remember me' option, session.timeout.auto.extend=false

      • session warning after session.timeout.warning time
      • session expires after session.timeout time

      Case 4:
      Given session.timeout.auto.extend=true
      When User is logged in, without 'remember me' option
      {{Then }}session is extended indefinitely
      And Then periodic 'extend_session' requests

      Case 5:

      Given
      option, session.timeout.auto.extend=false
      User is logged in, without 'remember me'
      When autoExtend is toggled to true with JS. `Liferay.Session.set('autoExtend', true);`
      And Then periodic 'extend_session' requests
      Then session is extended indefinitely

      Case 6: Maintain session in multiple tabs. See LPS-82336 for steps to reproduce.
      Given Signed in as user
      And Given another browser tab signed in as user
      When wait for ~1 minute
      Then session expiration warning message is ** displayed on both browsers
      And When click extend session
      Then warning message is not present on both browsers
      And When wait for ~1 minute
      Then session expiration warning message is displayed on both browsers

      Case 7: If browser is suspended and session expires server-side, when browser recovers it should expire session. See LPS-137264
      Given User is logged in, without 'remember me' option
      When Freeze browser
      And When wait until session is expired (~2 mins)**
      And When Unfreeze browser**
      {{Then }}warning message "Due to inactivity, your session has expired. Please save any data you may have entered before refreshing the page" is present
      And Then no warning traces in the log files

      Case 8: If browser has disabled cookies, the behavior is the same as in Case 1. See LPS-71319

       

        Attachments

          Activity

            People

            Assignee:
            kevin.wan Kevin Wan
            Reporter:
            john.co John Co
            Recent user:
            John Co
            Participants of an Issue:
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:

                Packages

                Version Package