mirror of
https://github.com/elastic/kibana.git
synced 2025-04-23 17:28:26 -04:00
[Discover] Fix modify the time range test (#130880)
* [Discover] unskip tests for check flakyness * [Discover] fix the test * [Discover] update expected string * [Discover] open close full screen mode for data grid when needed Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
This commit is contained in:
parent
7965324dc3
commit
d5ae7f33b7
2 changed files with 7 additions and 6 deletions
|
@ -25,8 +25,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
|
|||
defaultIndex: 'logstash-*',
|
||||
};
|
||||
|
||||
// FLAKY: https://github.com/elastic/kibana/issues/130694
|
||||
describe.skip('discover test', function describeIndexTests() {
|
||||
describe('discover test', function describeIndexTests() {
|
||||
before(async function () {
|
||||
log.debug('load kibana index with default index pattern');
|
||||
await kibanaServer.importExport.load('test/functional/fixtures/kbn_archiver/discover');
|
||||
|
@ -84,7 +83,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
|
|||
|
||||
it('should show correct time range string in chart', async function () {
|
||||
const actualTimeString = await PageObjects.discover.getChartTimespan();
|
||||
const expectedTimeString = `${PageObjects.timePicker.defaultStartTime} - ${PageObjects.timePicker.defaultEndTime}`;
|
||||
const expectedTimeString = `${PageObjects.timePicker.defaultStartTime} - ${PageObjects.timePicker.defaultEndTime} (interval: Auto - 3 hours)`;
|
||||
expect(actualTimeString).to.be(expectedTimeString);
|
||||
});
|
||||
|
||||
|
@ -96,8 +95,8 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
|
|||
expect(time.start).to.be('Sep 21, 2015 @ 12:00:00.000');
|
||||
expect(time.end).to.be('Sep 21, 2015 @ 15:00:00.000');
|
||||
await retry.waitForWithTimeout(
|
||||
'doc table to contain the right search result',
|
||||
1000,
|
||||
'table to contain the right search result',
|
||||
3000,
|
||||
async () => {
|
||||
const rowData = await PageObjects.discover.getDocTableField(1);
|
||||
log.debug(`The first timestamp value in doc table: ${rowData}`);
|
||||
|
|
|
@ -284,8 +284,10 @@ export class DiscoverPageObject extends FtrService {
|
|||
);
|
||||
return await fields[usedCellIdx].getVisibleText();
|
||||
}
|
||||
await this.testSubjects.click('dataGridFullScreenButton');
|
||||
const row = await this.dataGrid.getRow({ rowIndex: index - 1 });
|
||||
const result = await Promise.all(row.map(async (cell) => await cell.getVisibleText()));
|
||||
const result = await Promise.all(row.map(async (cell) => (await cell.getVisibleText()).trim()));
|
||||
await this.testSubjects.click('dataGridFullScreenButton');
|
||||
return result[usedCellIdx];
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue