-
Notifications
You must be signed in to change notification settings - Fork 3.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Cypress test for issue 1425. (#2122)
Co-authored-by: Dmitry Kruchinin <dmitryx.kruchinin@intel.com>
- v2.31.0
- v2.30.0
- v2.29.0
- v2.28.0
- v2.27.0
- v2.26.1
- v2.26.0
- v2.25.0
- v2.24.0
- v2.23.1
- v2.23.0
- v2.22.0
- v2.21.3
- v2.21.2
- v2.21.1
- v2.21.0
- v2.20.0
- v2.19.1
- v2.19.0
- v2.18.0
- v2.17.0
- v2.16.3
- v2.16.2
- v2.16.1
- v2.16.0
- v2.15.0
- v2.14.4
- v2.14.3
- v2.14.2
- v2.14.1
- v2.14.0
- v2.13.0
- v2.12.1
- v2.12.0
- v2.11.3
- v2.11.2
- v2.11.1
- v2.11.0
- v2.10.3
- v2.10.2
- v2.10.1
- v2.10.0
- v2.9.2
- v2.9.1
- v2.9.0
- v2.8.2
- v2.8.1
- v2.8.0
- v2.7.6
- v2.7.5
- v2.7.4
- v2.7.3
- v2.7.2
- v2.7.1
- v2.7.0
- v2.6.2
- v2.6.1
- v2.6.0
- v2.5.2
- v2.5.1
- v2.5.0
- v2.4.9
- v2.4.8
- v2.4.7
- v2.4.6
- v2.4.5
- v2.4.4
- v2.4.3
- v2.4.2
- v2.4.1
- v2.4.0
- v2.3.0
- v2.2.0
- v2.1.0
- v2.0.0
- v2.0.0-alpha
- v1.7.0
- v1.6.0
- v1.5.0
- v1.4.0
- v1.3.0
- v1.2.0
- v1.2.0-beta
- v1.2.0-alpha
1 parent
bd14385
commit bd6cefe
Showing
2 changed files
with
84 additions
and
3 deletions.
There are no files selected for viewing
66 changes: 66 additions & 0 deletions
66
tests/cypress/integration/issue_1425_highlighted_attribute_correspond_chosen_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,66 @@ | ||
/* | ||
* Copyright (C) 2020 Intel Corporation | ||
* | ||
* SPDX-License-Identifier: MIT | ||
*/ | ||
|
||
/// <reference types="cypress" /> | ||
|
||
context('The highlighted attribute in AAM should correspond to the chosen attribute', () => { | ||
|
||
const issueId = '1425' | ||
const labelName = `Issue ${issueId}` | ||
const taskName = `New annotation task for ${labelName}` | ||
const attrName = `Attr for ${labelName}` | ||
const textDefaultValue = 'Some default value for type Text' | ||
const image = `image_${issueId}.png` | ||
const width = 800 | ||
const height = 800 | ||
const posX = 10 | ||
const posY = 10 | ||
const color = 'gray' | ||
const additionalAttrName = `Attr 2` | ||
const additionalValue = `Attr value 2` | ||
const typeAttribute = 'Text' | ||
let textValue = '' | ||
|
||
before(() => { | ||
cy.visit('auth/login') | ||
cy.login() | ||
cy.imageGenerator('cypress/fixtures', image, width, height, color, posX, posY, labelName) | ||
}) | ||
|
||
describe(`Testing issue "${issueId}"`, () => { | ||
it('Create a task with multiple attributes, create a object', () => { | ||
cy.createAnnotationTask(taskName, labelName, attrName, textDefaultValue, image, false, 1, true, additionalAttrName, typeAttribute, additionalValue) | ||
cy.openTaskJob(taskName) | ||
cy.createShape(309, 431, 616, 671) | ||
}) | ||
it('Go to AAM', () => { | ||
cy.changeAnnotationMode('Attribute annotation') | ||
}) | ||
it('Check if highlighted attribute correspond to the chosen attribute in right panel', () => { | ||
cy.get('.cvat_canvas_text').within(() => { | ||
cy.get('[style="fill: red;"]').then($textValue => { | ||
textValue = $textValue.text().split(': ')[1] | ||
}) | ||
}) | ||
cy.get('.attribute-annotation-sidebar-attr-editor').within(() => { | ||
cy.get('[type="text"]').should('have.value', textValue) | ||
}) | ||
}) | ||
it('Go to next attribute and check again', () => { | ||
cy.get('.attribute-annotation-sidebar-attribute-switcher') | ||
.find('.anticon-right') | ||
.click({force: true}) | ||
cy.get('.cvat_canvas_text').within(() => { | ||
cy.get('[style="fill: red;"]').then($textValue => { | ||
textValue = $textValue.text().split(': ')[1] | ||
}) | ||
}) | ||
cy.get('.attribute-annotation-sidebar-attr-editor').within(() => { | ||
cy.get('[type="text"]').should('have.value', textValue) | ||
}) | ||
}) | ||
}) | ||
}) |
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