Skip to content

Commit 0b47348

Browse files
committed
test: refactoring
Try to restructure test so a test is testing a specific component.
1 parent be54193 commit 0b47348

File tree

14 files changed

+364
-226
lines changed

14 files changed

+364
-226
lines changed

tobago-example/tobago-example-demo/src/main/webapp/content/900-test/2001-checkboxes/Checkboxes.test.js renamed to tobago-example/tobago-example-demo/src/main/webapp/content/900-test/misc/form-check/form-check.test.js

File renamed without changes.

tobago-example/tobago-example-demo/src/main/webapp/content/900-test/2001-checkboxes/Checkboxes.xhtml renamed to tobago-example/tobago-example-demo/src/main/webapp/content/900-test/misc/form-check/form-check.xhtml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@
2222
xmlns:tc="http://myfaces.apache.org/tobago/component"
2323
xmlns:ui="jakarta.faces.facelets">
2424

25+
<p>Test .form-check components which are checkboxes, toggles and radio buttons.</p>
26+
2527
<tc:section label="tc:selectBooleanCheckbox">
2628
<tc:flexLayout columns="auto">
2729
<tc:selectBooleanCheckbox id="selectBooleanCheckbox" value="false"/>

tobago-example/tobago-example-demo/src/main/webapp/content/900-test/2101-selectList/35-disabled-entries/Disabled_entries.test.js renamed to tobago-example/tobago-example-demo/src/main/webapp/content/900-test/selectManyList/disabled-entries/Disabled_entries.test.js

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,6 @@
1717

1818
import {querySelectorFn} from "/script/tobago-test.js";
1919

20-
it("SelectOneList expanded=false: colors of list entries", function () {
21-
const entry1 = querySelectorFn("[id='page:mainForm:selectOneList'] tr[data-tobago-value='1'] td[value='1']");
22-
const entry2 = querySelectorFn("[id='page:mainForm:selectOneList'] tr[data-tobago-value='2'] td[value='2']");
23-
24-
expect(getComputedStyle(entry1()).backgroundColor).toBe("rgb(255, 255, 255)")
25-
expect(getComputedStyle(entry2()).backgroundColor).toBe("rgb(233, 236, 239)")
26-
});
27-
2820
it("SelectManyList expanded=false: colors of list entries", function () {
2921
const entry1 = querySelectorFn("[id='page:mainForm:selectManyList'] tr[data-tobago-value='1'] td[value='1']");
3022
const entry2 = querySelectorFn("[id='page:mainForm:selectManyList'] tr[data-tobago-value='2'] td[value='2']");
@@ -33,14 +25,6 @@ it("SelectManyList expanded=false: colors of list entries", function () {
3325
expect(getComputedStyle(entry2()).backgroundColor).toBe("rgb(233, 236, 239)")
3426
});
3527

36-
it("SelectOneList expanded=true: colors of list entries", function () {
37-
const entry1 = querySelectorFn("[id='page:mainForm:selectOneListExpanded'] tr[data-tobago-value='1'] td[value='1']");
38-
const entry2 = querySelectorFn("[id='page:mainForm:selectOneListExpanded'] tr[data-tobago-value='2'] td[value='2']");
39-
40-
expect(getComputedStyle(entry1()).backgroundColor).toBe("rgb(255, 255, 255)")
41-
expect(getComputedStyle(entry2()).backgroundColor).toBe("rgb(233, 236, 239)")
42-
});
43-
4428
it("SelectManyList expanded=true: colors of list entries", function () {
4529
const entry1 = querySelectorFn("[id='page:mainForm:selectManyListExpanded'] tr[data-tobago-value='1'] td[value='1']");
4630
const entry2 = querySelectorFn("[id='page:mainForm:selectManyListExpanded'] tr[data-tobago-value='2'] td[value='2']");

tobago-example/tobago-example-demo/src/main/webapp/content/900-test/2101-selectList/35-disabled-entries/Disabled_entries.xhtml renamed to tobago-example/tobago-example-demo/src/main/webapp/content/900-test/selectManyList/disabled-entries/Disabled_entries.xhtml

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -21,22 +21,11 @@
2121
xmlns="http://www.w3.org/1999/xhtml"
2222
xmlns:tc="http://myfaces.apache.org/tobago/component"
2323
xmlns:ui="jakarta.faces.facelets">
24-
25-
<tc:selectOneList id="selectOneList">
26-
<tc:selectItem itemValue="1" itemLabel="Entry One"/>
27-
<tc:selectItem itemValue="2" itemLabel="Entry Two (disabled)" itemDisabled="true"/>
28-
</tc:selectOneList>
29-
3024
<tc:selectManyList id="selectManyList">
3125
<tc:selectItem itemValue="1" itemLabel="Entry One"/>
3226
<tc:selectItem itemValue="2" itemLabel="Entry Two (disabled)" itemDisabled="true"/>
3327
</tc:selectManyList>
3428

35-
<tc:selectOneList id="selectOneListExpanded" expanded="true">
36-
<tc:selectItem itemValue="1" itemLabel="Entry One"/>
37-
<tc:selectItem itemValue="2" itemLabel="Entry Two (disabled)" itemDisabled="true"/>
38-
</tc:selectOneList>
39-
4029
<tc:selectManyList id="selectManyListExpanded" expanded="true">
4130
<tc:selectItem itemValue="1" itemLabel="Entry One"/>
4231
<tc:selectItem itemValue="2" itemLabel="Entry Two (disabled)" itemDisabled="true"/>

tobago-example/tobago-example-demo/src/main/webapp/content/900-test/2101-selectList/30-no-entries/No_entries.test.js renamed to tobago-example/tobago-example-demo/src/main/webapp/content/900-test/selectManyList/no-entries/No_entries.test.js

Lines changed: 0 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -18,34 +18,6 @@
1818
import {JasmineTestTool} from "/tobago/test/tobago-test-tool.js";
1919
import {elementByIdFn, querySelectorFn} from "/script/tobago-test.js";
2020

21-
it("SelectOneList: no-entries hint after leaving", function (done) {
22-
const rootComponent = elementByIdFn("page:mainForm:selectOneList");
23-
const selectField = elementByIdFn("page:mainForm:selectOneList::selectField");
24-
const filterInput = elementByIdFn("page:mainForm:selectOneList::filter");
25-
const dropdownMenu = querySelectorFn(".tobago-dropdown-menu[name='page:mainForm:selectOneList']");
26-
const noEntriesFooter = querySelectorFn(".tobago-dropdown-menu[name='page:mainForm:selectOneList'] .tobago-no-entries");
27-
28-
const test = new JasmineTestTool(done);
29-
test.do(() => expect(dropdownMenu().classList).not.toContain("show"));
30-
test.do(() => expect(noEntriesFooter().classList).toContain("d-none"));
31-
32-
test.event("focus", filterInput, () => rootComponent().classList.contains("tobago-focus"));
33-
test.event("click", selectField, () => dropdownMenu().classList.contains("show"));
34-
test.do(() => expect(dropdownMenu().classList).toContain("show"));
35-
test.do(() => expect(noEntriesFooter().classList).toContain("d-none"));
36-
37-
test.event("blur", filterInput, () => !rootComponent().classList.contains("tobago-focus"));
38-
test.do(() => expect(dropdownMenu().classList).not.toContain("show"));
39-
test.do(() => expect(noEntriesFooter().classList).toContain("d-none"));
40-
41-
test.event("focus", filterInput, () => rootComponent().classList.contains("tobago-focus"));
42-
test.event("click", selectField, () => dropdownMenu().classList.contains("show"));
43-
test.do(() => expect(dropdownMenu().classList).toContain("show"));
44-
test.do(() => expect(noEntriesFooter().classList).toContain("d-none"));
45-
46-
test.start();
47-
});
48-
4921
it("SelectManyList: no-entries hint after leaving", function (done) {
5022
const rootComponent = elementByIdFn("page:mainForm:selectManyList");
5123
const selectField = elementByIdFn("page:mainForm:selectManyList::selectField");

tobago-example/tobago-example-demo/src/main/webapp/content/900-test/2101-selectList/30-no-entries/No_entries.xhtml renamed to tobago-example/tobago-example-demo/src/main/webapp/content/900-test/selectManyList/no-entries/No_entries.xhtml

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,6 @@
2121
xmlns="http://www.w3.org/1999/xhtml"
2222
xmlns:tc="http://myfaces.apache.org/tobago/component"
2323
xmlns:ui="jakarta.faces.facelets">
24-
25-
<tc:selectOneList id="selectOneList">
26-
<tc:selectItem itemValue="Entry One"/>
27-
<tc:selectItem itemValue="Entry Two"/>
28-
</tc:selectOneList>
29-
3024
<tc:selectManyList id="selectManyList">
3125
<tc:selectItem itemValue="Entry One"/>
3226
<tc:selectItem itemValue="Entry Two"/>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,188 @@
1+
/*
2+
* Licensed to the Apache Software Foundation (ASF) under one or more
3+
* contributor license agreements. See the NOTICE file distributed with
4+
* this work for additional information regarding copyright ownership.
5+
* The ASF licenses this file to You under the Apache License, Version 2.0
6+
* (the "License"); you may not use this file except in compliance with
7+
* the License. You may obtain a copy of the License at
8+
*
9+
* http://www.apache.org/licenses/LICENSE-2.0
10+
*
11+
* Unless required by applicable law or agreed to in writing, software
12+
* distributed under the License is distributed on an "AS IS" BASIS,
13+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
* See the License for the specific language governing permissions and
15+
* limitations under the License.
16+
*/
17+
18+
import {JasmineTestTool} from "/tobago/test/tobago-test-tool.js";
19+
import {elementByIdFn, querySelectorAllFn, querySelectorFn} from "/script/tobago-test.js";
20+
21+
it("SelectManyList minChar=3: leaving component", function (done) {
22+
const minChar3 = elementByIdFn("page:mainForm:minChar3");
23+
const badges = querySelectorAllFn("div[id='page:mainForm:selectManyList::selectField'] > .tobago-badges > .btn-group");
24+
const filterInput = elementByIdFn("page:mainForm:selectManyList::filter");
25+
const tobagoSelectItems = querySelectorAllFn(".tobago-dropdown-menu[name='page:mainForm:selectManyList'] .tobago-select-item");
26+
const rheaSelectItem = querySelectorFn(".tobago-dropdown-menu[name='page:mainForm:selectManyList'] .tobago-select-item[data-tobago-value='Rhea']");
27+
const customFooter = querySelectorFn(".tobago-dropdown-menu[name='page:mainForm:selectManyList'] .tobago-custom-footer");
28+
const customFooterCell = querySelectorFn(".tobago-dropdown-menu[name='page:mainForm:selectManyList'] .tobago-custom-footer td");
29+
30+
let timestamp;
31+
32+
const test = new JasmineTestTool(done);
33+
test.do(() => timestamp = currentTimestamp());
34+
test.event("click", minChar3, () => currentTimestamp() > timestamp);
35+
test.do(() => expect(tobagoSelectItems().length).toBe(0));
36+
test.do(() => expect(customFooter().textContent.trim()).toBe("type 3 character for results"));
37+
test.do(() => filterInput().value = "hea");
38+
test.event("input", filterInput, () => tobagoSelectItems().length > 0);
39+
test.do(() => expect(tobagoSelectItems().length).toBe(3));
40+
test.do(() => expect(getComputedStyle(customFooterCell()).display).toBe("none"));
41+
test.event("click", rheaSelectItem, () => badges().length === 1);
42+
test.do(() => expect(badges()[0].dataset.tobagoValue).toBe("Rhea"));
43+
test.do(() => expect(tobagoSelectItems().length).toBe(3));
44+
test.event("blur", filterInput, () => tobagoSelectItems().length === 0);
45+
test.do(() => expect(tobagoSelectItems().length).toBe(0));
46+
test.start();
47+
});
48+
49+
it("SelectManyList: avoid 'no valid selection' error", function (done) {
50+
const reset = elementByIdFn("page:mainForm:reset");
51+
const badges = querySelectorAllFn("div[id='page:mainForm:selectManyList::selectField'] > .tobago-badges > .btn-group");
52+
const firstBadge = querySelectorFn("div[id='page:mainForm:selectManyList::selectField'] > .tobago-badges > .btn-group > .badge");
53+
const filterInput = elementByIdFn("page:mainForm:selectManyList::filter");
54+
const tobagoSelectItems = querySelectorAllFn(".tobago-dropdown-menu[name='page:mainForm:selectManyList'] .tobago-select-item");
55+
const lysitheaSelectItem = querySelectorFn(".tobago-dropdown-menu[name='page:mainForm:selectManyList'] .tobago-select-item[data-tobago-value='Lysithea']");
56+
const hiddenQueryInput = elementByIdFn("page:mainForm:selectItemsFilteredMany::query");
57+
const popover = querySelectorFn("tobago-select-many-list[id='page:mainForm:selectManyList'] tobago-popover");
58+
59+
const test = new JasmineTestTool(done);
60+
test.setup(() => badges().length === 0
61+
&& tobagoSelectItems().length === 0
62+
&& Number(hiddenQueryInput().dataset.tobagoMinChars) === 0,
63+
null, "click", reset);
64+
test.do(() => filterInput().value = "y");
65+
test.event("input", filterInput, () => tobagoSelectItems().length > 0);
66+
test.event("click", lysitheaSelectItem, () => badges().length > 0);
67+
test.do(() => expect(firstBadge().textContent).toBe("Lysithea"));
68+
test.event("click", reset, () => badges().length === 0);
69+
test.do(() => expect(popover()).toBeNull());
70+
test.start();
71+
});
72+
73+
it("SelectManyList: footer must be visible for an empty list", function (done) {
74+
const reset = elementByIdFn("page:mainForm:reset");
75+
const badges = querySelectorAllFn("div[id='page:mainForm:selectManyList::selectField'] > .tobago-badges > .btn-group");
76+
const filterInput = elementByIdFn("page:mainForm:selectManyList::filter");
77+
const tobagoDropdownMenu = querySelectorFn(".tobago-dropdown-menu[name='page:mainForm:selectManyList']");
78+
const tobagoSelectItems = querySelectorAllFn(".tobago-dropdown-menu[name='page:mainForm:selectManyList'] .tobago-select-item");
79+
const customFooter = querySelectorFn(".tobago-dropdown-menu[name='page:mainForm:selectManyList'] .tobago-custom-footer");
80+
const hiddenQueryInput = elementByIdFn("page:mainForm:selectItemsFilteredMany::query");
81+
82+
const test = new JasmineTestTool(done);
83+
test.setup(() => badges().length === 0
84+
&& !tobagoDropdownMenu().classList.contains("show")
85+
&& tobagoSelectItems().length === 0
86+
&& Number(hiddenQueryInput().dataset.tobagoMinChars) === 0,
87+
null, "click", reset);
88+
test.do(() => expect(badges().length).toBe(0));
89+
test.do(() => expect(tobagoDropdownMenu().classList.contains("show")).toBeFalse());
90+
test.do(() => expect(tobagoSelectItems().length).toBe(0));
91+
test.event("input", filterInput, () => tobagoDropdownMenu().classList.contains("show"));
92+
test.do(() => expect(badges().length).toBe(0));
93+
test.do(() => expect(tobagoDropdownMenu().classList.contains("show")).toBeTrue());
94+
test.do(() => expect(tobagoSelectItems().length).toBe(0));
95+
test.do(() => expect(customFooter().textContent.trim()).toBe("filter for results"));
96+
test.start();
97+
});
98+
99+
it("SelectManyList: ajax listener", function (done) {
100+
const reset = elementByIdFn("page:mainForm:reset");
101+
const selectField = querySelectorFn("#page\\:mainForm\\:selectManyList\\:\\:selectField");
102+
const badges = querySelectorAllFn("div[id='page:mainForm:selectManyList::selectField'] > .tobago-badges > .btn-group");
103+
const filterInput = elementByIdFn("page:mainForm:selectManyList::filter");
104+
const tobagoSelectItems = querySelectorAllFn(".tobago-dropdown-menu[name='page:mainForm:selectManyList'] .tobago-select-item");
105+
const thebeSelectItem = querySelectorFn(".tobago-dropdown-menu[name='page:mainForm:selectManyList'] .tobago-select-item[data-tobago-value='Thebe']");
106+
const hiddenQueryInput = elementByIdFn("page:mainForm:selectItemsFilteredMany::query");
107+
108+
const test = new JasmineTestTool(done);
109+
test.setup(() => changeCount() === 0
110+
&& clickCount() === 0
111+
&& dblclickCount() === 0
112+
&& focusCount() === 0
113+
&& blurCount() === 0
114+
&& badges().length === 0
115+
&& tobagoSelectItems().length === 0
116+
&& Number(hiddenQueryInput().dataset.tobagoMinChars) === 0,
117+
null, "click", reset);
118+
test.event("click", selectField, () => clickCount() >= 1);
119+
test.do(() => expect(changeCount()).toBe(0));
120+
test.do(() => expect(clickCount()).toBe(1));
121+
test.do(() => expect(dblclickCount()).toBe(0));
122+
test.do(() => expect(focusCount()).toBe(1));
123+
test.do(() => expect(blurCount()).toBe(0));
124+
test.event("dblclick", selectField, () => dblclickCount() >= 1);
125+
test.do(() => expect(changeCount()).toBe(0));
126+
test.do(() => expect(clickCount()).toBe(1));
127+
test.do(() => expect(dblclickCount()).toBe(1));
128+
test.do(() => expect(focusCount()).toBe(1));
129+
test.do(() => expect(blurCount()).toBe(0));
130+
test.event("focus", reset, () => blurCount() >= 1);
131+
test.do(() => expect(changeCount()).toBe(0));
132+
test.do(() => expect(clickCount()).toBe(1));
133+
test.do(() => expect(dblclickCount()).toBe(1));
134+
test.do(() => expect(focusCount()).toBe(1));
135+
test.do(() => expect(blurCount()).toBe(1));
136+
test.event("click", filterInput, () => clickCount() >= 2);
137+
test.do(() => expect(changeCount()).toBe(0));
138+
test.do(() => expect(clickCount()).toBe(2));
139+
test.do(() => expect(dblclickCount()).toBe(1));
140+
test.do(() => expect(focusCount()).toBe(2));
141+
test.do(() => expect(blurCount()).toBe(1));
142+
test.do(() => filterInput().value = "b");
143+
test.event("input", filterInput, () => tobagoSelectItems().length > 0);
144+
test.event("click", thebeSelectItem, () => badges().length > 0);
145+
test.do(() => expect(changeCount()).toBe(1));
146+
test.do(() => expect(clickCount()).toBe(3));
147+
test.do(() => expect(dblclickCount()).toBe(1));
148+
test.do(() => expect(focusCount()).toBe(2));
149+
test.do(() => expect(blurCount()).toBe(1));
150+
test.event("dblclick", selectField, () => dblclickCount() >= 2);
151+
test.do(() => expect(changeCount()).toBe(1));
152+
test.do(() => expect(clickCount()).toBe(3));
153+
test.do(() => expect(dblclickCount()).toBe(2));
154+
test.do(() => expect(focusCount()).toBe(2));
155+
test.do(() => expect(blurCount()).toBe(1));
156+
test.event("focus", reset, () => blurCount() >= 2);
157+
test.do(() => expect(changeCount()).toBe(1));
158+
test.do(() => expect(clickCount()).toBe(3));
159+
test.do(() => expect(dblclickCount()).toBe(2));
160+
test.do(() => expect(focusCount()).toBe(2));
161+
test.do(() => expect(blurCount()).toBe(2));
162+
test.start();
163+
});
164+
165+
function currentTimestamp() {
166+
const timestampOut = querySelectorFn("#page\\:mainForm\\:timestamp .form-control-plaintext");
167+
return Number(timestampOut().textContent);
168+
}
169+
170+
function changeCount() {
171+
return parseInt(querySelectorFn("#page\\:mainForm\\:changeCounter .form-control-plaintext")().textContent);
172+
}
173+
174+
function clickCount() {
175+
return parseInt(querySelectorFn("#page\\:mainForm\\:clickCounter .form-control-plaintext")().textContent);
176+
}
177+
178+
function dblclickCount() {
179+
return parseInt(querySelectorFn("#page\\:mainForm\\:dblclickCounter .form-control-plaintext")().textContent);
180+
}
181+
182+
function focusCount() {
183+
return parseInt(querySelectorFn("#page\\:mainForm\\:focusCounter .form-control-plaintext")().textContent);
184+
}
185+
186+
function blurCount() {
187+
return parseInt(querySelectorFn("#page\\:mainForm\\:blurCounter .form-control-plaintext")().textContent);
188+
}

tobago-example/tobago-example-demo/src/main/webapp/content/900-test/2101-selectList/50-server/Server_Filtering.xhtml renamed to tobago-example/tobago-example-demo/src/main/webapp/content/900-test/selectManyList/server-side-filtering/Server_side_filtering.xhtml

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -37,25 +37,6 @@
3737
<tc:out id="blurCounter" label="blur" value="#{selectListServerFilterController.blurCounter}" labelLayout="top"/>
3838
</tc:panel>
3939

40-
<tc:selectOneList id="selectOneList" label="selectOneList"
41-
value="#{selectListServerFilterController.selectedSolarObject}"
42-
footer="#{selectListServerFilterController.footerTextOne}">
43-
<tc:selectItemsFiltered id="selectItemsFilteredOne" value="#{selectListServerFilterController.solarObjectsOne}"
44-
var="planet" itemLabel="#{planet.name}" itemValue="#{planet}"
45-
query="#{selectListServerFilterController.queryOne}"
46-
minimumCharacters="#{selectListServerFilterController.minChar}">
47-
</tc:selectItemsFiltered>
48-
<f:ajax render="statistics outputSelectOneList" listener="#{selectListServerFilterController.changeAjaxListener}"/>
49-
<f:ajax event="click" render="statistics" listener="#{selectListServerFilterController.clickAjaxListener}"/>
50-
<f:ajax event="dblclick" render="statistics" listener="#{selectListServerFilterController.dblclickAjaxListener}"/>
51-
<f:ajax event="focus" render="statistics" listener="#{selectListServerFilterController.focusAjaxListener}"/>
52-
<f:ajax event="blur" render="statistics" listener="#{selectListServerFilterController.blurAjaxListener}"/>
53-
</tc:selectOneList>
54-
<tc:out id="outputSelectOneList" label="Selected"
55-
value="#{selectListServerFilterController.selectedSolarObjectString}"/>
56-
57-
<tc:separator/>
58-
5940
<tc:out id="outputSelectManyList" label="Selected"
6041
value="#{selectListServerFilterController.selectedSolarObjectsString}"/>
6142
<tc:selectManyList id="selectManyList" label="selectManyList"
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
/*
2+
* Licensed to the Apache Software Foundation (ASF) under one or more
3+
* contributor license agreements. See the NOTICE file distributed with
4+
* this work for additional information regarding copyright ownership.
5+
* The ASF licenses this file to You under the Apache License, Version 2.0
6+
* (the "License"); you may not use this file except in compliance with
7+
* the License. You may obtain a copy of the License at
8+
*
9+
* http://www.apache.org/licenses/LICENSE-2.0
10+
*
11+
* Unless required by applicable law or agreed to in writing, software
12+
* distributed under the License is distributed on an "AS IS" BASIS,
13+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
* See the License for the specific language governing permissions and
15+
* limitations under the License.
16+
*/
17+
18+
import {querySelectorFn} from "/script/tobago-test.js";
19+
20+
it("SelectOneList expanded=false: colors of list entries", function () {
21+
const entry1 = querySelectorFn("[id='page:mainForm:selectOneList'] tr[data-tobago-value='1'] td[value='1']");
22+
const entry2 = querySelectorFn("[id='page:mainForm:selectOneList'] tr[data-tobago-value='2'] td[value='2']");
23+
24+
expect(getComputedStyle(entry1()).backgroundColor).toBe("rgb(255, 255, 255)")
25+
expect(getComputedStyle(entry2()).backgroundColor).toBe("rgb(233, 236, 239)")
26+
});
27+
28+
it("SelectOneList expanded=true: colors of list entries", function () {
29+
const entry1 = querySelectorFn("[id='page:mainForm:selectOneListExpanded'] tr[data-tobago-value='1'] td[value='1']");
30+
const entry2 = querySelectorFn("[id='page:mainForm:selectOneListExpanded'] tr[data-tobago-value='2'] td[value='2']");
31+
32+
expect(getComputedStyle(entry1()).backgroundColor).toBe("rgb(255, 255, 255)")
33+
expect(getComputedStyle(entry2()).backgroundColor).toBe("rgb(233, 236, 239)")
34+
});

0 commit comments

Comments
 (0)