Skip to content
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

Cypress. Update case 105. Add check "Google cloud storage" provider fields. #3980

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 @@ -20,7 +20,9 @@ context('Cloud storage.', () => {
manifest: 'manifest.jsonl',
resource: 'container',
display_name: 'Demonstration container',
}
prefix: 'GCS_prefix',
projectID: 'Some ID',
};

before(() => {
cy.visit('auth/login');
Expand Down Expand Up @@ -82,7 +84,7 @@ context('Cloud storage.', () => {
.get('.cvat-cloud-storage-region-creator')
.should('be.visible')
.within(() => {
cy.contains('button', 'Add region').click()
cy.contains('button', 'Add region').click();
});
cy.get('.cvat-incorrect-add-region-notification').should('exist');
cy.closeNotification('.cvat-incorrect-add-region-notification');
Expand All @@ -109,6 +111,40 @@ context('Cloud storage.', () => {
.click();
cy.get('#account_name').should('exist');
cy.get('#SAS_token').should('not.exist');
});

it('Check "Google cloud storage" provider fields.', () => {
cy.contains('.cvat-cloud-storage-select-provider', 'Azure').click();
cy.contains('.cvat-cloud-storage-select-provider', 'Google').click();
cy.get('#resource')
.should('exist')
.should('have.attr', 'value', dummyData.resource);
cy.get('#credentials_type').should('exist').click();
cy.get('.ant-select-dropdown')
.not('.ant-select-dropdown-hidden')
.get('[title="Key file"]')
.should('be.visible')
.click();
cy.get('.cvat-cloud-storage-form-item-key-file').should('be.visible');
cy.get('[title="Key file"]').first().click();
cy.get('.ant-select-dropdown')
.not('.ant-select-dropdown-hidden')
.get('[title="Anonymous access"]')
.should('be.visible')
.click();
cy.get('.cvat-cloud-storage-form-item-key-file').should('not.exist');
cy.get('#prefix').should('exist').type(dummyData.prefix).should('have.value', dummyData.prefix);
cy.get('#project_id').should('exist').type(dummyData.projectID).should('have.value', dummyData.projectID);
cy.get('#location').should('exist').click();
cy.get('.ant-select-dropdown')
.not('.ant-select-dropdown-hidden')
.get('.cvat-cloud-storage-region-creator')
.should('be.visible')
.within(() => {
cy.contains('button', 'Add region').click();
});
cy.get('.cvat-incorrect-add-region-notification').should('exist');
cy.closeNotification('.cvat-incorrect-add-region-notification');
cy.get('.cvat-cloud-storage-reset-button').click();
cy.get('.cvat-cloud-storage-form').should('not.exist');
});
Expand Down