Skip to content

Commit

Permalink
Cypress. Update case 105. Add check "Google cloud storage" provider f…
Browse files Browse the repository at this point in the history
…ields. (#3980)

* Update case 105. Add "Check "Google cloud storage" provider fields" step

* Fix eslint issue

Co-authored-by: dvkruchinin <dvkruchinin@gmail.com>
  • Loading branch information
Dmitry Kruchinin and dvkruchinin committed Dec 3, 2021
1 parent 6351df0 commit c79a4c1
Showing 1 changed file with 38 additions and 2 deletions.
40 changes: 38 additions & 2 deletions tests/cypress/integration/actions_tasks3/case_105_cloud_storage.js
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

0 comments on commit c79a4c1

Please sign in to comment.