Skip to content

Commit

Permalink
Cypress test for issue 1433. (cvat-ai#2116)
Browse files Browse the repository at this point in the history
Co-authored-by: Dmitry Kruchinin <[email protected]>
  • Loading branch information
dvkruchinin and Dmitry Kruchinin authored Sep 3, 2020
1 parent 98c06a3 commit a30921b
Showing 1 changed file with 41 additions and 0 deletions.
41 changes: 41 additions & 0 deletions tests/cypress/integration/issue_1433_hide_functionality.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
/*
* Copyright (C) 2020 Intel Corporation
*
* SPDX-License-Identifier: MIT
*/

/// <reference types="cypress" />

context('Check hide functionality (H)', () => {

const issueId = '1433'
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)
cy.createShape(309, 431, 616, 671)
})

describe(`Testing issue "${issueId}"`, () => {
it('Object is hidden', () => {
cy.get('#cvat_canvas_shape_1')
.trigger('mousemove')
.trigger('mouseover')
.trigger('keydown', {key: 'h'})
.should('be.hidden')
})
})
})

0 comments on commit a30921b

Please sign in to comment.