-
Notifications
You must be signed in to change notification settings - Fork 113
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Qingyang(Abby) Hu <[email protected]>
- Loading branch information
1 parent
f5b768e
commit 92e6842
Showing
5 changed files
with
155 additions
and
40 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
/* | ||
* Copyright OpenSearch Contributors | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
import { | ||
MiscUtils, | ||
} from '@opensearch-dashboards-test/opensearch-dashboards-test-library'; | ||
|
||
const miscUtils = new MiscUtils(cy); | ||
|
||
describe('doc link in discover', () => { | ||
beforeEach(() => { | ||
cy.setAdvancedSetting({ | ||
defaultIndex: 'logstash-*', | ||
}); | ||
|
||
miscUtils.visitPage(`app/data-explorer/discover#/?_g=(filters:!(),time:(from:'2015-09-19T13:31:44.000Z',to:'2015-09-24T01:31:44.000Z'))`); | ||
cy.waitForLoader() | ||
cy.waitForSearch() | ||
}); | ||
|
||
it('should open the doc view of the selected document', function () { | ||
cy.getElementByTestId(`docTableExpandToggleColumn-0`) | ||
.should('be.visible') | ||
.click() | ||
cy.getElementByTestId(`documentDetailFlyOut`) | ||
.should('be.visible') | ||
|
||
cy.getElementByTestId('docTableRowAction') | ||
.find('View single document') | ||
.click() | ||
|
||
cy.getElementByTestId('doc-hit') | ||
.should('be.visible') | ||
}); | ||
|
||
it('if value is null, add filter should create a non-exist filter', function () { | ||
// Filter out special document | ||
cy.submitFilterFromDropDown('agent', 'is', 'Missing/Fields'); | ||
cy.waitForSearch() | ||
|
||
cy.getElementByTestId(`docTableExpandToggleColumn-0`) | ||
.should('be.visible') | ||
.click() | ||
cy.getElementByTestId(`documentDetailFlyOut`) | ||
.should('be.visible') | ||
|
||
cy.getElementByTestId('tableDocViewRow-referer') | ||
.find(`[data-test-subj="addInclusiveFilterButton"]`) | ||
.click() | ||
|
||
cy.get('[data-test-subj~="filter-key-referer"]') | ||
.should('be.visible') | ||
|
||
cy.get('[data-test-subj~="filter-negated"]') | ||
.should('be.visible') | ||
|
||
}); | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
/* | ||
* Copyright OpenSearch Contributors | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
import { | ||
MiscUtils, | ||
} from '@opensearch-dashboards-test/opensearch-dashboards-test-library'; | ||
|
||
const miscUtils = new MiscUtils(cy); | ||
|
||
describe('discover doc table', () => { | ||
beforeEach(() => { | ||
cy.setAdvancedSetting({ | ||
defaultIndex: 'logstash-*', | ||
}); | ||
|
||
miscUtils.visitPage(`app/data-explorer/discover#/?_g=(filters:!(),time:(from:'2015-09-19T13:31:44.000Z',to:'2015-09-24T01:31:44.000Z'))`); | ||
cy.waitForLoader() | ||
cy.waitForSearch() | ||
}); | ||
|
||
describe('add and remove columns', function () { | ||
it('should add more columns to the table', function () { | ||
cy.getElementByTestId('fieldFilterSearchInput') | ||
.type('phpmemory') | ||
|
||
cy.getElementByTestId('fieldToggle-phpmemory') | ||
.should('be.visible') | ||
.click() | ||
|
||
cy.getElementByTestId('dataGridHeaderCell-phpmemory') | ||
.should('be.visible') | ||
}); | ||
|
||
it('should remove columns from the table', function () { | ||
cy.getElementByTestId('fieldToggle-phpmemory') | ||
.should('be.visible') | ||
.click() | ||
|
||
cy.getElementByTestId('dataGridHeaderCell-phpmemory') | ||
.should('not.be.visible') | ||
}); | ||
}); | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters