Skip to content

Commit

Permalink
e
Browse files Browse the repository at this point in the history
Signed-off-by: Anan Zhuang <[email protected]>
  • Loading branch information
ananzh committed Nov 15, 2023
1 parent afdb12c commit b230c52
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions test/functional/apps/management/_scripted_fields.js
Original file line number Diff line number Diff line change
Expand Up @@ -181,16 +181,15 @@ export default function ({ getService, getPageObjects }) {

//add a test to sort numeric scripted field
it('should sort scripted field value in Discover', async function () {
await testSubjects.click('dataGridHeaderCell-@timestamp');
await PageObjects.discover.clickTableHeaderListItem('@timestamp', 'Sort A-Z');
await PageObjects.header.waitUntilLoadingHasFinished();
await testSubjects.click(`dataGridHeaderCell-${scriptedPainlessFieldName}`);
await PageObjects.discover.clickTableHeaderListItem(scriptedPainlessFieldName, 'Sort A-Z');
await PageObjects.header.waitUntilLoadingHasFinished();
//await pause(10000);
//await testSubjects.click('dataGridHeaderCell-@timestamp');
//await PageObjects.discover.clickTableHeaderListItem('@timestamp', 'Sort A-Z');
//await PageObjects.header.waitUntilLoadingHasFinished();
const sortedDataByTimeField = await PageObjects.discover.getDataGridTableValues();
expect(sortedDataByTimeField[0][0]).contain('Sep 17, 2015 @ 10:53:14.181');
expect(sortedDataByTimeField[0][1]).contain('-1');
expect(sortedDataByTimeField[0][0]).contain('Sep 17, 2015 @ 06:32:29.479');
expect(sortedDataByTimeField[0][1]).contain('20');

// click the column sorting button to remove painless field sort
// should sort only by time field
Expand Down

0 comments on commit b230c52

Please sign in to comment.