forecasting IT - #1811
Conversation
4d0a842 to
53530e2
Compare
Signed-off-by: Kaituo Li <kaituo@amazon.com>
| const fullVersion = response.body.version.number; | ||
| const majorMinorVersion = fullVersion.split('.').slice(0, 2).join('.'); | ||
|
|
||
| if (majorMinorVersion !== '3.1') { |
There was a problem hiding this comment.
does this mean the test will need to be updated could this use some check to make sure it's greater than or equal to 3.1? or is this just temporary?
There was a problem hiding this comment.
updated to make sure it's greater than or equal to 3.1
There was a problem hiding this comment.
nothing for this pr. but we should consider zipping up this files in the future and creating a helper function to unzip and install (if it's not there already). like i said nothing for this pr.
| }); | ||
| }); | ||
|
|
||
| Cypress.Commands.add('setAbsoluteDate', (startDate, endDate) => { |
There was a problem hiding this comment.
is this not available already? through the package https://github.com/opensearch-project/opensearch-dashboards-test-library/blob/main/common-utils/common-UI/common-UI.js#L23
There was a problem hiding this comment.
This functions assumes existence of querySubmitButton, which is optional and does not exist in forecasting detail page.
| cy.getElementByTestId('superDatePickerApplyTimeButton').click(); | ||
|
|
||
| // Wait for the chart to reload with the new data | ||
| cy.contains('Loading forecast results...', { timeout: 180000 }).should( |
There was a problem hiding this comment.
this seems only relevant to forecasting but setabsolutedate is too broad. if another plugin was to use it their test will fail if not present
kavilla
left a comment
There was a problem hiding this comment.
approving. i think we should consider using the library for the date range. and remove the global function.
Signed-off-by: Kaituo Li <kaituo@amazon.com>
* forecasting IT Signed-off-by: Kaituo Li <kaituo@amazon.com> * address comments Signed-off-by: Kaituo Li <kaituo@amazon.com> --------- Signed-off-by: Kaituo Li <kaituo@amazon.com> (cherry picked from commit a48f8ee)
Description
This PR adds cypress tests for https://docs.opensearch.org/docs/latest/observing-your-data/forecast/index/
Adds shared fixtures (sample forecast data & mocked API payloads) and utility commands under
cypress/utils.Issues Resolved
[List any issues this PR will resolve]
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.