Skip to content

Commit

Permalink
Adjust selenium tests
Browse files Browse the repository at this point in the history
  • Loading branch information
guerler committed Jan 15, 2024
1 parent 8d09263 commit 07af273
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 7 deletions.
4 changes: 2 additions & 2 deletions client/src/components/Grid/GridList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -304,13 +304,13 @@ watch(operationMessage, () => {
</th>
</thead>
<tr v-for="(rowData, rowIndex) in gridData" :key="rowIndex" :class="{ 'grid-dark-row': rowIndex % 2 }">
<th v-if="!!gridConfig.batch">
<td v-if="!!gridConfig.batch">
<BFormCheckbox
:checked="selected.has(rowData)"
class="m-2 cursor-pointer"
data-description="grid selected"
@change="onSelect(rowData)" />
</th>
</td>
<td
v-for="(fieldEntry, fieldIndex) in gridConfig.fields"
:key="fieldIndex"
Expand Down
11 changes: 7 additions & 4 deletions lib/galaxy/selenium/navigates_galaxy.py
Original file line number Diff line number Diff line change
Expand Up @@ -544,9 +544,12 @@ def select_grid_operation(self, item_name, option_label):
target_item = None
grid = self.components.grids.body.wait_for_visible()
for row in grid.find_elements(By.TAG_NAME, "tr"):
name_cell = row.find_elements(By.TAG_NAME, "td")[0]
if item_name in name_cell.text:
target_item = name_cell
for name_column in range(2):
name_cell = row.find_elements(By.TAG_NAME, "td")[name_column]
if item_name in name_cell.text:
target_item = name_cell
break
if target_item is not None:
break

if target_item is None:
Expand All @@ -564,7 +567,7 @@ def select_grid_cell(self, grid_name, item_name, column_index=3):
grid = self.wait_for_selector(grid_name)
for row in grid.find_elements(By.TAG_NAME, "tr"):
td = row.find_elements(By.TAG_NAME, "td")
if td[0].text == item_name:
if item_name in [td[0].text, td[1].text]:
cell = td[column_index]
break

Expand Down
2 changes: 1 addition & 1 deletion lib/galaxy_test/selenium/test_histories_list.py
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ def test_tags(self):
self.navigate_to_histories_page()

# Insert a tag
tag_column = 3
tag_column = 4
tags_cell = self.select_grid_cell("#histories-grid", self.history2_name, tag_column)
self.add_tag(tags_cell, self.history2_tags[0])

Expand Down

0 comments on commit 07af273

Please sign in to comment.