Skip to content

Commit

Permalink
Merge branch 'develop' into ay/add-icdar
Browse files Browse the repository at this point in the history
  • Loading branch information
yasakova-anastasia committed Mar 22, 2021
2 parents 9af1090 + 750d9cc commit 014450f
Show file tree
Hide file tree
Showing 17 changed files with 575 additions and 233 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Improved maintanance of popups visibility (<https://github.com/openvinotoolkit/cvat/pull/2809>)
- Image visualizations settings on canvas for faster access (<https://github.com/openvinotoolkit/cvat/pull/2872>)
- Better scale management of left panel when screen is too small (<https://github.com/openvinotoolkit/cvat/pull/2880>)
- Improved error messages for annotation import (<https://github.com/openvinotoolkit/cvat/pull/2935>)

### Deprecated

Expand Down
19 changes: 18 additions & 1 deletion cvat-core/tests/api/projects.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (C) 2019-2020 Intel Corporation
// Copyright (C) 2019-2021 Intel Corporation
//
// SPDX-License-Identifier: MIT

Expand Down Expand Up @@ -168,3 +168,20 @@ describe('Feature: delete a project', () => {
expect(result).toHaveLength(0);
});
});

describe('Feature: delete a label', () => {
test('delete a label', async () => {
let result = await window.cvat.projects.get({
id: 2,
});

const labelsLength = result[0].labels.length;
const deletedLabels = result[0].labels.filter((el) => el.name !== 'bicycle');
result[0].labels = deletedLabels;
result[0].save();
result = await window.cvat.projects.get({
id: 2,
});
expect(result[0].labels).toHaveLength(labelsLength - 1);
});
});
19 changes: 18 additions & 1 deletion cvat-core/tests/api/tasks.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (C) 2020 Intel Corporation
// Copyright (C) 2020-2021 Intel Corporation
//
// SPDX-License-Identifier: MIT

Expand Down Expand Up @@ -196,3 +196,20 @@ describe('Feature: delete a task', () => {
expect(result).toHaveLength(0);
});
});

describe('Feature: delete a label', () => {
test('delete a label', async () => {
let result = await window.cvat.tasks.get({
id: 100,
});

const labelsLength = result[0].labels.length;
const deletedLabels = result[0].labels.filter((el) => el.name !== 'person');
result[0].labels = deletedLabels;
result[0].save();
result = await window.cvat.tasks.get({
id: 100,
});
expect(result[0].labels).toHaveLength(labelsLength - 1);
});
});
6 changes: 6 additions & 0 deletions cvat-core/tests/mocks/dummy-data.mock.js
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,12 @@ const projectsDummyData = {
},
],
},
{
id: 2,
name: 'bicycle',
color: '#bb20c0',
attributes: [],
},
],
tasks: [
{
Expand Down
Loading

0 comments on commit 014450f

Please sign in to comment.