[bitnami/minio] Fix minio test (#9776)

* Fixing the inconsistencies

Signed-off-by: alukic <alukic@vmware.com>

* Fixed environment variable name

Signed-off-by: alukic <alukic@vmware.com>

* Changed variable name for PhpMyAdmin

Signed-off-by: alukic <alukic@vmware.com>

* Removed unused references to matrix platform

Signed-off-by: alukic <alukic@vmware.com>

* Apply review suggestion

Signed-off-by: alukic <alukic@vmware.com>

* Fix MiniO file upload test

Signed-off-by: alukic <alukic@vmware.com>

* Fix a mistake happened in rebase

Signed-off-by: alukic <alukic@vmware.com>

* Fixing the inconsistencies

Signed-off-by: alukic <alukic@vmware.com>

* Removed unused references to matrix platform

Signed-off-by: alukic <alukic@vmware.com>
This commit is contained in:
superaleks
2022-04-13 10:08:52 +02:00
committed by GitHub
parent 2661923a73
commit 278a485a10
@@ -1,67 +1,69 @@
/// <reference types="cypress" />
import {
random,
} from './utils'
import { random } from './utils';
it('allows user to log in and log out', () => {
cy.login();
cy.get('[data-testid="ErrorOutlineIcon"]').should('not.exist');
cy.get("#logout").scrollIntoView().should('be.visible').click();
})
cy.get('#logout').scrollIntoView().click();
});
it('allows creating a bucket and file upload', () => {
it('allows creating a bucket and file upload', () => {
cy.login();
cy.visit('add-bucket');
cy.contains('div','Return to Buckets')
cy.fixture('testdata').then((td) => {
cy.get('#bucket-name').should('be.visible').type(`${td.bucketTitle}.${random}`);
})
cy.contains('button[type="submit"]','Create Bucket').should('be.visible').click();
cy.get('#bucket-name')
.should('be.visible')
.type(`${td.bucketTitle}.${random}`);
});
cy.contains('button[type="submit"]', 'Create Bucket')
.should('be.visible')
.click();
cy.fixture('testdata').then((td) => {
cy.url().should('include',`buckets/${td.bucketTitle}`);
})
cy.url().should('include', `buckets/${td.bucketTitle}`);
});
cy.get('#upload-main').should('be.visible').click();
cy.contains('span','Upload File').should('be.visible').click();
cy.get('div#object-list-wrapper > input[type="file"]').should('not.be.disabled').selectFile('cypress/fixtures/example.json',
{force:true});
cy.get('button[aria-label="Clear Completed List"]').should('be.visible').click();
cy.contains('div','Object uploaded successfully.').should('be.visible');
})
cy.contains('#upload-main', 'Upload').click();
cy.contains('span', 'Upload File').should('be.visible').click();
cy.get('div#object-list-wrapper > input[type="file"]')
.should('not.be.disabled')
.selectFile('cypress/fixtures/example.json', { force: true });
cy.reload();
cy.contains('example.json');
});
it('allows creating a user', () => {
cy.login();
cy.visit('identity/users');
cy.contains('Create User');
cy.get('[aria-label="Create User"]').should('be.visible').click();
cy.get('[aria-label="Create User"]').click();
cy.fixture('testdata').then((td) => {
cy.get('#accesskey-input').should('be.visible').type(`${td.testAccessKey}.${random}`);
cy.get('#standard-multiline-static').should('be.visible').type(`${td.testSecretKey}.${random}`);
})
cy.contains('button[type="submit"]','Save').should('be.visible').click();
cy.get('#accesskey-input').type(`${td.testAccessKey}.${random}`);
cy.get('#standard-multiline-static').type(`${td.testSecretKey}.${random}`);
});
cy.contains('button[type="submit"]', 'Save').click();
cy.fixture('testdata').then((td) => {
cy.contains(td.testAccessKey).should('be.visible');
})
});
cy.get('#accesskey-input').should('not.exist');
})
});
it('allows creating a group', () => {
cy.login();
cy.visit('identity/groups');
cy.get('[aria-label="Create Group"]').should('be.visible').click();
cy.get('[aria-label="Create Group"]').click();
cy.fixture('testdata').then((td) => {
cy.get('#group-name').should('be.visible').type(`${td.testGroupName}.${random}`);
cy.contains('button[type="submit"]','Save').click();
cy.get('#group-name').type(`${td.testGroupName}.${random}`);
cy.contains('button[type="submit"]', 'Save').click();
cy.contains(td.testGroupName);
})
cy.contains('div[role="dialog"]','Create Group').should('not.exist');
})
});
cy.contains('div[role="dialog"]', 'Create Group').should('not.exist');
});
it('allows creating a service account and downloading credentials', () => {
cy.login();
cy.visit('identity/account');
cy.get('[aria-label="Create service account"]').should('be.visible').click();
cy.contains('button[type="submit"]','Create').click();
cy.get('#download-button').should('be.visible').click();
cy.get('[aria-label="Create service account"]').click();
cy.contains('button[type="submit"]', 'Create').click();
cy.get('#download-button').click();
cy.readFile('cypress/downloads/credentials.json').should('exist');
})
});