diff --git a/cvat-ui/src/components/create-cloud-storage-page/manifests-manager.tsx b/cvat-ui/src/components/create-cloud-storage-page/manifests-manager.tsx index 2a5809b5268d..2d2419a6c48a 100644 --- a/cvat-ui/src/components/create-cloud-storage-page/manifests-manager.tsx +++ b/cvat-ui/src/components/create-cloud-storage-page/manifests-manager.tsx @@ -100,6 +100,7 @@ export default function ManifestsManager(props: Props): JSX.Element { > onChangeManifestPath(event.target.value, idx)} /> diff --git a/tests/cypress/e2e/actions_tasks3/case_105_cloud_storage.js b/tests/cypress/e2e/actions_tasks3/case_105_cloud_storage.js index 8bacf46fd94f..6657a6e851dd 100644 --- a/tests/cypress/e2e/actions_tasks3/case_105_cloud_storage.js +++ b/tests/cypress/e2e/actions_tasks3/case_105_cloud_storage.js @@ -40,13 +40,26 @@ context('Cloud storage.', () => { cy.get($el).should('exist'); }); }); + }); + + it('Check "Cloud Storage" manifest field.', () => { // Check add/remove manifest file cy.get('.cvat-add-manifest-button').should('be.visible').click(); - cy.get('[placeholder="manifest.jsonl"]').should('exist').should('have.attr', 'value', ''); - cy.get('[placeholder="manifest.jsonl"]').type(dummyData.manifest); - cy.get('[placeholder="manifest.jsonl"]').should('have.attr', 'value', dummyData.manifest); + cy.get('.cvat-cloud-storage-manifest-field').should('exist').should('have.attr', 'value', ''); + cy.get('.cvat-cloud-storage-manifest-field').type(dummyData.manifest); + cy.get('.cvat-cloud-storage-manifest-field').should('have.attr', 'value', dummyData.manifest); + cy.get('[data-icon="delete"]').should('be.visible').click(); + cy.get('.cvat-cloud-storage-manifest-field').should('not.exist'); + + // Check we can't add non-jsonl file + cy.get('.cvat-add-manifest-button').should('be.visible').click(); + cy.get('.cvat-cloud-storage-manifest-field').type('manifest.json'); + cy.get('.cvat-cloud-storage-manifest-field').should('have.attr', 'value', 'manifest.json'); + cy.get('.cvat-cloud-storage-form').within(() => { + cy.contains('Manifest file must have .jsonl extension').should('exist'); + }); cy.get('[data-icon="delete"]').should('be.visible').click(); - cy.get('[placeholder="manifest.jsonl"]').should('not.exist'); + cy.get('.cvat-cloud-storage-manifest-field').should('not.exist'); }); it('Check "AWS S3" provider fields.', () => {