mirror of
https://github.com/bitnami/charts.git
synced 2026-04-02 15:27:08 +08:00
[bitnami/minio] Release 11.10.22 (#13857)
* [bitnami/minio] Release 11.10.22 updating components versions * Update README.md with readme-generator-for-helm * Simplify tests Signed-off-by: Bitnami Containers <bitnami-bot@vmware.com> Signed-off-by: Fran Mulero <fmulero@vmware.com> Co-authored-by: Fran Mulero <fmulero@vmware.com>
This commit is contained in:
@@ -1,15 +1,16 @@
|
||||
/// <reference types="cypress" />
|
||||
import { random } from '../support/utils';
|
||||
|
||||
it('allows creating a bucket, uploading and retrieving a file', () => {
|
||||
cy.login();
|
||||
cy.visit('/buckets/add-bucket');
|
||||
cy.visit(`/buckets/add-bucket`);
|
||||
let bucketName='';
|
||||
cy.fixture('buckets').then((buckets) => {
|
||||
cy.get('#bucket-name').type(`${buckets.newBucket.name}.${random}`);
|
||||
bucketName=`${buckets.newBucket.name}.${random}`;
|
||||
cy.get('#bucket-name').type(`${bucketName}`);
|
||||
cy.contains('button', 'Create Bucket').click();
|
||||
cy.visit(`/buckets/${buckets.newBucket.name}.${random}/browse`);
|
||||
});
|
||||
|
||||
|
||||
const fileToUpload = 'example.json';
|
||||
cy.get('#upload-main').click();
|
||||
cy.contains('Upload File').click();
|
||||
@@ -17,11 +18,12 @@ it('allows creating a bucket, uploading and retrieving a file', () => {
|
||||
cy.get('[type="file"]')
|
||||
.should('not.be.disabled')
|
||||
.selectFile(`cypress/fixtures/${fileToUpload}`, { force: true });
|
||||
cy.contains(fileToUpload).should('be.visible').click();
|
||||
cy.contains('Download').click({ force: true });
|
||||
});
|
||||
|
||||
cy.fixture(fileToUpload).then((uploadedFile) => {
|
||||
cy.request(`/api/v1/buckets/${bucketName}/objects/download?prefix=${Buffer.from(fileToUpload).toString('base64')}`).then((response) => {
|
||||
cy.writeFile(`cypress/downloads/${fileToUpload}`, response.body)
|
||||
})
|
||||
cy.readFile(`cypress/downloads/${fileToUpload}`).then((downloadedFile) => {
|
||||
expect(downloadedFile).to.contain(uploadedFile);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user