Do not wait for X page content when clicking the BO login X link - #1103
Merged
Conversation
Contributor
Author
|
Hello @Progi1984 Once this PR is accepted I'll integrate it in the merge PR PrestaShop/PrestaShop#42384 So the whole fix will go up as we perform the merge PRs then |
Progi1984
approved these changes
Aug 20, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
functional:BO:loginis currently failing on every PR (unrelated to the PR content) on theshould click on "X icon"step offunctional/BO/00_login/04_checkLinks.ts:Example run: https://github.com/jolelievre/ga.tests.ui.pr/actions/runs/32339819748/job/96436929714
Cause
X (twitter) now blocks headless browsers:
https://x.com/PrestaShopanswers with a completely empty document. Playwright then considersbodyhidden (an emptybodyhas no layout box), so thewaitForVisibleSelector(newPage, 'body')done at the end ofopenLinkWithTargetBlank()can never resolve.Probing the four links of the BO login footer with headless chromium confirms X is the only one affected:
bodyvisiblebodychildrenhttps://x.com/PrestaShophttps://www.facebook.com/prestashophttps://github.com/PrestaShop/PrestaShophttps://www.prestashop-project.org/The page URL is still correct (
https://x.com/PrestaShop), so the assertion made by the test remains relevant — only waiting for the page to render is impossible now.Fix
Open the X link without waiting for the new page content (
waitForVisible: false), which is already whatclickOnSocialSharingLink()does for the FO social sharing links (src/versions/develop/pages/FO/classic/product/index.ts). Facebook, GitHub and prestashop-project.org are left untouched since they still render fine.The older versions (
8.0,8.1,1.7.2) extend thedeveloplogin page, so they all get the fix.How to test
From
tests/UIof a shop using this branch:Before:
After: