-
Notifications
You must be signed in to change notification settings - Fork 114
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
Add cypress test for workspace overview page #1633
Conversation
Signed-off-by: Hailong Cui <[email protected]>
Signed-off-by: Hailong Cui <[email protected]>
Signed-off-by: Hailong Cui <[email protected]>
Signed-off-by: Hailong Cui <[email protected]>
...-dashboards/opensearch-dashboards/workspace-plugin/mds_workspace_analytics_overviews.spec.js
Outdated
Show resolved
Hide resolved
const createWorkspace = (datasourceId) => { | ||
cy.createWorkspace({ | ||
name: workspaceName, | ||
description: workspaceDescription, | ||
features: workspaceFeatures, | ||
settings: { | ||
permissions: { | ||
library_write: { users: ['%me%'] }, | ||
write: { users: ['%me%'] }, | ||
}, | ||
...(datasourceId ? { dataSources: [datasourceId] } : {}), | ||
}, | ||
}).then((value) => { | ||
workspaceId = value; | ||
}); | ||
}; |
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.
const createWorkspace = (datasourceId) => { | |
cy.createWorkspace({ | |
name: workspaceName, | |
description: workspaceDescription, | |
features: workspaceFeatures, | |
settings: { | |
permissions: { | |
library_write: { users: ['%me%'] }, | |
write: { users: ['%me%'] }, | |
}, | |
...(datasourceId ? { dataSources: [datasourceId] } : {}), | |
}, | |
}).then((value) => { | |
workspaceId = value; | |
}); | |
}; | |
const createWorkspace = (datasourceId) => { | |
cy.createWorkspace({ | |
name: workspaceName, | |
description: workspaceDescription, | |
features: workspaceFeatures, | |
settings: { | |
permissions: { | |
library_write: { users: ['%me%'] }, | |
write: { users: ['%me%'] }, | |
}, | |
...(datasourceId ? { dataSources: [datasourceId] } : {}), | |
}, | |
}).then((value) => { | |
workspaceId = value; | |
}); | |
}; |
We can move the function to a util function maybe?
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.
cy.createWorkspace
already been a util function, and this createWorkspace
function just utilized the cy.createWorkspace
to create workspace with and without datasource. To move it to a common place as util function may not benefits other test cases.
Signed-off-by: Hailong Cui <[email protected]>
@Hailong-am The |
Signed-off-by: Hailong Cui <[email protected]>
* cypress test for use case overview page Signed-off-by: Hailong Cui <[email protected]> * add cypress test for analytics overview page Signed-off-by: Hailong Cui <[email protected]> * add sample data cleanup Signed-off-by: Hailong Cui <[email protected]> * support mds is not enabled Signed-off-by: Hailong Cui <[email protected]> * remove alerts cards Signed-off-by: Hailong Cui <[email protected]> * fix failed test case Signed-off-by: Hailong Cui <[email protected]> --------- Signed-off-by: Hailong Cui <[email protected]> (cherry picked from commit 295636c)
* cypress test for use case overview page Signed-off-by: Hailong Cui <[email protected]> * add cypress test for analytics overview page Signed-off-by: Hailong Cui <[email protected]> * add sample data cleanup Signed-off-by: Hailong Cui <[email protected]> * support mds is not enabled Signed-off-by: Hailong Cui <[email protected]> * remove alerts cards Signed-off-by: Hailong Cui <[email protected]> * fix failed test case Signed-off-by: Hailong Cui <[email protected]> --------- Signed-off-by: Hailong Cui <[email protected]> (cherry picked from commit 295636c) Co-authored-by: Hailong Cui <[email protected]>
Description
Add cypress test for essential/search/analytics overview page
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.