Skip to content

Commit

Permalink
Applying comments.
Browse files Browse the repository at this point in the history
Add command to open/close settings.
  • Loading branch information
Dmitry Kruchinin committed Aug 26, 2020
1 parent b2deace commit 737b6a2
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 8 deletions.
10 changes: 3 additions & 7 deletions tests/cypress/integration/issue_1882_polygon_interpolation.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ context('The points of the previous polygon mustn\'t appear while polygon\'s int
})

describe(`Testing issue "${issueId}"`, () => {
it('Create a poligon', () => {
it('Create a polygon', () => {
cy.createPolygon('Track', [
{x: 309, y: 431},
{x: 360, y: 500},
Expand All @@ -51,18 +51,14 @@ context('The points of the previous polygon mustn\'t appear while polygon\'s int
false, true)
})
it('Activate auto bordering mode', () => {
cy.get('.cvat-right-header')
.find('.cvat-header-menu-dropdown')
.trigger('mouseover', {which: 1})
cy.get('.anticon-setting')
.click()
cy.openSettings()
cy.get('.ant-modal-content').within(() => {
cy.contains('Workspace').click()
cy.get('.cvat-workspace-settings-autoborders').within(() => {
cy.get('[type="checkbox"]').check()
})
cy.contains('button', 'Close').click()
})
cy.closeSettings()
})
it('Old points invisible', () => {
cy.get('.cvat_canvas_autoborder_point')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ context('Point coordinates are not duplicated while polygon\'s interpolation.',
})

describe(`Testing issue "${issueId}"`, () => {
it('Create a poligon', () => {
it('Create a polygon', () => {
cy.createPolygon('Track', [
{x: 300, y: 450},
{x: 400, y: 450},
Expand Down
16 changes: 16 additions & 0 deletions tests/cypress/support/commands.js
Original file line number Diff line number Diff line change
Expand Up @@ -151,3 +151,19 @@ Cypress.Commands.add('createPolygon', ( mode,
.trigger('keyup', {key: 'n'})
}
})

Cypress.Commands.add('openSettings', () => {
cy.get('.cvat-right-header')
.find('.cvat-header-menu-dropdown')
.trigger('mouseover', {which: 1})
cy.get('.anticon-setting')
.click()
})

Cypress.Commands.add('closeSettings', () => {
cy.get('.ant-modal-content')
.should('contain', 'Settings')
.within(() => {
cy.contains('button', 'Close').click()
})
})

0 comments on commit 737b6a2

Please sign in to comment.