Automated testcase for creating a bucket with cache and multids#70
Automated testcase for creating a bucket with cache and multids#70HaruChebrolu wants to merge 7 commits intored-hat-storage:masterfrom
Conversation
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: HaruChebrolu The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
| }); | ||
|
|
||
| // This creates bucket policy from data sources dropdown with cache | ||
| it('creates Bucket policy with single data source and enabled cache', () => { |
There was a problem hiding this comment.
Please have a look into this PR Idea is to bring out common stuff into a separate file as we have to the data source.
@alfonsomthd what is your opinion regarding this, should we have a common separate file?
There was a problem hiding this comment.
I agree on code reuse: let's move the common logic to a helper method on the appropriate helper file.
Signed-off-by: Chebrolu Harika <hchebrol@redhat.com>
Signed-off-by: Chebrolu Harika <hchebrol@redhat.com>
cypress/views/bucket-policy.ts
Outdated
| import { Providers, TEST_DATA_SOURCE } from '../constants/tests'; | ||
| import { createDataSource } from './data-resource'; | ||
|
|
||
| export const createBucket = ( |
There was a problem hiding this comment.
Please make this as a keep value pair as we have for:
export const MCGMSCommon = { visitMcgMsDashboard: () => { .... }, visitBucketPolicyList: () => { ..... }, visitDataSourceListPage: () => { .... }, };
There was a problem hiding this comment.
can be named as BPCommons
cypress/views/bucket-policy.ts
Outdated
| import { Providers, TEST_DATA_SOURCE } from '../constants/tests'; | ||
| import { createDataSource } from './data-resource'; | ||
|
|
||
| export const createBucket = ( |
There was a problem hiding this comment.
Since it will be part of BPCommon, we can name the function createUsingSingleDS so that in future we can add methods for creating BP using multi DS
cypress/views/bucket-policy.ts
Outdated
| } | ||
| }; | ||
|
|
||
| export const ConfirmCreateBucket = () => { |
There was a problem hiding this comment.
I think this should be part of creating only as no one will call only to select the ns dropdown and click ok
cypress/views/bucket-policy.ts
Outdated
| cy.byTestID('confirm-action-bucket').click(); | ||
| }; | ||
|
|
||
| export const checkBucketCreation = ( |
cypress/views/bucket-policy.ts
Outdated
| .should('contain', '1 ObjectBucketClaim'); | ||
| }; | ||
|
|
||
| export const deleteBucket = (bucketName: string) => { |
There was a problem hiding this comment.
we are deleting from where details page or list page, better to mention it in name deleteFromDetailsPage or deleteFromListPage.
And also keep the navigating to the particular page out as this method should only delete the item.
|
@HaruChebrolu: The following test failed, say
Full PR test history. Your PR dashboard. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here. |
|
@HaruChebrolu: PR needs rebase. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
Added test cases for following scenarios: