mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 01:38:56 -04:00
* Solidify context filter test
This commit is contained in:
parent
c6dde4c6c4
commit
620cce3583
3 changed files with 11 additions and 4 deletions
|
@ -42,7 +42,7 @@ module.directive('kbnTableRow', function ($compile, $httpParamSerializer, kbnUrl
|
|||
onRemoveColumn: '=?',
|
||||
},
|
||||
link: function ($scope, $el) {
|
||||
$el.after('<tr>');
|
||||
$el.after('<tr data-test-subj="docTableDetailsRow">');
|
||||
$el.empty();
|
||||
|
||||
// when we compile the details, we use this $scope
|
||||
|
|
|
@ -23,5 +23,6 @@
|
|||
index-pattern="indexPattern"
|
||||
on-add-column="onAddColumn"
|
||||
on-remove-column="onRemoveColumn"
|
||||
data-test-subj="docViewer"
|
||||
></doc-viewer>
|
||||
</td>
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
export function DocTableProvider({ getService }) {
|
||||
const testSubjects = getService('testSubjects');
|
||||
const retry = getService('retry');
|
||||
|
||||
class DocTable {
|
||||
async getTable() {
|
||||
|
@ -15,7 +16,7 @@ export function DocTableProvider({ getService }) {
|
|||
}
|
||||
|
||||
async getAnchorDetailsRow(table) {
|
||||
return await table.findByCssSelector('[data-test-subj~="docTableAnchorRow"] + tr');
|
||||
return await table.findByCssSelector('[data-test-subj~="docTableAnchorRow"] + [data-test-subj~="docTableDetailsRow"]');
|
||||
}
|
||||
|
||||
async getRowExpandToggle(row) {
|
||||
|
@ -23,7 +24,7 @@ export function DocTableProvider({ getService }) {
|
|||
}
|
||||
|
||||
async getDetailsRows(table) {
|
||||
return await table.findAllByCssSelector('[data-test-subj~="docTableRow"] + tr');
|
||||
return await table.findAllByCssSelector('[data-test-subj~="docTableRow"] + [data-test-subj~="docTableDetailsRow"]');
|
||||
}
|
||||
|
||||
async getRowActions(row) {
|
||||
|
@ -54,7 +55,12 @@ export function DocTableProvider({ getService }) {
|
|||
|
||||
async toggleRowExpanded(row) {
|
||||
const rowExpandToggle = await this.getRowExpandToggle(row);
|
||||
return await rowExpandToggle.click();
|
||||
await rowExpandToggle.click();
|
||||
|
||||
const detailsRow = await row.findByXpath('./following-sibling::*[@data-test-subj="docTableDetailsRow"]');
|
||||
return await retry.try(async () => {
|
||||
return detailsRow.findByCssSelector('[data-test-subj~="docViewer"]');
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue