Page MenuHomePhabricator

`npm run @selenium-test` in CirrusSearch fails with `element not interactable`
Closed, ResolvedPublic

Description

The problem seems to be that search is not visible because the screen is 800x600.

Before the patch

1~/Documents/gerrit/mediawiki/core/extensions/CirrusSearch$ export MW_SERVER=http://localhost:8080
2export MW_SCRIPT_PATH=/w
3export MEDIAWIKI_USER=Admin
4export MEDIAWIKI_PASSWORD=dockerpass
5
6
7
8~/Documents/gerrit/mediawiki/core/extensions/CirrusSearch$ fresh-node -env -net
9# fresh: 22.01.1
10# image: docker-registry.wikimedia.org/releng/node12-test-browser:0.0.3-s3
11# software: Debian GNU/Linux 11 (bullseye)
12# Node.js v12.22.5 (npm 7.21.0)
13# Chromium 97.0.4692.99
14# Mozilla Firefox 91.5.0esr
15# JSDuck 5.3.4 (Ruby 2.7.4) ruby 2.7.4p191
16# mount: /CirrusSearch ➟ /Users/z/Documents/gerrit/mediawiki/core/extensions/CirrusSearch (read-write)
17# /CirrusSearch/.git ➟ /Users/z/Documents/gerrit/mediawiki/core/extensions/CirrusSearch/.git (read-only)
18# env: MW_*, MEDIAWIKI_*
19# net: expose host
20
21🌱 Fresh!
22
23
24
25nobody@docker-desktop:/CirrusSearch$ chromedriver --url-base=wd/hub --port=4444 &
26[1] 9
27Starting ChromeDriver 97.0.4692.99 (d740da257583289dbebd2eb37e8668928fac5ead-refs/branch-heads/4692@{#1461}) on port 4444
28Only local connections are allowed.
29Please see https://chromedriver.chromium.org/security-considerations for suggestions on keeping ChromeDriver safe.
30[1649935721.112][SEVERE]: bind() failed: Address already in use (98)
31IPv6 port not available. Exiting...
32
33[1]+ Exit 1 chromedriver --url-base=wd/hub --port=4444
34
35
36
37nobody@docker-desktop:/CirrusSearch$ npm run @selenium-test
38
39> cirrussearch@0.0.0 @selenium-test
40> wdio tests/selenium/wdio.conf.js
41
42
43Execution of 1 spec files started at 2022-04-14T11:29:37.636Z
44
45[0-0] RUNNING in chrome - /tests/selenium/specs/smoke_test.js
46[0-0] 2022-04-14T11:29:42.134Z ERROR webdriver: Request failed due to element not interactable: element not interactable
47 (Session info: headless chrome=97.0.4692.99)
48 at getErrorFromResponseBody (/CirrusSearch/node_modules/webdriver/build/utils.js:121:10)
49 at Request._callback (/CirrusSearch/node_modules/webdriver/build/request.js:121:64)
50 at Request.self.callback (/CirrusSearch/node_modules/request/request.js:186:22)
51 at Request.emit (events.js:314:20)
52 at Request.EventEmitter.emit (domain.js:483:12)
53 at Request.<anonymous> (/CirrusSearch/node_modules/request/request.js:1163:10)
54 at Request.emit (events.js:314:20)
55 at Request.EventEmitter.emit (domain.js:483:12)
56 at IncomingMessage.<anonymous> (/CirrusSearch/node_modules/request/request.js:1085:12)
57 at Object.onceWrapper (events.js:420:28)
58[0-0]
59 Screenshot: /CirrusSearch/tests/selenium/log/Search-suggestions-2022-04-14T11-29-42-142Z.png
60
61[0-0] element not interactable in "Smoke test for search Search suggestions"
62element not interactable
63 (Session info: headless chrome=97.0.4692.99)
64[0-0] 2022-04-14T11:29:42.700Z ERROR webdriver: Request failed due to element not interactable: element not interactable
65 (Session info: headless chrome=97.0.4692.99)
66 at getErrorFromResponseBody (/CirrusSearch/node_modules/webdriver/build/utils.js:121:10)
67 at Request._callback (/CirrusSearch/node_modules/webdriver/build/request.js:121:64)
68 at Request.self.callback (/CirrusSearch/node_modules/request/request.js:186:22)
69 at Request.emit (events.js:314:20)
70 at Request.EventEmitter.emit (domain.js:483:12)
71 at Request.<anonymous> (/CirrusSearch/node_modules/request/request.js:1163:10)
72 at Request.emit (events.js:314:20)
73 at Request.EventEmitter.emit (domain.js:483:12)
74 at IncomingMessage.<anonymous> (/CirrusSearch/node_modules/request/request.js:1085:12)
75 at Object.onceWrapper (events.js:420:28)
76[0-0]
77 Screenshot: /CirrusSearch/tests/selenium/log/Fill-in-search-term-and-click-search-2022-04-14T11-29-42-702Z.png
78
79[0-0] element not interactable in "Smoke test for search Fill in search term and click search"
80element not interactable
81 (Session info: headless chrome=97.0.4692.99)
82[0-0] 2022-04-14T11:29:43.318Z ERROR webdriver: Request failed due to element not interactable: element not interactable
83 (Session info: headless chrome=97.0.4692.99)
84 at getErrorFromResponseBody (/CirrusSearch/node_modules/webdriver/build/utils.js:121:10)
85 at Request._callback (/CirrusSearch/node_modules/webdriver/build/request.js:121:64)
86 at Request.self.callback (/CirrusSearch/node_modules/request/request.js:186:22)
87 at Request.emit (events.js:314:20)
88 at Request.EventEmitter.emit (domain.js:483:12)
89 at Request.<anonymous> (/CirrusSearch/node_modules/request/request.js:1163:10)
90 at Request.emit (events.js:314:20)
91 at Request.EventEmitter.emit (domain.js:483:12)
92 at IncomingMessage.<anonymous> (/CirrusSearch/node_modules/request/request.js:1085:12)
93 at Object.onceWrapper (events.js:420:28)
94[0-0]
95 Screenshot: /CirrusSearch/tests/selenium/log/Search-with-accent-yields-result-page-with-accent-2022-04-14T11-29-43-320Z.png
96
97[0-0] element not interactable in "Smoke test for search Search with accent yields result page with accent"
98element not interactable
99 (Session info: headless chrome=97.0.4692.99)
100[0-0] FAILED in chrome - /tests/selenium/specs/smoke_test.js
101
102 "spec" Reporter:
103------------------------------------------------------------------
104[chrome 97.0.4692.99 linux #0-0] Spec: /CirrusSearch/tests/selenium/specs/smoke_test.js
105[chrome 97.0.4692.99 linux #0-0] Running: chrome (v97.0.4692.99) on linux
106[chrome 97.0.4692.99 linux #0-0] Session ID: fbef886e374829c9cb106597b0a60d66
107[chrome 97.0.4692.99 linux #0-0]
108[chrome 97.0.4692.99 linux #0-0] Smoke test for search
109[chrome 97.0.4692.99 linux #0-0] ✖ Search suggestions
110[chrome 97.0.4692.99 linux #0-0] ✖ Fill in search term and click search
111[chrome 97.0.4692.99 linux #0-0] ✖ Search with accent yields result page with accent
112[chrome 97.0.4692.99 linux #0-0]
113[chrome 97.0.4692.99 linux #0-0] 3 failing (2.7s)
114[chrome 97.0.4692.99 linux #0-0]
115[chrome 97.0.4692.99 linux #0-0] 1) Smoke test for search Search suggestions
116[chrome 97.0.4692.99 linux #0-0] element not interactable
117 (Session info: headless chrome=97.0.4692.99)
118[chrome 97.0.4692.99 linux #0-0] element not interactable
119[chrome 97.0.4692.99 linux #0-0] (Session info: headless chrome=97.0.4692.99)
120[chrome 97.0.4692.99 linux #0-0] at ArticlePage.set search_query_top_right [as search_query_top_right] (/CirrusSearch/tests/integration/features/support/pages/article_page.js:48:44)
121[chrome 97.0.4692.99 linux #0-0] at Context.<anonymous> (/CirrusSearch/tests/selenium/specs/smoke_test.js:22:38)
122[chrome 97.0.4692.99 linux #0-0]
123[chrome 97.0.4692.99 linux #0-0] 2) Smoke test for search Fill in search term and click search
124[chrome 97.0.4692.99 linux #0-0] element not interactable
125 (Session info: headless chrome=97.0.4692.99)
126[chrome 97.0.4692.99 linux #0-0] element not interactable
127[chrome 97.0.4692.99 linux #0-0] (Session info: headless chrome=97.0.4692.99)
128[chrome 97.0.4692.99 linux #0-0] at ArticlePage.set search_query_top_right [as search_query_top_right] (/CirrusSearch/tests/integration/features/support/pages/article_page.js:48:44)
129[chrome 97.0.4692.99 linux #0-0] at Context.<anonymous> (/CirrusSearch/tests/selenium/specs/smoke_test.js:37:38)
130[chrome 97.0.4692.99 linux #0-0]
131[chrome 97.0.4692.99 linux #0-0] 3) Smoke test for search Search with accent yields result page with accent
132[chrome 97.0.4692.99 linux #0-0] element not interactable
133 (Session info: headless chrome=97.0.4692.99)
134[chrome 97.0.4692.99 linux #0-0] element not interactable
135[chrome 97.0.4692.99 linux #0-0] (Session info: headless chrome=97.0.4692.99)
136[chrome 97.0.4692.99 linux #0-0] at ArticlePage.set search_query_top_right [as search_query_top_right] (/CirrusSearch/tests/integration/features/support/pages/article_page.js:48:44)
137[chrome 97.0.4692.99 linux #0-0] at Context.<anonymous> (/CirrusSearch/tests/selenium/specs/smoke_test.js:51:38)
138
139
140Spec Files: 0 passed, 1 failed, 1 total (100% completed) in 00:00:05

Fill-in-search-term-and-click-search-2022-04-14T11-29-42-702Z.png (600×800 px, 65 KB)

Search-suggestions-2022-04-14T11-29-42-142Z.png (600×800 px, 65 KB)

Search-with-accent-yields-result-page-with-accent-2022-04-14T11-29-43-320Z.png (600×800 px, 65 KB)

After the patch

1nobody@docker-desktop:/CirrusSearch$ npm run @selenium-test
2
3> cirrussearch@0.0.0 @selenium-test
4> wdio tests/selenium/wdio.conf.js
5
6
7Execution of 1 spec files started at 2022-04-14T11:37:28.184Z
8
9[0-0] RUNNING in chrome - /tests/selenium/specs/smoke_test.js
10[0-0]
11 Screenshot: /CirrusSearch/tests/selenium/log/Search-with-accent-yields-result-page-with-accent-2022-04-14T11-37-35-878Z.png
12
13[0-0] AssertionError in "Smoke test for search Search with accent yields result page with accent"
14I am on a page named África
15[0-0] FAILED in chrome - /tests/selenium/specs/smoke_test.js
16
17 "spec" Reporter:
18------------------------------------------------------------------
19[chrome 97.0.4692.99 linux #0-0] Spec: /CirrusSearch/tests/selenium/specs/smoke_test.js
20[chrome 97.0.4692.99 linux #0-0] Running: chrome (v97.0.4692.99) on linux
21[chrome 97.0.4692.99 linux #0-0] Session ID: 9cc15635fbc58a03ee1227c2b2b37ab6
22[chrome 97.0.4692.99 linux #0-0]
23[chrome 97.0.4692.99 linux #0-0] Smoke test for search
24[chrome 97.0.4692.99 linux #0-0] ✓ Search suggestions
25[chrome 97.0.4692.99 linux #0-0] ✓ Fill in search term and click search
26[chrome 97.0.4692.99 linux #0-0] ✖ Search with accent yields result page with accent
27[chrome 97.0.4692.99 linux #0-0]
28[chrome 97.0.4692.99 linux #0-0] 2 passing (4.9s)
29[chrome 97.0.4692.99 linux #0-0] 1 failing
30[chrome 97.0.4692.99 linux #0-0]
31[chrome 97.0.4692.99 linux #0-0] 1) Smoke test for search Search with accent yields result page with accent
32[chrome 97.0.4692.99 linux #0-0] I am on a page named África
33[chrome 97.0.4692.99 linux #0-0] AssertionError [ERR_ASSERTION]: I am on a page named África
34[chrome 97.0.4692.99 linux #0-0] at Context.<anonymous> (/CirrusSearch/tests/selenium/specs/smoke_test.js:58:10)
35
36
37Spec Files: 0 passed, 1 failed, 1 total (100% completed) in 00:00:08

Search-with-accent-yields-result-page-with-accent-2022-04-14T11-37-35-878Z.png (1×1 px, 53 KB)

Event Timeline

Change 780734 had a related patch set uploaded (by Zfilipin; author: Zfilipin):

[mediawiki/extensions/CirrusSearch@master] selenium: set browser size to 1280x1024

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

Change 780734 merged by jenkins-bot:

[mediawiki/extensions/CirrusSearch@master] selenium: set browser size to 1280x1024

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