Page MenuHomePhabricator

Create browser tests for hovering link and showing hovercard
Closed, ResolvedPublic

Description

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

Details

Related Gerrit Patches:
mediawiki/extensions/Popups : masterQA: Updates to browser tests to avoid flakiness
mediawiki/extensions/Popups : masterQA: Enable Hovercards beta feature in browser tests
mediawiki/extensions/Popups : masterAdd browser test for hovering link

Event Timeline

Restricted Application removed a project: Patch-For-Review. · View Herald TranscriptApr 19 2016, 9:21 AM

Change 283566 had a related patch set uploaded (by Jhernandez):
Add browser test for hovering link

https://gerrit.wikimedia.org/r/283566

Change 283566 merged by Phuedx:
Add browser test for hovering link

https://gerrit.wikimedia.org/r/283566

Restricted Application added a subscriber: TerraCodes. · View Herald TranscriptApr 19 2016, 1:28 PM

Do these tests run anywhere? Should we setup @integration tests?

They don't at the moment. Yes we should. T133018 is related.

bmansurov removed bmansurov as the assignee of this task.Apr 19 2016, 9:53 PM
bmansurov added a subscriber: bmansurov.
phuedx updated the task description. (Show Details)Apr 20 2016, 8:23 AM
phuedx closed this task as Resolved.Apr 20 2016, 8:26 AM
phuedx claimed this task.
phuedx added a subscriber: phuedx.

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.

Jdlrobson reopened this task as Open.Apr 20 2016, 11:32 AM

Given the browser test is failing on Jenkins (and fails for me when I run locally) I think closing this was premature.

Change 284449 had a related patch set uploaded (by Bmansurov):
QA: Correctly enable the beta feature

https://gerrit.wikimedia.org/r/284449

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!

phuedx reassigned this task from phuedx to bmansurov.Apr 20 2016, 3:51 PM

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.

bmansurov reassigned this task from bmansurov to Jdlrobson.Apr 20 2016, 5:46 PM

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!

It turns out that we weren't installing #mediawiki-extensions-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

https://gerrit.wikimedia.org/r/284495

Change 284495 merged by jenkins-bot:
QA: Enable Hovercards beta feature in browser tests

https://gerrit.wikimedia.org/r/284495

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.

Change 284449 merged by jenkins-bot:
QA: Updates to browser tests to avoid flakiness

https://gerrit.wikimedia.org/r/284449

Jhernandez closed this task as Resolved.Apr 21 2016, 3:52 PM

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.