-
Notifications
You must be signed in to change notification settings - Fork 115
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Table visualization] Add functional tests for new table vis #423
Conversation
cy.deleteIndex(TABLE_INDEX_ID); | ||
cy.deleteIndexPattern(TABLE_INDEX_PATTERN); | ||
cy.bulkUploadDocs(TABLE_PATH_INDEX_DATA); | ||
cy.createIndexPattern(TABLE_INDEX_PATTERN, { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
your saved object seems to already have the required index pattern. Do you still need to run this command?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes. For saved index pattern, I used two ways to test in table.
- Manually add an index pattern in saved object then create a table vis
cy.createIndexPattern
. This is used in basic.spec.js - Import an saved object through
cy.importSavedObjects(TABLE_PATH_SO_DATA)
. This method is used in other three tests.
Basically I would like to try both to make sure table vis can created from both ways.
* Terms Aggregation | ||
*/ | ||
|
||
Cypress.Commands.add('toggleOtherBucket', (request) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we add prefixes to these custom commands? I can see other commands being named similarly. e.g for VisBuilder specific commands i prefixed them with vb
so that there arent two commands with the same name.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good call. I didn't realize that. I will update the command names and add a prefix tb
to all of them, which represents table. If tb
is ambiguous, pls let me know.
it('Should allow applying changed params', () => { | ||
cy.setHistogramInterval('201', 2); | ||
cy.isUpdateAggregationSettingsEnabled(); | ||
}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Each test should be atomic. so that even if one test does not pass, the next test runs without being affected.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Got it. I will modify this one. Thank you.
aa52db0
to
4abd9ce
Compare
@ananzh Do you need confirmation from Ashwin before merging? If not, we can approve and get it merged. |
There are four test cases: * basic.spec.js contains tests related to vis page, like inspector, save an object. * data.spec.js tests diff metrics and buckets aggregations. * options.spec.js contains tests on options panel. * split.spec.js tests table functions, like sort, adjust col width, split tables and etc. Most tests are the same as the removed funtional tests. split.spec.js is the only one with all new tests. Partially Resolved: opensearch-project#401 Signed-off-by: Anan Zhuang <ananzh@amazon.com>
Signed-off-by: Anan Zhuang <ananzh@amazon.com>
Signed-off-by: Anan Zhuang <ananzh@amazon.com>
Currently there are two submit type button in data source which cause cypress fail to find and click. In this PR, I switch to use data-test-subj to uniquely identify the btn. Issue Resolved: opensearch-project#439 Signed-off-by: Anan Zhuang <ananzh@amazon.com>
Signed-off-by: Kawika Avilla <kavilla414@gmail.com>
* [Table visualization] Add functional tests for new table vis There are four test cases: * basic.spec.js contains tests related to vis page, like inspector, save an object. * data.spec.js tests diff metrics and buckets aggregations. * options.spec.js contains tests on options panel. * split.spec.js tests table functions, like sort, adjust col width, split tables and etc. Most tests are the same as the removed funtional tests. split.spec.js is the only one with all new tests. Partially Resolved: #401 Signed-off-by: Anan Zhuang <ananzh@amazon.com> * fix PR comments Signed-off-by: Anan Zhuang <ananzh@amazon.com> * fix test error and add embed test suite Signed-off-by: Anan Zhuang <ananzh@amazon.com> * Fix multiple submit bug Currently there are two submit type button in data source which cause cypress fail to find and click. In this PR, I switch to use data-test-subj to uniquely identify the btn. Issue Resolved: #439 Signed-off-by: Anan Zhuang <ananzh@amazon.com> * missed conflict resolution Signed-off-by: Kawika Avilla <kavilla414@gmail.com> --------- Signed-off-by: Anan Zhuang <ananzh@amazon.com> Signed-off-by: Kawika Avilla <kavilla414@gmail.com> Co-authored-by: Kawika Avilla <kavilla414@gmail.com> (cherry picked from commit 3dffb5f)
* [Table visualization] Add functional tests for new table vis There are four test cases: * basic.spec.js contains tests related to vis page, like inspector, save an object. * data.spec.js tests diff metrics and buckets aggregations. * options.spec.js contains tests on options panel. * split.spec.js tests table functions, like sort, adjust col width, split tables and etc. Most tests are the same as the removed funtional tests. split.spec.js is the only one with all new tests. Partially Resolved: #401 Signed-off-by: Anan Zhuang <ananzh@amazon.com> * fix PR comments Signed-off-by: Anan Zhuang <ananzh@amazon.com> * fix test error and add embed test suite Signed-off-by: Anan Zhuang <ananzh@amazon.com> * Fix multiple submit bug Currently there are two submit type button in data source which cause cypress fail to find and click. In this PR, I switch to use data-test-subj to uniquely identify the btn. Issue Resolved: #439 Signed-off-by: Anan Zhuang <ananzh@amazon.com> * missed conflict resolution Signed-off-by: Kawika Avilla <kavilla414@gmail.com> --------- Signed-off-by: Anan Zhuang <ananzh@amazon.com> Signed-off-by: Kawika Avilla <kavilla414@gmail.com> Co-authored-by: Kawika Avilla <kavilla414@gmail.com> (cherry picked from commit 3dffb5f)
…671) * [Table visualization] Add functional tests for new table vis There are four test cases: * basic.spec.js contains tests related to vis page, like inspector, save an object. * data.spec.js tests diff metrics and buckets aggregations. * options.spec.js contains tests on options panel. * split.spec.js tests table functions, like sort, adjust col width, split tables and etc. Most tests are the same as the removed funtional tests. split.spec.js is the only one with all new tests. Partially Resolved: #401 Signed-off-by: Anan Zhuang <ananzh@amazon.com> * fix PR comments Signed-off-by: Anan Zhuang <ananzh@amazon.com> * fix test error and add embed test suite Signed-off-by: Anan Zhuang <ananzh@amazon.com> * Fix multiple submit bug Currently there are two submit type button in data source which cause cypress fail to find and click. In this PR, I switch to use data-test-subj to uniquely identify the btn. Issue Resolved: #439 Signed-off-by: Anan Zhuang <ananzh@amazon.com> * missed conflict resolution Signed-off-by: Kawika Avilla <kavilla414@gmail.com> --------- Signed-off-by: Anan Zhuang <ananzh@amazon.com> Signed-off-by: Kawika Avilla <kavilla414@gmail.com> Co-authored-by: Kawika Avilla <kavilla414@gmail.com> (cherry picked from commit 3dffb5f) Co-authored-by: Anan Zhuang <ananzh@amazon.com>
…672) * [Table visualization] Add functional tests for new table vis There are four test cases: * basic.spec.js contains tests related to vis page, like inspector, save an object. * data.spec.js tests diff metrics and buckets aggregations. * options.spec.js contains tests on options panel. * split.spec.js tests table functions, like sort, adjust col width, split tables and etc. Most tests are the same as the removed funtional tests. split.spec.js is the only one with all new tests. Partially Resolved: #401 Signed-off-by: Anan Zhuang <ananzh@amazon.com> * fix PR comments Signed-off-by: Anan Zhuang <ananzh@amazon.com> * fix test error and add embed test suite Signed-off-by: Anan Zhuang <ananzh@amazon.com> * Fix multiple submit bug Currently there are two submit type button in data source which cause cypress fail to find and click. In this PR, I switch to use data-test-subj to uniquely identify the btn. Issue Resolved: #439 Signed-off-by: Anan Zhuang <ananzh@amazon.com> * missed conflict resolution Signed-off-by: Kawika Avilla <kavilla414@gmail.com> --------- Signed-off-by: Anan Zhuang <ananzh@amazon.com> Signed-off-by: Kawika Avilla <kavilla414@gmail.com> Co-authored-by: Kawika Avilla <kavilla414@gmail.com> (cherry picked from commit 3dffb5f) Co-authored-by: Anan Zhuang <ananzh@amazon.com>
…rch-project#423) (opensearch-project#671) * [Table visualization] Add functional tests for new table vis There are four test cases: * basic.spec.js contains tests related to vis page, like inspector, save an object. * data.spec.js tests diff metrics and buckets aggregations. * options.spec.js contains tests on options panel. * split.spec.js tests table functions, like sort, adjust col width, split tables and etc. Most tests are the same as the removed funtional tests. split.spec.js is the only one with all new tests. Partially Resolved: opensearch-project#401 Signed-off-by: Anan Zhuang <ananzh@amazon.com> * fix PR comments Signed-off-by: Anan Zhuang <ananzh@amazon.com> * fix test error and add embed test suite Signed-off-by: Anan Zhuang <ananzh@amazon.com> * Fix multiple submit bug Currently there are two submit type button in data source which cause cypress fail to find and click. In this PR, I switch to use data-test-subj to uniquely identify the btn. Issue Resolved: opensearch-project#439 Signed-off-by: Anan Zhuang <ananzh@amazon.com> * missed conflict resolution Signed-off-by: Kawika Avilla <kavilla414@gmail.com> --------- Signed-off-by: Anan Zhuang <ananzh@amazon.com> Signed-off-by: Kawika Avilla <kavilla414@gmail.com> Co-authored-by: Kawika Avilla <kavilla414@gmail.com> (cherry picked from commit 3dffb5f) Co-authored-by: Anan Zhuang <ananzh@amazon.com> Signed-off-by: leanne.laceybyrne@eliatra.com <leanne.laceybyrne@eliatra.com>
Description
There are five test cases:
basic.mov
data.mov
options.mov
split.mov
embed.mov
Most tests are the same as the removed funtional tests. split.spec.js is the only one with all new tests.
Partially Resolved
#401
Check List
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.