Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -78,12 +78,11 @@ describe('object storage end-to-end tests', () => {
cy.tag('purpose:syntheticTesting');
const bucketLabel = randomLabel();
const bucketClusterObj = chooseCluster();
const bucketCluster = bucketClusterObj.id;
const bucketRegion = getRegionById(bucketClusterObj.region).label;
const bucketHostname = `${bucketLabel}.${bucketClusterObj.domain}`;
const bucketRegion = getRegionById(bucketClusterObj.region);
let bucketHostname: string;
interceptGetBuckets().as('getBuckets');
interceptCreateBucket().as('createBucket');
interceptDeleteBucket(bucketLabel, bucketCluster).as('deleteBucket');
interceptDeleteBucket(bucketLabel, bucketRegion.id).as('deleteBucket');
interceptGetNetworkUtilization().as('getNetworkUtilization');

mockGetAccount(accountFactory.build({ capabilities: ['Object Storage'] }));
Expand All @@ -110,23 +109,25 @@ describe('object storage end-to-end tests', () => {
cy.findByLabelText('Bucket Name (required)').click();
cy.focused().type(bucketLabel);
ui.regionSelect.find().click();
cy.focused().type(`${bucketRegion}{enter}`);
cy.focused().type(`${bucketRegion.label}{enter}`);

ui.buttonGroup
.findButtonByTitle('Create Bucket')
.should('be.visible')
.click();
});

cy.wait(['@createBucket', '@getBuckets']);
cy.wait(['@createBucket', '@getBuckets']).then(([createBucket]) => {
bucketHostname = createBucket?.response?.body?.hostname;
});
ui.drawer.find().should('not.exist');

// Confirm that bucket is created, initiate deletion.
cy.findByText(bucketLabel)
.should('be.visible')
.closest('tr')
.within(() => {
cy.findByText(bucketRegion).should('be.visible');
cy.findByText(bucketRegion.label).should('be.visible');
cy.findByText(bucketHostname).should('be.visible');
ui.button.findByTitle('Delete').should('be.visible').click();
});
Expand Down
Loading