-
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.
Co-authored-by: Dmitry Kruchinin <[email protected]>
- Loading branch information
1 parent
582e23b
commit 822a3b5
Showing
2 changed files
with
78 additions
and
5 deletions.
There are no files selected for viewing
62 changes: 62 additions & 0 deletions
62
tests/cypress/integration/issue_1944_loading_screen_switch_job.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,62 @@ | ||
/* | ||
* Copyright (C) 2020 Intel Corporation | ||
* | ||
* SPDX-License-Identifier: MIT | ||
*/ | ||
|
||
/// <reference types="cypress" /> | ||
|
||
context('Being able to return to the job list for a task and start a new job without an infinite loading screen.', () => { | ||
|
||
const issueId = '1944' | ||
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 imagesCount = 4 | ||
let images = [] | ||
for ( let i = 1; i <= imagesCount; i++) { | ||
images.push(`image_${issueId}_${i}.png`) | ||
} | ||
const width = 800 | ||
const height = 800 | ||
const posX = 10 | ||
const posY = 10 | ||
const color = 'gray' | ||
const archiveName = `images_issue_${issueId}.zip` | ||
const archivePath = `cypress/fixtures/${archiveName}` | ||
const imagesFolder = `cypress/fixtures/image_issue_${issueId}` | ||
const directoryToArchive = imagesFolder | ||
const multiJobs = true | ||
|
||
before(() => { | ||
cy.visit('auth/login') | ||
cy.login() | ||
for (let img of images) { | ||
cy.imageGenerator(imagesFolder, img, width, height, color, posX, posY, labelName) | ||
} | ||
cy.createZipArchive(directoryToArchive, archivePath) | ||
}) | ||
|
||
describe(`Testing issue "${issueId}"`, () => { | ||
it('Create a multijob task', () => { | ||
cy.createAnnotationTask(taskName, labelName, attrName, textDefaultValue, archiveName, multiJobs) | ||
}) | ||
it('Open the task. Open first job', () => { | ||
cy.openTaskJob(taskName) | ||
cy.get('input[role="spinbutton"]') | ||
.should('have.value', '0') | ||
}) | ||
it('Return to tasks page', () => { | ||
cy.get('[value="tasks"]').click() | ||
cy.url().should('include', '/tasks').and('not.contain', '/jobs') | ||
}) | ||
it('Open the task. Open second job', () => { | ||
cy.openTaskJob(taskName, 1) | ||
cy.get('.cvat-annotation-header') | ||
.should('exist') | ||
cy.get('input[role="spinbutton"]') | ||
.should('have.value', '1') | ||
}) | ||
}) | ||
}) |
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