-
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.
- Loading branch information
Boris Sekachev
authored
Feb 3, 2022
1 parent
58a71a4
commit 29f14a8
Showing
2 changed files
with
80 additions
and
1 deletion.
There are no files selected for viewing
61 changes: 61 additions & 0 deletions
61
tests/cypress/integration/actions_tasks/task_changes_status_after_initial_save.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,61 @@ | ||
// Copyright (C) 2022 Intel Corporation | ||
// | ||
// SPDX-License-Identifier: MIT | ||
|
||
/// <reference types="cypress" /> | ||
|
||
context('Delete a label from a task.', () => { | ||
const labelName = 'car'; | ||
const taskName = 'Test correct state changing on first annotations save'; | ||
const attrName = 'Dummy attribute'; | ||
const textDefaultValue = 'Test'; | ||
const imagesCount = 1; | ||
const imageFileName = `image_${labelName}`; | ||
const width = 800; | ||
const height = 800; | ||
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; | ||
const rectangleData = { | ||
points: 'By 2 Points', | ||
type: 'Shape', | ||
labelName, | ||
firstX: 250, | ||
firstY: 350, | ||
secondX: 350, | ||
secondY: 450, | ||
}; | ||
|
||
before(() => { | ||
cy.visit('auth/login'); | ||
cy.login(); | ||
cy.imageGenerator(imagesFolder, imageFileName, width, height, color, posX, posY, labelName, imagesCount); | ||
cy.createZipArchive(directoryToArchive, archivePath); | ||
cy.createAnnotationTask(taskName, labelName, attrName, textDefaultValue, archiveName); | ||
cy.openTask(taskName); | ||
}); | ||
|
||
after(() => { | ||
cy.goToTaskList(); | ||
cy.deleteTask(taskName); | ||
}); | ||
|
||
describe(`Testing "${labelName}"`, () => { | ||
it('State of the created task should be "new".', () => { | ||
cy.get('td.cvat-job-item-state').invoke('text').should('equal', 'new'); | ||
}); | ||
|
||
it('Create object, save annotation, state should be "in progress"', () => { | ||
cy.openJob(); | ||
cy.createRectangle(rectangleData); | ||
cy.saveJob(); | ||
cy.interactMenu('Open the task'); | ||
cy.reload(); | ||
cy.get('td.cvat-job-item-state').invoke('text').should('equal', 'in progress'); | ||
}); | ||
}); | ||
}); |
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