Skip to content

Commit

Permalink
Implemented test for issue #3975 PR #4189
Browse files Browse the repository at this point in the history
  • Loading branch information
bsekachev committed Feb 2, 2022
1 parent 61787ce commit dcf3a58
Showing 1 changed file with 18 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,24 @@ context('Some parts of the Redux state (issues) is not reset after changing a ta
it('Create an issue. Check issue 2633.', () => {
cy.openTaskJob(taskName.firstTaskName);
cy.changeWorkspace('Review');
cy.createIssueFromControlButton(createIssueRectangle);
cy.createIssueFromControlButton(createIssueRectangle).then(() => {
const viewportHeight = Cypress.config('viewportHeight');
const viewportWidth = Cypress.config('viewportWidth');
function waitForResize() {
return new Cypress.Promise((resolve) => {
cy.window().then((win) => {
win.addEventListener('resize', () => {
resolve();
}, { once: true });
});
});
}

cy.viewport(viewportHeight + 50, viewportWidth + 50);
cy.wrap(waitForResize()).then(() => {
cy.get('.cvat_canvas_issue_region').should('be.visible');
});
});
cy.createIssueFromControlButton(createIssuePoint); // Issue 2633
});

Expand Down

0 comments on commit dcf3a58

Please sign in to comment.