-
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.
Cypress test. Settings player step. (#2539)
* add test * add steps to jump via shortcuts * improvements test * added open/close settings check Co-authored-by: Dmitriy Oparin <[email protected]>
- Loading branch information
1 parent
6e5f683
commit 240f07c
Showing
2 changed files
with
62 additions
and
2 deletions.
There are no files selected for viewing
59 changes: 59 additions & 0 deletions
59
tests/cypress/integration/actions_tasks_objects/case_29_settings_player_step.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,59 @@ | ||
// Copyright (C) 2020 Intel Corporation | ||
// | ||
// SPDX-License-Identifier: MIT | ||
|
||
/// <reference types="cypress" /> | ||
|
||
import { taskName } from '../../support/const'; | ||
|
||
context('Settings "Player step"', () => { | ||
const caseId = '29'; | ||
const countJumpStep = 3; | ||
let startFrame; | ||
|
||
before(() => { | ||
cy.openTaskJob(taskName); | ||
}); | ||
|
||
describe(`Testing case "${caseId}"`, () => { | ||
it('Change player step ', () => { | ||
cy.openSettings(); | ||
cy.get('.cvat-settings-modal').within(() => { | ||
cy.contains('Player').click(); | ||
cy.get('.cvat-player-settings-step').within(() => { | ||
cy.get('[role="spinbutton"]').clear().type(countJumpStep); | ||
}); | ||
}); | ||
cy.closeSettings(); | ||
|
||
// get and save start frame | ||
cy.get('.cvat-player-frame-selector').within(() => { | ||
cy.get('[role="spinbutton"]') | ||
.should('have.attr', 'aria-valuenow') | ||
.then((valueFrameNow) => { | ||
startFrame = Number(valueFrameNow); | ||
}); | ||
}); | ||
}); | ||
|
||
it('Jump to forward frame via GUI', () => { | ||
cy.get('.cvat-player-forward-button').click(); | ||
cy.checkFrameNum(startFrame + countJumpStep); | ||
}); | ||
|
||
it('Jump to backward frame via GUI', () => { | ||
cy.get('.cvat-player-backward-button').click(); | ||
cy.checkFrameNum(startFrame); | ||
}); | ||
|
||
it('Jump to forward frame via shortcuts', () => { | ||
cy.get('body').type('{v}'); | ||
cy.checkFrameNum(startFrame + countJumpStep); | ||
}); | ||
|
||
it('Jump to backward frame via shortcuts', () => { | ||
cy.get('body').type('{c}'); | ||
cy.checkFrameNum(startFrame); | ||
}); | ||
}); | ||
}); |
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