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

Performance hints fetching smoke test #131

Open
Mai-Saad opened this issue Aug 8, 2024 · 3 comments
Open

Performance hints fetching smoke test #131

Mai-Saad opened this issue Aug 8, 2024 · 3 comments

Comments

@Mai-Saad
Copy link
Contributor

Mai-Saad commented Aug 8, 2024

Scenario: Should fetch n URLs after fresh install/activate
Given: Fresh install of WPR
And: home page have > 10 links
When: activate WPR
And: wait
Then: The 1st n URLs in home + home URL are added to the database for mobile and desktop
And: No error in debug.log
related test: https://wpmediaqa.testrail.io/index.php?/cases/view/16023

Scenario: Shouldn't cause error if no links in home page
Given: home page is set to page with no links
When: clear performance hints
then: no error in debug.log
and: only home page mobile and desktop added to DB
https://wpmediaqa.testrail.io/index.php?/cases/view/15299&group_by=cases:section_id&group_id=5030&group_order=asc&display_deleted_cases=0

Scenario: Should fetch n URLs after switch theme
Given: WPR installed and active
And: home page have > 10 links
When: switch theme
And: wait
Then: The 1st n URLs in home + home URL are added to the database for mobile and desktop
And: No error in debug.log
related test: https://wpmediaqa.testrail.io/index.php?/cases/view/16026

Scenario: Should fetch n URLs after change permalinks
Given: WPR installed and active
And: home page have > 10 links
And: permalinks with /
When: change permalinks to be without /
And: wait
Then: The 1st n URLs in home + home URL are added to the database for mobile and desktop
And: No error in debug.log
related test: https://wpmediaqa.testrail.io/index.php?/cases/view/16025

Scenario: shouldn't fetch external URLs
Given: home set to page with external URL i.e homepage_ext_int_relative_abolute_URLs
When: clear performance hints
And: wait
Then: URLs added to DB are all internal links (have the domain of test site)
And: No error in debug.log
Related test : https://wpmediaqa.testrail.io/index.php?/cases/view/16030

Scenario: shouldn't fetch RSS feed nor rest API links
Given: home set to page with RSS feed URL i.e homepage_with_rss_feed_restAPI_links
When: clear performance hints
And: wait
Then: feed and rest API links not added to DB
And: rest of links are added to DB
And: No error in debug.log
Related test: https://wpmediaqa.testrail.io/index.php?/cases/view/16035

Scenario: shouldn't fetch home if the performance hints features are disabled using filter
Given: All performance hints features are disabled
And: WPR log is enabled
When: Install and activate WPR
Then: No links are in "add to queue request" in WPR log
And: No clear performance hints is there in admin bar
And: No error in debug.log
https://wpmediaqa.testrail.io/index.php?/cases/view/16027

Note:

@MathieuLamiot
Copy link
Contributor

Many steps in common with #126 so probably we can re-use it once implemented.
I have two concerns @jeawhanlee:

  • I think we can't use ROCKET_DEBUG with Rocket-E2E right? In which case, we won't be able to access the logs to see if requests to the SaaS were made.
  • So we would only have to rely on the DB being filled, which can take up to 2 minutes (AS delay + SaaS delay) which will be very long for the tests to run.

Could we have a way to enable ROCKET_DEBUG only for this test?

@jeawhanlee
Copy link
Contributor

I think we can try to fix the ROCKET_DEBUG issue in general, if I remember well the last time, it's about permission issue, WPR writing to it's debug file but no proper permission to do so.

@MathieuLamiot
Copy link
Contributor

Blocked until we have all-green test results.

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

No branches or pull requests

3 participants