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

I want to know why Page Audit is not working so that I can fix the causes

    Details

      Description

      Motivation

      Decide which errors specified by PageSpeed API we will be showing:

      https://developers.google.com/speed/pagespeed/service/errors 

      Requirements

      1. Incorrect API key: when the API key is set but it is not valid, the Page Speed API will return a specific error. We will show:

      1.1. An error message: Invalid API Key.

      1.2. A "Show details" link, that will display the info details of the error, provided by the API.

      1.3. A button "Set API Key" that will show when the user has permissions, and leads to system, instance o site settings depending on the level of permissions.

      1.4. When the user has no permissions to access the settings, a message will show: "You can set the API Key from Site Settings > Pages > Google PageSpeed Insights.

      2. Intranet page / under login page and local-run Liferay (500 error): We will show:

      2.1. A warning message: This page can’t be audited. Private, local, or intranet pages cannot be audited as they are not accessible from the Internet. Show error details. 

      2.2. A "Show details" link, that will display the info details of the error, provided by the API.

      3. Private page: as we know when a page is private, this message will be always shown in private pages: This page can’t be audited. Private, local, or intranet's pages cannot be audited as they are not accessible from the Internet.

      3.1. In private pages, the reload button won't be visible. 

      Design

      https://www.figma.com/file/ubR4L2j9AxVfX71hXKS4NB/LPS-134760-why-Page-Audit-is-not-working-so-I-can-fix-the-causes?node-id=1%3A57

      Requirements
       
      Acceptance Criteria
       
      Test Strategy
       
      Covered by frontend / backend test? (Yes/No)
       
      1. Incorrect API key: when the API key is set but it is not valid, the Page Speed API will return a specific error      YES
       1.1. An error message: Invalid API Key.
      • Given the Page Audit panel
      • When the API key is set but it is not valid
      • Then the Page Speed API will return the error message: Invalid API Key.
      Low  YES
       1.2. A "Show details" link, that will display the info details of the error, provided by the API.
      • Given the Page Audit panel
      • When the API key is set but it is not valid
      • Then the Page Speed API will show a "Show details" link, that will display the info details of the error, provided by the API.
      Medium  NO
       1.3. A button Set API Key that will show when the user has permissions, and leads to system, instance o site settings depending on the level of permissions.
      • Given the Page Audit panel
      • When the API key is set but it is not valid and the user has permissions to access System, Instance o Site settings
      • Then the Page Speed API will show a button Set API Key
      Low  NO
       
      • Given the button Set API Key
      • When a user with permissions to access System Settings clicks on it
      • Then the user is lead to System Settings
      High  NO
       
      • Given the button Set API Key
      • When a user with permissions to access Instance Settings clicks on it
      • Then the user is lead to Instance Settings
      High NO 
       
      • Given the button Set API Key
      • When a user with permissions to access Site Settings clicks on it
      • Then the user is lead to Site Settings
      High  NO
       1.4. When the user has no permissions to access the settings, a message "Set API Key will show: "You can set the API Key from Site Settings > Pages > Google PageSpeed Insights.
      • Given the Page Audit panel
      • When the API key is set but it is not valid and the user has NOT permissions to access System, Instance o Site settings
      • Then a message "Set API Key will show: "You can set the API Key from Site Settings > Pages > Google PageSpeed Insights."
      Low  NO    
      2. Intranet page / under login page and local-run Liferay (500 error) will give an error back  
      •  
      -
       2.1. A warning message: This page can’t be audited. Private, local, or intranet pages cannot be audited as they are not accessible from the Internet. Show error details. 
      • Given the Page Audit panel in a local-run page
      • When the API key is set
      • Then a warning message is displayed: This page can’t be audited. Private, local, or intranet pages cannot be audited as they are not accessible from the Internet. Show error details. 
      Low  NO
       
      • Given the Page Audit panel in an intranet page or a page under login
      • When the API key is set
      • Then a warning message is displayed: This page can’t be audited. Private, local, or intranet pages cannot be audited as they are not accessible from the Internet. Show error details. 
      Low NO
       
      • Given the Page Audit panel in a private page
      • When the API key is set
      • Then a warning message is displayed: This page can’t be audited. Private, local, or intranet pages cannot be audited as they are not accessible from the Internet. Show error details. 
      Low  NO
       2.2. A "Show details" link, that will display the info details of the error, provided by the API.
      • Given the Page Audit panel in a local run
      • When the API key is set
      • Then a "Show details" link, that will display the info details of the error, provided by the API.
      Low  NO
       2.2. A "Show details" link, that will display the info details of the error, provided by the API.
      • Given the Page Audit panel in an intranet
      • When the API key is set
      • Then a "Show details" link, that will display the info details of the error, provided by the API.
      Low NO 
       2.2. A "Show details" link, that will display the info details of the error, provided by the API.
      • Given the Page Audit panel in a private page
      • When the API key is set
      • Then a "Show details" link, that will display the info details of the error, provided by the API.
      Low NO 
      3. Private page: as we know when a page is private, this message will be always shown in private pages: This page can’t be audited. Private, local, or intranet's pages cannot be audited as they are not accessible from the Internet.
      • Given a private page
      • Then a message will be shown: This page can’t be audited. Private, local, or intranet's pages cannot be audited as they are not accessible from the Internet.
      Low  NO
       3.1. In private pages, the reload button won't be visible. 
      • Given the Page Audit panel in a private page
      • Then the reload button won't be visible.
      Medium  NO
       In all error cases except the private pages one, it must be allowed to change language version of the page      
       4.0 When there is an unexpected error, which is not caused by API invalid or because it is a private, local or intranet page, an error message An unexpected error occurred. is shown
      • Given the Page Audit panel
      • When there is an error not caused by API invalid or because it is a private, local or intranet page
      • Then tan error message An unexpected error occurred. is shown
      Low NO

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              support-qa Support QA
              Reporter:
              julia.molano Julia Molano
              Engineering Assignee:
              Susana Vázquez
              Recent user:
              Sophia Zhang
              Participants of an Issue:
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Packages

                  Version Package
                  7.4.2 CE GA3 DXP 7,4
                  7.4.13 DXP GA1
                  Master