From 78bd9a19da537288efb85ee7c7c7f723b70ef542 Mon Sep 17 00:00:00 2001 From: dvkruchinin Date: Thu, 2 Dec 2021 12:40:51 +0300 Subject: [PATCH 1/2] Update case 105. Add "Check "Google cloud storage" provider fields" step --- .../actions_tasks3/case_105_cloud_storage.js | 38 ++++++++++++++++++- 1 file changed, 37 insertions(+), 1 deletion(-) diff --git a/tests/cypress/integration/actions_tasks3/case_105_cloud_storage.js b/tests/cypress/integration/actions_tasks3/case_105_cloud_storage.js index 223537b7ae45..e70ff2947431 100644 --- a/tests/cypress/integration/actions_tasks3/case_105_cloud_storage.js +++ b/tests/cypress/integration/actions_tasks3/case_105_cloud_storage.js @@ -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'); @@ -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'); }); From 0ff37a1a35264a82c40839ed053d1ce8e79eaedb Mon Sep 17 00:00:00 2001 From: dvkruchinin Date: Thu, 2 Dec 2021 12:45:39 +0300 Subject: [PATCH 2/2] Fix eslint issue --- .../integration/actions_tasks3/case_105_cloud_storage.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/cypress/integration/actions_tasks3/case_105_cloud_storage.js b/tests/cypress/integration/actions_tasks3/case_105_cloud_storage.js index e70ff2947431..ebd20bee76aa 100644 --- a/tests/cypress/integration/actions_tasks3/case_105_cloud_storage.js +++ b/tests/cypress/integration/actions_tasks3/case_105_cloud_storage.js @@ -84,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');