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

Added test for manifest filetype #6951

Merged
merged 2 commits into from
Oct 9, 2023
Merged
Show file tree
Hide file tree
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 @@ -100,6 +100,7 @@ export default function ManifestsManager(props: Props): JSX.Element {
>
<Input
placeholder='manifest.jsonl'
className='cvat-cloud-storage-manifest-field'
onChange={(event) => onChangeManifestPath(event.target.value, idx)}
/>
</Form.Item>
Expand Down
21 changes: 17 additions & 4 deletions tests/cypress/e2e/actions_tasks3/case_105_cloud_storage.js
Original file line number Diff line number Diff line change
Expand Up @@ -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.', () => {
Expand Down