-
Notifications
You must be signed in to change notification settings - Fork 13
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
Automated testcase for creating a bucket with cache and multids #70
base: master
Are you sure you want to change the base?
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.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
@@ -91,4 +92,50 @@ describe('Bucket policy page', () => { | |||
cy.byTestID('delete-action').click(); | |||
cy.byTestID(SINGLE_BUCKET_POLICY).should('not.exist'); | |||
}); | |||
|
|||
// 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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 <[email protected]>
Signed-off-by: Chebrolu Harika <[email protected]>
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 = ( |
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.
confirmCreation
cypress/views/bucket-policy.ts
Outdated
.should('contain', '1 ObjectBucketClaim'); | ||
}; | ||
|
||
export const deleteBucket = (bucketName: string) => { |
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.
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. Instructions 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. Instructions 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: