Skip to content
Open
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ describe('object storage access key end-to-end tests', () => {

mockGetAccount(accountFactory.build({ capabilities: ['Object Storage'] }));
mockAppendFeatureFlags({
objMultiCluster: false,
objectStorageGen2: { enabled: false },
objMultiCluster: true,
objectStorageGen2: { enabled: true },
});

cy.visitWithLogin('/object-storage/access-keys');
Expand All @@ -59,8 +59,14 @@ describe('object storage access key end-to-end tests', () => {
.findByTitle('Create Access Key')
.should('be.visible')
.within(() => {
cy.findByText('Label').click();
cy.focused().type(keyLabel);
cy.findByLabelText('Label', { exact: false })
.should('be.visible')
.type(keyLabel);

cy.findByLabelText('Regions', { exact: false })
.should('be.visible')
.type('Atlanta, {enter}');

ui.buttonGroup
.findButtonByTitle('Create Access Key')
.should('be.visible')
Expand Down Expand Up @@ -124,6 +130,7 @@ describe('object storage access key end-to-end tests', () => {
const bucketClusterObj = chooseCluster();
const bucketRequest = createObjectStorageBucketFactoryLegacy.build({
cluster: bucketClusterObj.id,
cors_enabled: true,
label: bucketLabel,
// Default factory sets `cluster` and `region`, but API does not accept `region` yet.
region: undefined,
Expand All @@ -140,8 +147,8 @@ describe('object storage access key end-to-end tests', () => {
accountFactory.build({ capabilities: ['Object Storage'] })
);
mockAppendFeatureFlags({
objMultiCluster: false,
objectStorageGen2: { enabled: false },
objMultiCluster: true,
objectStorageGen2: { enabled: true },
});

interceptGetAccessKeys().as('getKeys');
Expand All @@ -160,10 +167,20 @@ describe('object storage access key end-to-end tests', () => {
.findByTitle('Create Access Key')
.should('be.visible')
.within(() => {
cy.findByText('Label').click();
cy.focused().type(keyLabel);
cy.findByLabelText('Limited Access').click();
cy.findByLabelText('Select read-only for all').click();
cy.findByLabelText('Label', { exact: false })
.should('be.visible')
.type(keyLabel);

cy.findByLabelText('Regions', { exact: false })
.should('be.visible')
.type('Atlanta, {enter}');

cy.focused().click();

cy.findByLabelText('Limited Access', { exact: false }).click();
cy.findByLabelText('Select read-only for all', {
exact: false,
}).click();

ui.buttonGroup
.findButtonByTitle('Create Access Key')
Expand Down Expand Up @@ -209,8 +226,8 @@ describe('object storage access key end-to-end tests', () => {
});
});

const permissionLabel = `This token has read-only access for ${bucketClusterObj.id}-${bucketLabel}`;
cy.findByLabelText(permissionLabel).should('be.visible');
const permissionLabel = `This access key has the following permissions:`;
cy.findByText(permissionLabel).should('be.visible');
});
});
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,12 +50,19 @@ describe('object storage access keys smoke tests', () => {
.findByTitle('Create Access Key')
.should('be.visible')
.within(() => {
cy.findByLabelText('Label').click();
cy.focused().type(mockAccessKey.label);
cy.findByLabelText('Label', { exact: false })
.should('be.visible')
.type(mockAccessKey.label);

cy.findByLabelText('Regions', { exact: false })
.should('be.visible')
.type('Atlanta, {enter}');

ui.buttonGroup
.findButtonByTitle('Create Access Key')
.as('qaCreateAccessKey')
.scrollIntoView();

cy.get('@qaCreateAccessKey')
.should('be.visible')
.should('be.enabled')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -298,10 +298,14 @@ describe('Object Storage enrollment', () => {
.findByTitle('Create Access Key')
.should('be.visible')
.within(() => {
cy.findByLabelText('Label')
cy.findByLabelText('Label', { exact: false })
.should('be.visible')
.type(mockAccessKey.label);

cy.findByLabelText('Regions', { exact: false })
.should('be.visible')
.type('Jakarta, ID{enter}');

ui.buttonGroup
.findButtonByTitle('Create Access Key')
.should('be.visible')
Expand Down Expand Up @@ -360,7 +364,13 @@ describe('Object Storage enrollment', () => {
.findByTitle('Create Access Key')
.should('be.visible')
.within(() => {
cy.findByLabelText('Label').should('be.visible').type(randomLabel());
cy.findByLabelText('Label', { exact: false })
.should('be.visible')
.type(randomLabel());

cy.findByLabelText('Regions', { exact: false })
.should('be.visible')
.type('Jakarta, ID{enter}');

ui.buttonGroup
.findButtonByTitle('Create Access Key')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ describe('object storage smoke tests', () => {
mockAppendFeatureFlags({
gecko2: false,
objMultiCluster: true,
objectStorageGen2: { enabled: false },
objectStorageGen2: { enabled: true },
}).as('getFeatureFlags');

mockGetBuckets([]).as('getBuckets');
Expand All @@ -65,7 +65,7 @@ describe('object storage smoke tests', () => {
cy.findByLabelText('Bucket Name (required)').click();
cy.focused().type(bucketLabel);
ui.regionSelect.find().click();
cy.focused().type(`${mockCluster.id}{enter}`);
cy.focused().type(`${mockRegion.label}{enter}`);
ui.buttonGroup
.findButtonByTitle('Create Bucket')
.should('be.visible')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ const emptyFolderMessage = 'This folder is empty.';
* @returns Non-empty bucket error message.
*/
const getNonEmptyBucketMessage = (bucketLabel: string) => {
return `Bucket ${bucketLabel} is not empty. Please delete all objects and try again.`;
return `The specified bucket '${bucketLabel}' is not empty. Please delete all objects before retrying.`;
};

/**
Expand Down

This file was deleted.

Loading
Loading