Skip to content

Commit

Permalink
fix one more test
Browse files Browse the repository at this point in the history
Signed-off-by: Qingyang(Abby) Hu <abigailhu2000@gmail.com>
  • Loading branch information
abbyhu2000 committed Oct 25, 2024
1 parent b50630e commit 874c26c
Showing 1 changed file with 10 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -45,14 +45,14 @@ describe('dataset navigator', { scrollBehavior: false }, () => {
testFixtureHandler.importJSONMapping(
'cypress/fixtures/dashboard/opensearch_dashboards/query_enhancement/mappings.json.txt'
);

testFixtureHandler.importJSONDoc(
'cypress/fixtures/dashboard/opensearch_dashboards/query_enhancement/data.json.txt'
);

// Go to the Discover page
miscUtils.visitPage(`app/data-explorer/discover#/`);

cy.waitForLoaderNewHeader();
});

Expand Down Expand Up @@ -80,14 +80,12 @@ describe('dataset navigator', { scrollBehavior: false }, () => {
cy.waitForLoaderNewHeader();

// Selected language in the language picker should be SQL
// bug: SQL won't be selected in cypress; manually click SQL in language selector
// cy.getElementByTestId('queryEditorLanguageSelector').should(
// 'contain',
// 'SQL'
// );

// The following steps are needed because when selecting SQL, discover loaded with data but the
// multi-line query editor are not loaded properly(it renders a single line query bar) unless we select SQL again
// This bug only exist in cypress test; can not reproduce manually
cy.get(`[data-test-subj="queryEditorLanguageSelector"]`).click();
cy.get(`[class~="languageSelector__menuItem"]`)
.should('have.length', 2)
Expand Down Expand Up @@ -168,6 +166,12 @@ describe('dataset navigator', { scrollBehavior: false }, () => {

describe('index pattern', () => {
it('create index pattern and select it', function () {
// import logstash functional
testFixtureHandler.importJSONDocIfNeeded(
indexSet,
'cypress/fixtures/dashboard/opensearch_dashboards/data_explorer/logstash/logstash.mappings.json.txt',
'cypress/fixtures/dashboard/opensearch_dashboards/data_explorer/logstash/logstash.json.txt'
);
testFixtureHandler.importJSONMapping(
'cypress/fixtures/dashboard/opensearch_dashboards/data_explorer/discover/discover.mappings.json.txt'
);
Expand Down

0 comments on commit 874c26c

Please sign in to comment.