-
Notifications
You must be signed in to change notification settings - Fork 102
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: yujin-emma <yujin.emma.work@gmail.com>
- Loading branch information
1 parent
4ffa9ec
commit 40736ea
Showing
4 changed files
with
89 additions
and
55 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
57 changes: 57 additions & 0 deletions
57
...egration/core-opensearch-dashboards/opensearch-dashboards/apps/vis_type_tsvb/tsvb.spec.js
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,57 @@ | ||
/* | ||
* Copyright OpenSearch Contributors | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
import { CURRENT_TENANT } from '../../../../../utils/commands'; | ||
import { | ||
TSVB_INDEX_ID, | ||
TSVB_PATH_INDEX_DATA, | ||
TSVB_CREATE_URL, | ||
VIS_APP_PATH, | ||
TSVB_INDEX_START_TIME, | ||
TSVB_INDEX_END_TIME, | ||
TSVB_INDEX_PATTERN, | ||
TSVB_VIS_TYPE, | ||
} from '../../../../../utils/dashboards/vis_type_tsvb/constants'; | ||
|
||
if (!Cypress.env('DATASOURCE_MANAGEMENT_ENABLED')) { | ||
before(() => { | ||
CURRENT_TENANT.newTenant = 'global'; | ||
cy.fleshTenantSettings(); | ||
cy.deleteIndex(TSVB_INDEX_ID); | ||
cy.bulkUploadDocs(TSVB_PATH_INDEX_DATA); | ||
|
||
// Dashboards requires an index pattern to continue to the Create Visualization stage | ||
cy.deleteIndexPattern(TSVB_INDEX_PATTERN); | ||
|
||
cy.wait(1000); | ||
cy.deleteSavedObjectByType(TSVB_VIS_TYPE, TSVB_INDEX_ID); | ||
|
||
cy.createIndexPattern(TSVB_INDEX_PATTERN, { | ||
title: TSVB_INDEX_PATTERN, | ||
timeFieldName: 'timestamp', | ||
}); | ||
// Visit the page | ||
cy.log('create a new tsvb visualization: ', TSVB_CREATE_URL); | ||
cy.visit(TSVB_CREATE_URL); | ||
cy.url().should('contain', VIS_APP_PATH); | ||
cy.setTopNavDate(TSVB_INDEX_START_TIME, TSVB_INDEX_END_TIME); | ||
|
||
// Wait for page to load | ||
cy.waitForLoader(); | ||
}); | ||
|
||
after(() => { | ||
cy.deleteIndex(TSVB_INDEX_ID); | ||
cy.deleteIndexPattern(TSVB_INDEX_PATTERN); | ||
}); | ||
|
||
describe('TSVB Visualization (MDS is disabled)', () => { | ||
it(`should create new tsvb visulization`, () => { | ||
cy.contains('button', 'Panel options').click(); | ||
cy.tsvbSaveVisualization(); | ||
cy.get('canvas').should('exist'); | ||
}); | ||
}); | ||
} |
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