Uploaded image for project: 'PUBLIC - Liferay Portal Community Edition'
  1. PUBLIC - Liferay Portal Community Edition
  2. LPS-128385

As a site admin, I want to configure PageSpeed from Site Settings

    Details

      Description

      Motivation

      With this story, we want to build PageSpeed API configuration at site level. 

      Design

      https://www.figma.com/file/I0BImwTEY740kKEseduLU5/LPS-111803-Page-audit-check-one-page-issues?node-id=413%3A92984

      Technical Requirements

      • Configuration panel will be in: Site settings > Content and Data > Pages > New section "Google PageSpeed Insights"
      • There will be a check: Enable Google PageSpeed Insights. It will be checked by default. When disabled, the Page Audit icon won't be visible from the view mode of the pages in the site (see LPS-119068) in the site. Help text: Google PageSpeed Insights can find accessibility and SEO issues in your pages, and provide suggestions to fix them. 
      • Field to enter the API Key (format: AIzaSyAq-oKsvIhlYHdk1UXCFy63h74ECIgbgbE)
      • There will be a check for setting specific timeout:
        • Label: Set Specific Timeout Time. Not checked by default.
        • Help text 1 (under the check, above the field): If not checked, system default values for timeout will be applied.
        • Help text 2 (under the field): Define the time (in milliseconds) before a PageSpeed Insights request times out.
        • Default value: 30000 millisecs
      • There will be a field for specifying the "strategy" parameter for the API:
        • Label: Preferred Strategy
        • Help text: Select what kind of device you want to audit for. Mobile strategy includes additional checks. Selected strategy will be applied to all page audits in the site.
        • Dropdown to select Mobile or Desktop. Default value: Mobile
      • Site settings values overwrite Instance and System values for that particular site, but the feature has to be enabled in both of them for the site settings to show it.

      Acceptance Criteria

        • Given the Connect with Page Speed button and a user with just site admin permissions
        • When the user is led to the config page at the site level, and s/he clicks Save, Cancel or Back buttons
        • Then the user is led to the page view again.
        • Given the Site settings
        • When the user goes to Pages > Instance scope > New tab "Google PageSpeed Insights" __ 
        • Then the section (tab) Google PageSpeed Insights shows 
        • Given the Google PageSpeed Insights settings page
        • Then there's a check: Enable Google PageSpeed Insights, it is checked by default, the field to enter the API Key is enabled and there is a help text: Google PageSpeed Insights can find accessibility and SEO issues in your pages, and provide suggestions to fix them.
        • Given the Google PageSpeed Insights settings page
        • When the Enable Google PageSpeed Insights check is unchecked
        • Then the Page Audit icon won't be visible from the view mode of the pages in the site (see LPS-119068), and the rest of the fields and the checks on the page show as disabled.
        • Given the Google PageSpeed Insights settings page and the Enable Google PageSpeed Insights check is checked
        • When the Enable Google PageSpeed Insights check is checked and the user checks the Set specific timeout check
        • Then the field for setting specific value is enabled, it shows 30000 millisecs as default value and the two help texts above and under the field are shown as enabled
        • Given the Google PageSpeed settings page 
        • When the Enable Google PageSpeed check is checked 
        • Then the field for specifying the strategy is enabled, the label Preferred Strategy and the help text: Select what kind of device you want to audit for. Mobile strategy includes additional checks. Selected strategy will be applied to all page audits. show, and the dropdown is enabled
        • Given the Preferred Strategy dropdown
        • When the users selects mobile or desktop and then hits save
        • Then the API call retrieves results for mobile or desktop accordingly for all pages in the site

      -

      • Given the PageSpeed Insights settings in the Instance Settings
      • When Google PageSpeed Insights is not enabled (unchecked)
      • Then the tab Google PageSpeed Insights is not visible from the site settings

       

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              julia.molano Julia Molano
              Reporter:
              julia.molano Julia Molano
              Engineering Assignee:
              Alejandro Tardín
              Recent user:
              Alejandro Tardín
              Participants of an Issue:
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Dates

                Created:
                Updated:

                  Packages

                  Version Package
                  Master