Added cypress tests for the feature: 'continue frame n' (#4340)

* Added cypress tests for the feature: 'continue frame n'

* Update tests/cypress/integration/actions_tasks/continue_frame_n.js

* Update tests/cypress/integration/actions_tasks/continue_frame_n.js
main
Boris Sekachev 4 years ago committed by GitHub
parent ae50696892
commit f719648bb0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -80,7 +80,7 @@ export default function AnnotationPageComponent(props: Props): JSX.Element {
<span> <span>
Press Press
<Button <Button
className='cvat-continue-job-button' className='cvat-notification-continue-job-button'
type='link' type='link'
onClick={() => { onClick={() => {
changeFrame(parsedFrame); changeFrame(parsedFrame);

@ -496,7 +496,7 @@ button.cvat-predictor-button {
font-weight: bold; font-weight: bold;
} }
.cvat-continue-job-button { .cvat-notification-continue-job-button {
padding: 0; padding: 0;
> span { > span {

@ -0,0 +1,58 @@
// Copyright (C) 2022 Intel Corporation
//
// SPDX-License-Identifier: MIT
/// <reference types="cypress" />
context('Paste labels from one task to another.', { browser: '!firefox' }, () => {
const task = {
name: 'Test "Continue frame N"',
label: 'Test label',
attrName: 'Test attribute',
attrValue: 'Test attribute value',
};
const imagesCount = 3;
const imageFileName = `image_${task.name.replace(' ', '_').toLowerCase()}`;
const width = 100;
const height = 100;
const posX = 10;
const posY = 10;
const color = 'gray';
const archiveName = `${imageFileName}.zip`;
const archivePath = `cypress/fixtures/${archiveName}`;
const imagesFolder = `cypress/fixtures/${imageFileName}`;
const directoryToArchive = imagesFolder;
before(() => {
cy.visit('/');
cy.login();
cy.imageGenerator(imagesFolder, imageFileName, width, height, color, posX, posY, task.name, imagesCount);
cy.createZipArchive(directoryToArchive, archivePath);
cy.goToTaskList();
cy.createAnnotationTask(task.name, task.label, task.attrName, task.attrValue, archiveName);
});
after(() => {
cy.logout();
cy.getAuthKey().then((authKey) => {
cy.deleteTasks(authKey, [task.name, task.nameSecond]);
});
});
describe('Test "Continue frame N"', () => {
it('Open job, go to the 3rd frame, close task, reopen, notification exists.', () => {
cy.openTaskJob(task.name);
cy.checkFrameNum(0);
cy.goCheckFrameNumber(2);
cy.goToTaskList();
cy.openTaskJob(task.name);
cy.get('.cvat-notification-continue-job').should('exist');
});
it('Pressing continue button should navigate to the latest opened frame', () => {
cy.get('.cvat-notification-continue-job-button').click();
cy.checkFrameNum(2);
});
});
});
Loading…
Cancel
Save