Create tests that describe the desired functionality
Closed, ResolvedPublic5 Story Points

Description

AC:

The following behavior is validated with browser tests

Testable without Cirrus search and any actual search interaction:

  • info i's are visible on the page and their popups are not empty
  • searching for combinations of words: Each of the offered fields should be used and verified at least once
    • right URL / page with correct GET request should be fine
  • searching for a file
    • file namespace is added
    • depending on the file type dimension fields are shown
  • namespace search behavior
    • when clicking on all, all namespaces are selected
    • selected namespaces are unselectable in the dropdown list
    • Unselecting a single namespace after all had been clicked, unselects all
    • adding a namespace to complete the list of all namespaces, all is automatically selected

No search results needed:

  • search preview of the search form after form submit: The advanced search form should still contain all values after a form submit, but now it should be collapsed
    • and the opposite: expanding the search form hides the preview pills

Related Objects

Mentioned In
rEASR666a97b5c161: Create patch set 11
rEASRc1c912490cff: Create patch set 9
rEASRd0a3f62d7c42: Create patch set 8
rEASR8c07efed8e8e: Create patch set 7
rEASR7eb2663b3a41: Create patch set 6
rEASRe2477e4cdaf5: Create patch set 5
rEASR5ccdb301e79f: Create patch set 3
rEASR4068de9827e1: Create patch set 4
rEASR3e550bc14137: Create change
rEASRfa93383d0d5e: Add first tests to search page
rEASR285d5af0752e: Add first tests to search page
rEASR19add7bfcd9f: Add first tests to search page
rEASR8852d187e78b: Add first tests to search page
rEASR7c356fa607f1: Add first tests to search page
rEASR2312c2c347c3: Add first tests to search page
rEASRddad3fe64ee0: Add first tests to search page
rEASR1175a5232957: Add first tests to search page Bug: T167316
rEASRc808b791cf2c: Add first tests to search page
rEASR2e85c4f1a760: Add first tests to search page Bug: T167316
rEASR143ebddd1716: Add first tests to search page Bug: T167316
rEASR1a5cf9444896: Add first tests to search page Bug: T167316
rEASRedade303b752: Add first tests to search page Bug: T167316
rEASRc59d05e6efe1: Add first tests to search page Bug: T167316
rEASR0ba9046105da: Add first tests to search page Bug: T167316
rEASReaf69f81aeac: Add first tests to search page Bug: T167316
rEASR7121fe8c2952: Check search form state after submission
rEASRb3a271c39505: Add first tests to search page
rEASRe68f07be0e3b: Add first tests to search page Bug: T167316
Mentioned Here
T186901: Add ability to override menu item creation for DropdownInputWidget
T181691: [Pre-wmf.11] Special:Preferences asks for leave confirmation even when no changes were made
Restricted Application added a project: TCB-Team. · View Herald TranscriptJun 7 2017, 4:34 PM
Restricted Application added a subscriber: Aklapper. · View Herald Transcript
Pablo-WMDE updated the task description. (Show Details)Jul 26 2017, 11:17 AM
Pablo-WMDE set the point value for this task to 8.
Lea_WMDE triaged this task as Normal priority.Jan 10 2018, 2:45 PM
Lea_WMDE updated the task description. (Show Details)
Lea_WMDE changed the point value for this task from 8 to 5.

Change 405905 had a related patch set uploaded (by Zoranzoki21; owner: Tonina Zhelyazkova):
[mediawiki/extensions/AdvancedSearch@master] Add first tests to search page

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

Tonina_Zhelyazkova_WMDE updated the task description. (Show Details)EditedJan 24 2018, 2:01 PM

The AC has been edited to make the test hierarchy more clear.
"Search for file" should be in its own category rather than under "Searching for combinations of words"

Change 405905 had a related patch set uploaded (by Zoranzoki21; owner: Tonina Zhelyazkova):
[mediawiki/extensions/AdvancedSearch@master] Add first tests to search page

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

Change 405905 had a related patch set uploaded (by Tonina Zhelyazkova; owner: Tonina Zhelyazkova):
[mediawiki/extensions/AdvancedSearch@master] Add first tests to search page

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

@Lea_WMDE: We discovered that for our test code we need to override methods that are affected by an upcoming change in OOJS UI (https://gerrit.wikimedia.org/r/#/c/406397/), related to this issue T181691: [Pre-wmf.11] Special:Preferences asks for leave confirmation even when no changes were made. The OOJS change is already merged, but the latest mediawiki core does not use the change yet. Should we

a) postpone this ticket until the newest OOJS version is in mediawiki core,
b) split off all the tests related to dropdown widgets (file type, file height, file width) and postpone those,
c) create puke-worthy workaround code in our AdvancedSearch components and file a ticket to remember to clean it up.

Change 405905 merged by jenkins-bot:
[mediawiki/extensions/AdvancedSearch@master] Add first tests to search page

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

Deployed on the test wiki. The test server still has the old OOUI version. That means the new method FileTypeSelection.setOptionsData won't be called and the menu items in the file type selections won't get unique class names. This does not affect functionality and as long as we don't run browser tests against the test wiki it also won't affect the browser tests.

After looking at https://gerrit.wikimedia.org/r/405905 and the DropdownInputWidget code I saw that FileTypeSelection.setOptionsData overrides a private method, which means it could break at any time. I've opened issue T186901: Add ability to override menu item creation for DropdownInputWidget and proposed a change to OOUI so we can override menu item creation better in the future.

Lea_WMDE closed this task as Resolved.Mar 23 2018, 12:27 PM