Merge "Integration tests no longer rely on entities' display names in tables"
This commit is contained in:
commit
98b567e41e
@ -651,10 +651,14 @@ class Cell(html.HTMLElement):
|
||||
self.inline_edit_mod = False
|
||||
# add tooltip to cells if the truncate variable is set
|
||||
if column.truncate:
|
||||
# NOTE(tsufiev): trying to pull cell raw data out of datum for
|
||||
# those columns where truncate is False leads to multiple errors
|
||||
# in unit tests
|
||||
data = getattr(datum, column.name, '') or ''
|
||||
if len(data) > column.truncate:
|
||||
self.attrs['data-toggle'] = 'tooltip'
|
||||
self.attrs['title'] = data
|
||||
self.attrs['data-selenium'] = data
|
||||
self.data = self.get_data(datum, column, row)
|
||||
|
||||
def get_data(self, datum, column, row):
|
||||
|
@ -148,10 +148,14 @@ class BasicTableRegion(baseregion.BaseRegion):
|
||||
searched text, otherwise occurrence of searched text in the column
|
||||
text will result in row match.
|
||||
"""
|
||||
def get_text(element):
|
||||
text = element.get_attribute('data-selenium')
|
||||
return text or element.text
|
||||
|
||||
for row in self.rows:
|
||||
if exact_match and text == row.cells[column_index].text:
|
||||
if exact_match and text == get_text(row.cells[column_index]):
|
||||
return row
|
||||
if not exact_match and text in row.cells[column_index].text:
|
||||
if not exact_match and text in get_text(row.cells[column_index]):
|
||||
return row
|
||||
return None
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user