forked from cvat-ai/cvat
-
Notifications
You must be signed in to change notification settings - Fork 0
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 1568. (cvat-ai#2106)
Co-authored-by: Dmitry Kruchinin <[email protected]>
- Loading branch information
1 parent
a30921b
commit 0982ea3
Showing
2 changed files
with
75 additions
and
0 deletions.
There are no files selected for viewing
60 changes: 60 additions & 0 deletions
60
tests/cypress/integration/issue_1568_cuboid_dump_annotation.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,60 @@ | ||
/* | ||
* Copyright (C) 2020 Intel Corporation | ||
* | ||
* SPDX-License-Identifier: MIT | ||
*/ | ||
|
||
/// <reference types="cypress" /> | ||
|
||
context('Dump annotation if cuboid created', () => { | ||
|
||
const issueId = '1568' | ||
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' | ||
|
||
before(() => { | ||
cy.visit('auth/login') | ||
cy.login() | ||
cy.imageGenerator('cypress/fixtures', image, width, height, color, posX, posY, labelName) | ||
cy.createAnnotationTask(taskName, labelName, attrName, textDefaultValue, image) | ||
cy.openTaskJob(taskName) | ||
}) | ||
|
||
describe(`Testing issue "${issueId}"`, () => { | ||
it('Create a cuboid', () => { | ||
cy.createCuboid('Shape', 309, 431, 616, 671) | ||
cy.get('#cvat-objects-sidebar-state-item-1') | ||
.should('contain', '1').and('contain', 'CUBOID SHAPE') | ||
}) | ||
it('Dump an annotation', () => { | ||
cy.get('.cvat-annotation-header-left-group').within(() => { | ||
cy.get('[title="Save current changes [Ctrl+S]"]') | ||
cy.get('button').contains('Save') | ||
.click({force: true}) | ||
cy.get('button').contains('Menu') | ||
.trigger('mouseover',{force: true}) | ||
}) | ||
cy.get('.cvat-annotation-menu').within(() => { | ||
cy.get('[title="Dump annotations"]') | ||
.trigger('mouseover') | ||
}) | ||
cy.get('.cvat-menu-dump-submenu-item').within(() => { | ||
cy.contains('Datumaro') | ||
.click() | ||
}) | ||
}) | ||
it('Error notification is ot exists', () => { | ||
cy.wait(5000) | ||
cy.get('.ant-notification-notice') | ||
.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