Mozmill test for Panorama tab search filter

RESOLVED WONTFIX

Status

RESOLVED WONTFIX
8 years ago
6 years ago

People

(Reporter: uyclay, Unassigned)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [mozmill-functional][mozmill-panorama])

Attachments

(1 attachment, 4 obsolete attachments)

(Reporter)

Description

8 years ago
User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/534.10 (KHTML, like Gecko) Chrome/8.0.552.224 Safari/534.10
Build Identifier: 

Create new automation test for testcase id #12845. Testing the tab search filter of the TabView.

https://litmus.mozilla.org/show_test.cgi?id=12845

Reproducible: Always

Steps to Reproduce:
1. Open several tabs
2. enter group view
3. press the search button
4. type two or more letters, test matching and non-matching results


Expected Results:  
1. The search should highlight any open tabs that match the search
2. Tabs that don't match the search should not be highlighted
(Reporter)

Comment 1

8 years ago
Created attachment 502995 [details] [diff] [review]
Automation script for testcase 12845

I have attached the automation script for review.

In this script it contains three texts to search. Search for a single letter which should not highlight any tabs, two letters that matches tabs which should highlight tabs matched and a word which should not match and should not highlight any tabs.
Attachment #502995 - Flags: review?(anthony.s.hughes)
Assignee: nobody → uyclay
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
(Reporter)

Comment 2

8 years ago
Created attachment 503047 [details] [diff] [review]
Automation script for testcase 12845
Attachment #502995 - Attachment is obsolete: true
Attachment #503047 - Flags: review?(anthony.s.hughes)
Attachment #502995 - Flags: review?(anthony.s.hughes)
(Reporter)

Comment 3

8 years ago
Created attachment 503068 [details] [diff] [review]
Automation script for testcase 12845

Changed module variables to capital letters and changed assert() calls to waitFor().
Attachment #503047 - Attachment is obsolete: true
Attachment #503068 - Flags: review?(anthony.s.hughes)
Attachment #503047 - Flags: review?(anthony.s.hughes)
Comment on attachment 503068 [details] [diff] [review]
Automation script for testcase 12845

>diff --git a/firefox/testTabView/testTabSearchFilter.js b/firefox/testTabView/testTabSearchFilter.js
>+function teardownModule() {
>+}

Make sure you include the module parameter.

>+  LOCAL_TEST_PAGES.forEach(function (page) {
>+    controller.open(page.url);

url should be URL as it is an acronym.

>+
>+    // Check that tabs only gets highlighted when expected to match
>+    controller.waitFor(function () {
>+      return wordMatched === searchWord.match;
>+    }, null, null, "Unexpected result for search");

Can you update the error message to include "got" and "expected"?
Attachment #503068 - Flags: review?(anthony.s.hughes) → review-
(Reporter)

Comment 5

8 years ago
Created attachment 504931 [details] [diff] [review]
Automation script for testcase 12845 revision 1

Implemented required changes.
Attachment #503068 - Attachment is obsolete: true
Attachment #504931 - Flags: review?(anthony.s.hughes)
Comment on attachment 504931 [details] [diff] [review]
Automation script for testcase 12845 revision 1

>diff --git a/firefox/testTabView/testTabSearchFilter.js b/firefox/testTabView/testTabSearchFilter.js
>+    // Check if there is a tab highlighted that matched to search
>+    var wordMatched = false;
>+    tabs.forEach(function (tabItem) {
>+      if( tabItem.getNode().classList.contains(TAB_HIGHLIGHTED) ) {
>+        wordMatched = true;
>+      }
>+    });
>+
>+    // Check that tabs only gets highlighted when expected to match
>+    controller.waitFor(function () {
>+      return wordMatched === searchWord.match;
>+    }, "Unexpected result for search - got " + wordMatched + ", expected "
>+    + searchWord.match);

I'm wondering if we couldn't simplify this by combining the two.  In other words, do the waitFor() inside the forEach() without using wordMatched.  Please see if you can refactor this.
Attachment #504931 - Flags: review?(anthony.s.hughes) → review-
(Reporter)

Comment 7

8 years ago
Created attachment 509676 [details] [diff] [review]
Automation script for testcase 12845 revision 2

I have revised the script and placed waitFor inside the forEach loop.
Attachment #504931 - Attachment is obsolete: true
Attachment #509676 - Flags: review?(anthony.s.hughes)
Comment on attachment 509676 [details] [diff] [review]
Automation script for testcase 12845 revision 2

>+const SEARCH_WORDS = [
>+  {word: "!allizoM", match: [false,false,false,false,false]},
>+  {word: "moz", match: [true,true,true,true,false]},
>+  {word: "m", match: [false,false,false,false,false]}
>+];

Why is match an array of FALSE instead of just a single false?
Attachment #509676 - Flags: review?(anthony.s.hughes) → review-
Summary: [Mozmill] test - [groups] tab search filter → Mozmill test for Panorama tab search filter
Whiteboard: [mozmill-panorama]
Whiteboard: [mozmill-panorama] → [mozmill-functional][mozmill-panorama]
Assignee: uyclay → nobody
Status: ASSIGNED → NEW
Bug 836758 will remove Panorama from Firefox soon and make it available as add-on. That means no new tests are necessary. Closing as WONTFIX.
Status: NEW → RESOLVED
Last Resolved: 6 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.