-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'develop' of https://github.com/openvinotoolkit/cvat int…
…o dkru/case-40-create-task-without-necessary-arguments
- Loading branch information
Showing
7 changed files
with
150 additions
and
11 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
71 changes: 71 additions & 0 deletions
71
tests/cypress/integration/actions_tasks_objects/case_41_add_delete_label_attribute.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
// Copyright (C) 2021 Intel Corporation | ||
// | ||
// SPDX-License-Identifier: MIT | ||
|
||
/// <reference types="cypress" /> | ||
|
||
context('Add/delete labels and attributes.', () => { | ||
const caseId = '41'; | ||
const labelName = `Case ${caseId}`; | ||
const attrName = `Attr for ${labelName}`; | ||
const textDefaultValue = 'Some default value for type Text'; | ||
|
||
before(() => { | ||
cy.visit('auth/login'); | ||
cy.login(); | ||
cy.get('#cvat-create-task-button').click(); | ||
}); | ||
|
||
describe(`Testing "${labelName}"`, () => { | ||
it('Start adding a label. Press Cancel. The label is not created.', () => { | ||
cy.get('.cvat-constructor-viewer-new-item').click(); // Open label constructor | ||
cy.get('[placeholder="Label name"]').type(labelName); | ||
cy.contains('[type="button"]', 'Cancel').click(); | ||
cy.get('.cvat-constructor-viewer-item').should('not.exist'); | ||
}); | ||
|
||
it('Start adding a label. Start adding an attribute. Press Cancel. The label is not created.', () => { | ||
cy.get('.cvat-constructor-viewer-new-item').click(); | ||
cy.get('[placeholder="Label name"]').type(labelName); | ||
cy.get('.cvat-new-attribute-button').click(); | ||
cy.get('.cvat-attribute-name-input').type(attrName); | ||
cy.get('.cvat-attribute-type-input').click(); | ||
cy.get('.cvat-attribute-type-input-text').click(); | ||
cy.get('.cvat-attribute-values-input').type(textDefaultValue); | ||
cy.contains('[type="button"]', 'Cancel').click(); | ||
cy.get('.cvat-constructor-viewer-item').should('not.exist'); | ||
}); | ||
|
||
it('Start adding a label. Add an attribute. Press Done. The label should be created.', () => { | ||
cy.get('.cvat-constructor-viewer-new-item').click(); | ||
cy.get('[placeholder="Label name"]').type(labelName); | ||
cy.get('.cvat-new-attribute-button').click(); | ||
cy.get('.cvat-attribute-name-input').type(attrName); | ||
cy.get('.cvat-attribute-type-input').click(); | ||
cy.get('.cvat-attribute-type-input-text').click(); | ||
cy.get('.cvat-attribute-values-input').type(textDefaultValue); | ||
cy.contains('[type="submit"]', 'Done').click(); | ||
cy.get('.cvat-constructor-viewer-item').should('exist'); | ||
}); | ||
|
||
it('Start to edit the label. Attribute should exist. Remove the atrribute. Press Done.', () => { | ||
cy.get('.cvat-constructor-viewer-item').find('[aria-label="edit"]').click(); | ||
cy.get('.cvat-attribute-inputs-wrapper') | ||
.should('exist') | ||
.within(() => { | ||
cy.get('.cvat-delete-attribute-button').click(); | ||
}); | ||
cy.get('.cvat-attribute-inputs-wrapper').should('not.exist'); | ||
cy.contains('[type="submit"]', 'Done').click(); | ||
// After deleting the attribute and saving the changes, check that the attribute is missing. | ||
cy.get('.cvat-constructor-viewer-item').find('[aria-label="edit"]').click(); | ||
cy.get('.cvat-attribute-inputs-wrapper').should('not.exist'); | ||
cy.contains('[type="button"]', 'Cancel').click(); | ||
}); | ||
|
||
it('Delete the added label. The label removed.', () => { | ||
cy.get('.cvat-constructor-viewer-item').find('[aria-label="close"]').click(); | ||
cy.get('.cvat-constructor-viewer-item').should('not.exist'); | ||
}); | ||
}); | ||
}); |
34 changes: 34 additions & 0 deletions
34
...ypress/integration/actions_tasks_objects/case_43_create_label_with_existing_label_name.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
// Copyright (C) 2021 Intel Corporation | ||
// | ||
// SPDX-License-Identifier: MIT | ||
|
||
/// <reference types="cypress" /> | ||
|
||
import { taskName } from '../../support/const'; | ||
|
||
context('Creating a label with existing label name.', () => { | ||
const caseId = '43'; | ||
let firstLabelName = ''; | ||
|
||
before(() => { | ||
cy.openTask(taskName); | ||
}); | ||
|
||
describe(`Testing case "${caseId}"`, () => { | ||
it('Try to create a label with existing name. Should not be successful.', () => { | ||
// Get the name of the first existing label. | ||
cy.get('.cvat-constructor-viewer-item') | ||
.first() | ||
.then((firstLabel) => { | ||
firstLabelName = firstLabel.text(); | ||
// Try to create a label with existing label name | ||
cy.get('.cvat-constructor-viewer-new-item').click(); | ||
cy.get('[placeholder="Label name"]').type(firstLabelName); | ||
cy.contains('[type="submit"]', 'Done').click(); | ||
}); | ||
cy.get('.cvat-notification-notice-update-task-failed') | ||
.should('exist') | ||
.and('contain.text', 'label names must be unique'); | ||
}); | ||
}); | ||
}); |
33 changes: 33 additions & 0 deletions
33
tests/cypress/integration/actions_tasks_objects/issue_2690_filters_help_window.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
// Copyright (C) 2021 Intel Corporation | ||
// | ||
// SPDX-License-Identifier: MIT | ||
|
||
/// <reference types="cypress" /> | ||
|
||
import { taskName } from '../../support/const'; | ||
|
||
context('Annotation filter help dialog window.', () => { | ||
const issueId = '2690'; | ||
|
||
before(() => { | ||
cy.openTaskJob(taskName); | ||
}); | ||
|
||
describe(`Testing issue "${issueId}"`, () => { | ||
it('Open annotation filters help dialog window. The window is visible.', () => { | ||
cy.get('.cvat-annotations-filters-input').within(() => { | ||
// class="ant-select-selection-placeholder" has CSS pointer-events: none | ||
cy.get('.ant-select-selection-placeholder').invoke('css', 'pointer-events', 'auto'); // Replace CSS "pointer-events" to auto | ||
cy.get('[aria-label="filter"]').click(); | ||
}); | ||
cy.get('.cvat-annotations-filters-help-modal-window').should('exist').and('be.visible'); | ||
}); | ||
|
||
it('Close annotation filters help dialog window. The window is closed.', () => { | ||
cy.get('.cvat-annotations-filters-help-modal-window').within(() => { | ||
cy.contains('button', 'OK').click(); | ||
}); | ||
cy.get('.cvat-annotations-filters-help-modal-window').should('not.exist'); | ||
}); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters