Skip to content

Commit 5f95ad2

Browse files
authored
chore: fix copy-paste leftovers in ListBox ITs (vaadin#3136)
1 parent ec55e86 commit 5f95ad2

File tree

1 file changed

+13
-17
lines changed
  • vaadin-list-box-flow-parent/vaadin-list-box-flow-integration-tests/src/test/java/com/vaadin/flow/component/listbox/test

1 file changed

+13
-17
lines changed

vaadin-list-box-flow-parent/vaadin-list-box-flow-integration-tests/src/test/java/com/vaadin/flow/component/listbox/test/ListBoxDataViewIT.java

Lines changed: 13 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -79,12 +79,11 @@ public void testGenericDataView_refreshSingleItem_onlyReflectChangesOfThatItem()
7979

8080
Assert.assertEquals("ListBox should have items", 2, items.size());
8181

82-
Assert.assertEquals("First RadioButton should be updated to", CHANGED_1,
82+
Assert.assertEquals("First item should be updated to", CHANGED_1,
8383
items.get(0).getText());
8484

85-
Assert.assertEquals(
86-
"Second RadioButton should still holds the old value", SECOND,
87-
items.get(1).getText());
85+
Assert.assertEquals("Second item should still hold the old value",
86+
SECOND, items.get(1).getText());
8887
}
8988

9089
@Test
@@ -97,12 +96,11 @@ public void testListDataView_refreshSingleItem_onlyReflectChangesOfThatItem() {
9796

9897
Assert.assertEquals("ListBox should have items", 2, items.size());
9998

100-
Assert.assertEquals("First RadioButton should be updated to", CHANGED_1,
99+
Assert.assertEquals("First item should be updated to", CHANGED_1,
101100
items.get(0).getText());
102101

103-
Assert.assertEquals(
104-
"Second RadioButton should still holds the old value", SECOND,
105-
items.get(1).getText());
102+
Assert.assertEquals("Second item should still hold the old value",
103+
SECOND, items.get(1).getText());
106104
}
107105

108106
@Test
@@ -122,10 +120,10 @@ public void testListDataView_addItem_shouldAddOneAndOnlyOneItem() {
122120

123121
Assert.assertEquals("ListBox should have items", 2, items.size());
124122

125-
Assert.assertEquals("First RadioButton should have the text", FIRST,
123+
Assert.assertEquals("First item should have the text", FIRST,
126124
items.get(0).getText());
127125

128-
Assert.assertEquals("Second RadioButton should have the text", SECOND,
126+
Assert.assertEquals("Second item should have the text", SECOND,
129127
items.get(1).getText());
130128

131129
listBox = findElement(By.id(OTHER_LIST_BOX_FOR_ADD_TO_DATA_VIEW));
@@ -152,18 +150,18 @@ public void testListDataView_removeItem_shouldRemoveOneAndOnlyOneItem() {
152150

153151
Assert.assertEquals("ListBox should have items", 1, items.size());
154152

155-
Assert.assertEquals("First RadioButton should have the text", FIRST,
153+
Assert.assertEquals("First item should have the text", FIRST,
156154
items.get(0).getText());
157155

158156
listBox = findElement(By.id(OTHER_LIST_BOX_FOR_REMOVE_FROM_DATA_VIEW));
159157
items = listBox.findElements(By.tagName(VAADIN_ITEM));
160158

161159
Assert.assertEquals("Unexpected item count after removing one item "
162-
+ "for second radio button group", 1, items.size());
160+
+ "for second ListBox", 1, items.size());
163161
}
164162

165163
@Test
166-
public void testListDataView_addAndRemoveFilters_shouldProduceCorrectNumberOfRadioButtons() {
164+
public void testListDataView_addAndRemoveFilters_shouldProduceCorrectNumberOfItems() {
167165

168166
WebElement listBox = findElement(By.id(LIST_BOX_FOR_FILTER_DATA_VIEW));
169167
List<WebElement> items = listBox.findElements(By.tagName(VAADIN_ITEM));
@@ -189,8 +187,7 @@ public void testListDataView_addAndRemoveFilters_shouldProduceCorrectNumberOfRad
189187
listBox = findElement(By.id(OTHER_LIST_BOX_FOR_FILTER_DATA_VIEW));
190188
items = listBox.findElements(By.tagName(VAADIN_ITEM));
191189

192-
Assert.assertEquals(
193-
"Unexpected filtering for second radion button group", 10,
190+
Assert.assertEquals("Unexpected filtering for second ListBox", 10,
194191
items.size());
195192

196193
findElement(By.id(LIST_DATA_VIEW_REMOVE_FILTER_BUTTON)).click();
@@ -271,8 +268,7 @@ public void testListDataView_setSortComparator_shouldSortTheItems() {
271268
listBox = findElement(By.id(OTHER_LIST_BOX_FOR_SORT_DATA_VIEW));
272269
items = listBox.findElements(By.tagName(VAADIN_ITEM));
273270

274-
Assert.assertArrayEquals(
275-
"Unexpected sorting for second radio button " + "group",
271+
Assert.assertArrayEquals("Unexpected sorting for second ListBox",
276272
new String[] { "third", "first", "second" },
277273
items.stream().map(WebElement::getText).toArray());
278274
}

0 commit comments

Comments
 (0)