Create a browser test for the basic feature, visiting a page, hovering a link, seeing a hovercard, mouseout and card is hidden.
AC
- Browser test about hovering and showing/hiding a hover card
Create a browser test for the basic feature, visiting a page, hovering a link, seeing a hovercard, mouseout and card is hidden.
Status | Subtype | Assigned | Task | ||
---|---|---|---|---|---|
Declined | Jdlrobson | T111329 [GOAL] Page previews on mobileweb | |||
Resolved | phuedx | T133947 [EPIC] Reduce bloat of Page Previews RL module(s) | |||
Resolved | Jdlrobson | T144522 [EPIC] Hovercards technical debt and quality enhancements | |||
Resolved | Jdlrobson | T67103 [EPIC] Hovercards: Test Coverage | |||
Resolved | Jdlrobson | T133018 Set up browser tests running on CI (jenkins) for Hovercards | |||
Resolved | Jdlrobson | T133019 Create browser tests for hovering link and showing hovercard |
Change 283566 had a related patch set uploaded (by Jhernandez):
Add browser test for hovering link
Given that the scope of this task is to add "browser [tests] about hovering and showing/hiding a hover card", I'm happy to close this as Resolved.
Given the browser test is failing on Jenkins (and fails for me when I run locally) I think closing this was premature.
I think I've identified the problem: https://gerrit.wikimedia.org/r/#/c/283566/5/tests/browser/features/support/pages/special_preferences_page.rb
Change 284449 had a related patch set uploaded (by Bmansurov):
QA: Correctly enable the beta feature
Weird. I ran these tests a number of times while fixing up @bmansurov's patch during code review and saw them pass consistently. I guess it was timing sensitive. Regardless, we have a fix! Woo!
I suspect it depends if you are using user factory or not - if you do a new user gets created each time. If you don't your user a dedicated user who may already have the beta feature enabled.
It turns out that we weren't installing TextExtracts and PageImages before running the tests. This has since been fixed.
Change 284495 had a related patch set uploaded (by Phuedx):
[WIP] Enable Hovercards beta feature in browser tests
Change 284495 merged by jenkins-bot:
QA: Enable Hovercards beta feature in browser tests
The test seems to pass in Jenkins, but for completeness I would recommend we also review/merge https://gerrit.wikimedia.org/r/284449 given that browser tests are failing for me locally.
As we've seen browser tests can be flakey if you let them but I defer to @Jhernandez whether he wants to sign off with or without this.
Thanks all, I see they work fine https://integration.wikimedia.org/ci/job/mwext-mw-selenium/5696/console
I personally can't run them locally, I'm getting this error:
Feature: Popups core Background: # features/popups_core.feature:3 Given the hover cards test page is installed # features/support/step_definitions/common_steps.rb:1 And I am logged in # mediawiki_selenium-1.6.5/lib/mediawiki_selenium/step_definitions/login_steps.rb:1 {"errorMessage":"Can only set Cookies for the current domain","request":{"headers":{"Accept":"application/json","Accept-Encoding":"gzip;q=1.0,deflate;q=0.6,identity;q=0.3","Connection":"close","Content-Length":"117","Content-Type":"application/json; charset=utf-8","Host":"127.0.0.1:8910","User-Agent":"Ruby"},"httpVersion":"1.1","method":"POST","post":"{\"cookie\":{\"name\":\"wiki_session\",\"value\":\"535dip29ued4m41bihieqr3mp5eej6p0\",\"secure\":false,\"path\":\"/\",\"domain\":null}}","url":"/cookie","urlParsed":{"anchor":"","query":"","file":"cookie","directory":"/","path":"/cookie","relative":"/cookie","port":"","host":"","password":"","user":"","userInfo":"","authority":"","protocol":"","source":"/cookie","queryKey":{},"chunks":["cookie"]},"urlOriginal":"/session/d73a6e80-07d8-11e6-9e6e-69332d2220b2/cookie"}} (org.openqa.selenium.InvalidCookieDomainException) (Selenium::WebDriver::Error::InvalidCookieDomainError) features/popups_core.feature:5:in `And I am logged in'
I'll dig in more when I have a moment, but I'm going to sign off on this.
@Jhernandez: Are you using phantomjs? Try running them with env BROWSER=chrome (chromedriver) or firefox. I tend to use chromedriver as that's what we use in the build environment.