-
Notifications
You must be signed in to change notification settings - Fork 0
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
Clear lcp/performance hints data tests #126
Comments
Steps breakdown
(a,b,c) must be the column names of the table, and we can then specify values to add. We would need to adapt this step when we add other tables for performance hints (for instance the LRC table).
I think we might have a race condition with warm-up in some cases. Maybe we will want the count to be <= 2 (homepage might get there quickly).
Other steps seems like navigation steps that would need custom functions (change permalinks, and When URL page is deleted). I would suggest to go step by step, eventually with several PRs, one per scenario to begin with? Effort: M |
@jeawhanlee, could you have a look over this grooming? |
I feel like changing permalinks will be re-used at some point (I think I saw already another E2E issue mentioning this step) so something generic in utils makes sense 👍 |
@MathieuLamiot why don't we visit some URLs so it will be added directly to DB?, after clear those URLs will be removed from DB |
@Mai-Saad That would work too yes. The risk is that, to be sure data is added, this visit has to be done after clearing the cache and Performance Hints data. So it adds a few steps to the test, while hard-coding data to be added in the DB separates a bit more the different tests and steps. |
LGTM |
Is your feature request related to a problem? Please describe.
Since now we can check the database, we can cover clearing data scenarios in the e2e.
Here are some basic scenarios to start with, then we can build on that.
Scenario1: Should clear performance hints data when click clear PH in admin bar
Given WPR installed and activated
And performance hints data added to DB
When clear performance hints is clicked in admin bar
then data is removed from the performance hints tables
Scenario2: Should clear performance hints when change permalinks
Given WPR installed and activated
And performance hints data added to DB
When permalinks is changed
then data is removed from the performance hints tables
Scenario3: Should clear performance hints when switch theme
Given WPR installed and activated
And performance hints data added to DB
When switching the theme
then data is removed from the performance hints tables
Scenario4: Should clear performance hints of the current URL
Given WPR installed and activated
And URL1 , URL2 are visited
And performance hints data added to DB
When click clear performance hints of this URL in page view of URL1
then data of this URL1 is removed from the performance hints tables
And the data of URL2 still in the table
Scenario5: Should clear performance hints of the URL when edited
Given WPR installed and activated
And URL is visited
And performance hints data added to DB
When edit the content of the URL
then data of this URL is removed from the performance hints tables
Scenario6: Should clear performance hints of the URL when deleted
Given WPR installed and activated
And URL is visited
And performance hints data added to DB
When URL page is deleted
then data of this URL is removed from the performance hints tables
The text was updated successfully, but these errors were encountered: