diff --git a/tests/cypress/e2e/actions_tasks2/case_101_opencv_basic_actions.js b/tests/cypress/e2e/actions_tasks2/case_101_opencv_basic_actions.js index 7c3bcd1b24eb..127f7f241b75 100644 --- a/tests/cypress/e2e/actions_tasks2/case_101_opencv_basic_actions.js +++ b/tests/cypress/e2e/actions_tasks2/case_101_opencv_basic_actions.js @@ -117,9 +117,8 @@ context('OpenCV. Intelligent scissors. Histogram Equalization. TrackerMIL.', () ); }); }); - cy.get('.cvat-appearance-selected-opacity-slider') - .click('left') - .find('[role="slider"]') + cy.get('.cvat-appearance-selected-opacity-slider').click('left'); + cy.get('.cvat-appearance-selected-opacity-slider').find('[role="slider"]') .then((sliderSelectedOpacityLeft) => { const sliderSelectedOpacityValuenow = sliderSelectedOpacityLeft.attr('aria-valuenow'); cy.get('.cvat_canvas_interact_intermediate_shape').should( @@ -128,8 +127,8 @@ context('OpenCV. Intelligent scissors. Histogram Equalization. TrackerMIL.', () sliderSelectedOpacityValuenow / 100, ); }); + cy.get('.cvat-appearance-selected-opacity-slider').click('right'); cy.get('.cvat-appearance-selected-opacity-slider') - .click('right') .find('[role="slider"]') .then((sliderSelectedOpacityRight) => { const sliderSelectedOpacityValuenow = sliderSelectedOpacityRight.attr('aria-valuenow'); @@ -166,9 +165,8 @@ context('OpenCV. Intelligent scissors. Histogram Equalization. TrackerMIL.', () it('Check "Histogram Equalization" feature.', () => { cy.checkPopoverHidden('opencv-control'); cy.interactOpenCVControlButton(); - cy.get('.cvat-opencv-control-popover') - .contains('[role="tab"]', 'Image') - .click() + cy.get('.cvat-opencv-control-popover').contains('[role="tab"]', 'Image').click(); + cy.get('.cvat-opencv-control-popover').contains('[role="tab"]', 'Image') .parents('.ant-tabs-tab') .should('have.class', 'ant-tabs-tab-active'); cy.get('.cvat-opencv-image-tool').click(); @@ -176,7 +174,8 @@ context('OpenCV. Intelligent scissors. Histogram Equalization. TrackerMIL.', () cy.get('.cvat-notification-notice-opencv-processing-error').should('not.exist'); cy.get('.cvat-opencv-image-tool').click(); cy.get('.cvat-opencv-image-tool').should('not.have.class', 'cvat-opencv-image-tool-active'); - cy.get('.cvat-opencv-image-tool').trigger('mouseleave').trigger('mouseout'); + cy.get('.cvat-opencv-image-tool').trigger('mouseleave'); + cy.get('.cvat-opencv-image-tool').trigger('mouseout'); cy.get('.cvat-opencv-control').click(); }); @@ -184,16 +183,17 @@ context('OpenCV. Intelligent scissors. Histogram Equalization. TrackerMIL.', () it.skip('Redraw the shape created with "Intelligent cissors".', () => { cy.get('.cvat-canvas-container').click(); cy.get('.cvat-opencv-control-popover').should('be.hidden'); - cy.get('#cvat_canvas_shape_1') - .trigger('mousemove') - .trigger('mouseover') - .should('have.class', 'cvat_canvas_shape_activated'); - cy.get('body').trigger('keydown', { keyCode: keyCodeN, code: 'KeyN', shiftKey: true }).trigger('keyup'); + cy.get('#cvat_canvas_shape_1').trigger('mousemove'); + cy.get('#cvat_canvas_shape_1').trigger('mouseover'); + cy.get('#cvat_canvas_shape_1').should('have.class', 'cvat_canvas_shape_activated'); + cy.get('body').trigger('keydown', { keyCode: keyCodeN, code: 'KeyN', shiftKey: true }); + cy.get('body').trigger('keyup'); cy.get('.cvat-opencv-control').should('have.attr', 'tabindex'); createOpencvShape.pointsMap.forEach((el) => { cy.get('.cvat-canvas-container').click(el.x + 150, el.y + 50); }); - cy.get('body').trigger('keydown', { keyCode: keyCodeN, code: 'KeyN' }).trigger('keyup'); + cy.get('body').trigger('keydown', { keyCode: keyCodeN, code: 'KeyN' }); + cy.get('body').trigger('keyup'); }); it('Create a shape with "TrackerMIL". Track it for several frames.', () => { diff --git a/tests/cypress/e2e/actions_tasks2/case_111_settings_text_size_position_label_content.js b/tests/cypress/e2e/actions_tasks2/case_111_settings_text_size_position_label_content.js index a8a14a253a97..1168c8e048d2 100644 --- a/tests/cypress/e2e/actions_tasks2/case_111_settings_text_size_position_label_content.js +++ b/tests/cypress/e2e/actions_tasks2/case_111_settings_text_size_position_label_content.js @@ -113,12 +113,10 @@ context('Settings. Text size/position. Text labels content.', () => { cy.openSettings(); // Change the text size to 16 - cy.get('.cvat-workspace-settings-text-size') - .find('input') - .should('have.attr', 'value', '14') - .clear() - .type('10') - .should('have.attr', 'value', '10'); + cy.get('.cvat-workspace-settings-text-size').find('input').should('have.attr', 'value', '14'); + cy.get('.cvat-workspace-settings-text-size').find('input').clear(); + cy.get('.cvat-workspace-settings-text-size').find('input').type('10'); + cy.get('.cvat-workspace-settings-text-size').find('input').should('have.attr', 'value', '10'); cy.closeSettings(); cy.get('.cvat_canvas_text').should('have.attr', 'style', 'font-size: 10px;'); }); diff --git a/tests/cypress/e2e/actions_tasks2/case_21_canvas_color_feature.js b/tests/cypress/e2e/actions_tasks2/case_21_canvas_color_feature.js index bfbf055c4722..48d881e0d40a 100644 --- a/tests/cypress/e2e/actions_tasks2/case_21_canvas_color_feature.js +++ b/tests/cypress/e2e/actions_tasks2/case_21_canvas_color_feature.js @@ -26,18 +26,17 @@ context('Canvas color feature', () => { .find('div[title]') .then((colorPicker) => { for (let i = 0; i < colorPicker.length; i++) { - cy.get(colorPicker[i]) - .click() - .should('have.css', 'background-color') - .then((colorPickerBgValue) => { - cy.get('.cvat-canvas-grid-root') - .should('have.css', 'background-color') - .then((canvasBgColor) => { - // For each color change compare - // the value with the css value background-color of .cvat-canvas-grid-root - expect(colorPickerBgValue).to.be.equal(canvasBgColor); - }); - }); + cy.get(colorPicker[i]).click(); + cy.get(colorPicker[i]).should('have.css', 'background-color'); + cy.get(colorPicker[i]).then((colorPickerBgValue) => { + cy.get('.cvat-canvas-grid-root') + .should('have.css', 'background-color') + .then((canvasBgColor) => { + // For each color change compare + // the value with the css value background-color of .cvat-canvas-grid-root + expect(colorPickerBgValue).to.be.equal(canvasBgColor); + }); + }); } }); }); diff --git a/tests/cypress/e2e/actions_tasks2/case_23_canvas_grid_feature.js b/tests/cypress/e2e/actions_tasks2/case_23_canvas_grid_feature.js index 6c9f3c555da5..844529a288b2 100644 --- a/tests/cypress/e2e/actions_tasks2/case_23_canvas_grid_feature.js +++ b/tests/cypress/e2e/actions_tasks2/case_23_canvas_grid_feature.js @@ -24,7 +24,8 @@ context('Canvas grid feature', () => { }); it('Set "Grid size" to 50.', () => { cy.get('.cvat-image-setups-grid-size-input').within(() => { - cy.get('[role="spinbutton"]').clear().type(settingsGridSize); + cy.get('[role="spinbutton"]').clear(); + cy.get('[role="spinbutton"]').type(settingsGridSize); }); }); it('Set "Grid color" to black.', () => { diff --git a/tests/cypress/e2e/actions_tasks2/case_26_canvas_brightness_contrast_saturation_feature.js b/tests/cypress/e2e/actions_tasks2/case_26_canvas_brightness_contrast_saturation_feature.js index 4159cf7fd97e..91cbc6eb0348 100644 --- a/tests/cypress/e2e/actions_tasks2/case_26_canvas_brightness_contrast_saturation_feature.js +++ b/tests/cypress/e2e/actions_tasks2/case_26_canvas_brightness_contrast_saturation_feature.js @@ -40,9 +40,8 @@ context('Canvas brightness/contrast/saturation feature', () => { cy.wrap($el) .get($el) .within(() => { - cy.get('[role=slider]') - .type(stringAction) - .should('have.attr', 'aria-valuenow', expectedResultInSetting); + cy.get('[role=slider]').type(stringAction); + cy.get('[role=slider]').should('have.attr', 'aria-valuenow', expectedResultInSetting); }); }); }); diff --git a/tests/cypress/e2e/actions_tasks2/case_29_settings_player_step.js b/tests/cypress/e2e/actions_tasks2/case_29_settings_player_step.js index e84e46ea9d11..7d0da6db96ef 100644 --- a/tests/cypress/e2e/actions_tasks2/case_29_settings_player_step.js +++ b/tests/cypress/e2e/actions_tasks2/case_29_settings_player_step.js @@ -21,7 +21,8 @@ context('Settings "Player step"', () => { 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.get('[role="spinbutton"]').clear(); + cy.get('[role="spinbutton"]').type(countJumpStep); }); }); cy.closeSettings(); diff --git a/tests/cypress/e2e/actions_tasks2/case_31_label_constructor_color_name_label.js b/tests/cypress/e2e/actions_tasks2/case_31_label_constructor_color_name_label.js index 46c9c6331044..d48410ddb36d 100644 --- a/tests/cypress/e2e/actions_tasks2/case_31_label_constructor_color_name_label.js +++ b/tests/cypress/e2e/actions_tasks2/case_31_label_constructor_color_name_label.js @@ -110,7 +110,8 @@ context('Label constructor. Color label. Label name editing', () => { }); cy.get('.cvat-change-task-label-color-button').click(); cy.changeColorViaBadge(labelColor.yellowHex); - cy.get('[placeholder="Label name"]').clear().type(colorYellow); // Check PR 2806 + cy.get('[placeholder="Label name"]').clear(); + cy.get('[placeholder="Label name"]').type(colorYellow); // Check PR 2806 cy.contains('button', 'Done').click(); }); @@ -149,7 +150,9 @@ context('Label constructor. Color label. Label name editing', () => { .not('.ant-popover-hidden') .should('be.visible') .within(() => { - cy.contains('hex').prev().clear().type(labelColor.yellowHex); + cy.contains('hex').prev(); + cy.contains('hex').clear(); + cy.contains('hex').type(labelColor.yellowHex); cy.contains('button', 'Cancel').click(); }); cy.get('.cvat-label-color-picker').should('be.hidden'); diff --git a/tests/cypress/e2e/actions_tasks2/case_32_attribute_annotation_mode_zoom_margin_feature.js b/tests/cypress/e2e/actions_tasks2/case_32_attribute_annotation_mode_zoom_margin_feature.js index bc77b67ac147..9b01464b1dec 100644 --- a/tests/cypress/e2e/actions_tasks2/case_32_attribute_annotation_mode_zoom_margin_feature.js +++ b/tests/cypress/e2e/actions_tasks2/case_32_attribute_annotation_mode_zoom_margin_feature.js @@ -24,7 +24,8 @@ context('Attribute annotation mode (AAM) zoom margin feature', () => { cy.get('.cvat-settings-modal').within(() => { cy.contains('Workspace').click(); cy.get('.cvat-workspace-settings-aam-zoom-margin').within(() => { - cy.get('[role="spinbutton"]').clear().type(valueZoomMargin); + cy.get('[role="spinbutton"]').clear(); + cy.get('[role="spinbutton"]').type(valueZoomMargin); }); }); cy.closeSettings(); diff --git a/tests/cypress/e2e/actions_tasks2/case_42_change_label_name_via_label_constructor.js b/tests/cypress/e2e/actions_tasks2/case_42_change_label_name_via_label_constructor.js index c10b14c4a664..2c51f4ca0199 100644 --- a/tests/cypress/e2e/actions_tasks2/case_42_change_label_name_via_label_constructor.js +++ b/tests/cypress/e2e/actions_tasks2/case_42_change_label_name_via_label_constructor.js @@ -34,14 +34,16 @@ context('Changing a label name via label constructor.', () => { it('Change label name to any other correct value. Press "Cancel". Label name is not changed.', () => { cy.get('.cvat-constructor-viewer-item').find('[aria-label="edit"]').click(); - cy.get('[placeholder="Label name"]').clear().type(secondLabelName); + cy.get('[placeholder="Label name"]').clear(); + cy.get('[placeholder="Label name"]').type(secondLabelName); cy.contains('[type="button"]', 'Cancel').click(); cy.get('.cvat-constructor-viewer-item').should('exist').and('have.text', firstLabelName); }); it('Change label name to any other correct value. Press "Done". Label name changed.', () => { cy.get('.cvat-constructor-viewer-item').find('[aria-label="edit"]').click(); - cy.get('[placeholder="Label name"]').clear().type(secondLabelName); + cy.get('[placeholder="Label name"]').clear(); + cy.get('[placeholder="Label name"]').type(secondLabelName); cy.contains('[type="submit"]', 'Done').click(); cy.get('.cvat-constructor-viewer-item') .should('exist') diff --git a/tests/cypress/e2e/actions_tasks2/case_97_export_import_task.js b/tests/cypress/e2e/actions_tasks2/case_97_export_import_task.js index d855f70a6903..75e963432a28 100644 --- a/tests/cypress/e2e/actions_tasks2/case_97_export_import_task.js +++ b/tests/cypress/e2e/actions_tasks2/case_97_export_import_task.js @@ -53,15 +53,12 @@ context('Export, import an annotation task.', { browser: '!firefox' }, () => { cy.createRectangle(createRectangleShape2Points).then(() => { Cypress.config('scrollBehavior', false); }); - cy.get('#cvat_canvas_shape_1') - .trigger('mousemove') - .trigger('mouseover') - .should('have.class', 'cvat_canvas_shape_activated'); - cy.get('.svg_select_points_rot') - .should('be.visible') - .and('have.length', 1) - .trigger('mousemove') - .trigger('mouseover'); + cy.get('#cvat_canvas_shape_1').trigger('mousemove'); + cy.get('#cvat_canvas_shape_1').trigger('mouseover'); + cy.get('#cvat_canvas_shape_1').should('have.class', 'cvat_canvas_shape_activated'); + cy.get('.svg_select_points_rot').should('be.visible').and('have.length', 1); + cy.get('.svg_select_points_rot').trigger('mousemove'); + cy.get('.svg_select_points_rot').trigger('mouseover'); cy.get('.svg_select_points_rot').trigger('mousedown', { button: 0 }); cy.get('.cvat-canvas-container').trigger('mousemove', 345, 150); cy.get('.cvat-canvas-container').trigger('mouseup'); diff --git a/tests/cypress/e2e/actions_tasks2/fit_image_different_res.js b/tests/cypress/e2e/actions_tasks2/fit_image_different_res.js index 32c556dd1d40..684551deab92 100644 --- a/tests/cypress/e2e/actions_tasks2/fit_image_different_res.js +++ b/tests/cypress/e2e/actions_tasks2/fit_image_different_res.js @@ -62,11 +62,13 @@ context('Correct behaviour of fit when navigating between frames with different cy.openSettings(); if (resetZoom) { cy.get('.cvat-player-settings-reset-zoom-checkbox').within(() => { - cy.get('[type="checkbox"]').check().should('be.checked'); + cy.get('[type="checkbox"]').check(); + cy.get('[type="checkbox"]').should('be.checked'); }); } else { cy.get('.cvat-player-settings-reset-zoom-checkbox').within(() => { - cy.get('[type="checkbox"]').uncheck().should('not.be.checked'); + cy.get('[type="checkbox"]').uncheck(); + cy.get('[type="checkbox"]').should('not.be.checked'); }); } cy.closeSettings(); diff --git a/tests/cypress/e2e/actions_tasks3/case_105_cloud_storage.js b/tests/cypress/e2e/actions_tasks3/case_105_cloud_storage.js index 466ab5bff2ec..90a63bf404dc 100644 --- a/tests/cypress/e2e/actions_tasks3/case_105_cloud_storage.js +++ b/tests/cypress/e2e/actions_tasks3/case_105_cloud_storage.js @@ -41,25 +41,21 @@ context('Cloud storage.', () => { }); // Check add/remove manifest file cy.get('.cvat-add-manifest-button').should('be.visible').click(); - cy.get('[placeholder="manifest.jsonl"]') - .should('exist') - .should('have.attr', 'value', '') - .type(dummyData.manifest) - .should('have.attr', 'value', dummyData.manifest); + cy.get('[placeholder="manifest.jsonl"]').should('exist').should('have.attr', 'value', ''); + cy.get('[placeholder="manifest.jsonl"]').type(dummyData.manifest); + cy.get('[placeholder="manifest.jsonl"]').should('have.attr', 'value', dummyData.manifest); cy.get('[data-icon="delete"]').should('be.visible').click(); cy.get('[placeholder="manifest.jsonl"]').should('not.exist'); }); it('Check "AWS S3" provider fields.', () => { - cy.get('#display_name') - .type(dummyData.display_name) - .should('have.attr', 'value', dummyData.display_name); + cy.get('#display_name').type(dummyData.display_name); + cy.get('#display_name').should('have.attr', 'value', dummyData.display_name); cy.get('#provider_type').click(); cy.contains('.cvat-cloud-storage-select-provider', 'AWS').click(); - cy.get('#resource') - .should('exist') - .type(dummyData.resource) - .should('have.attr', 'value', dummyData.resource); + cy.get('#resource').should('exist'); + cy.get('#resource').type(dummyData.resource); + cy.get('#resource').should('have.attr', 'value', dummyData.resource); // Check fields with "Key id and secret access key pair" cy.get('#credentials_type').should('exist').click(); cy.get('.ant-select-dropdown') @@ -133,8 +129,12 @@ context('Cloud storage.', () => { .should('be.visible') .click(); cy.get('.cvat-cloud-storage-form-item-key-file').should('not.exist'); - cy.get('#prefix').should('exist').type(dummyData.prefix).should('have.value', dummyData.prefix); - cy.get('#project_id').should('exist').type(dummyData.projectID).should('have.value', dummyData.projectID); + cy.get('#prefix').should('exist'); + cy.get('#prefix').type(dummyData.prefix); + cy.get('#prefix').should('have.value', dummyData.prefix); + cy.get('#project_id').should('exist'); + cy.get('#project_id').type(dummyData.projectID); + cy.get('#project_id').should('have.value', dummyData.projectID); cy.get('#location').should('exist').click(); cy.get('.ant-select-dropdown') .not('.ant-select-dropdown-hidden') diff --git a/tests/cypress/e2e/actions_tasks3/case_107_connected_file_share.js b/tests/cypress/e2e/actions_tasks3/case_107_connected_file_share.js index e910e9bd39d0..09fb190ef970 100644 --- a/tests/cypress/e2e/actions_tasks3/case_107_connected_file_share.js +++ b/tests/cypress/e2e/actions_tasks3/case_107_connected_file_share.js @@ -41,7 +41,8 @@ context('Connected file share.', () => { for (let frame = 0; frame < imageFiles.images.length; frame++) { cy.get(playerFilenameWrapper).should('have.text', `images/${imageFiles.images[frame]}`); cy.checkFrameNum(frame); - cy.get('.cvat-player-next-button').click().trigger('mouseout'); + cy.get('.cvat-player-next-button').click(); + cy.get('.cvat-player-next-button').trigger('mouseout'); } }); }); diff --git a/tests/cypress/e2e/actions_tasks3/case_109_dummy_cloud_storage.js b/tests/cypress/e2e/actions_tasks3/case_109_dummy_cloud_storage.js index 83593328dac5..2f5ec7e5f354 100644 --- a/tests/cypress/e2e/actions_tasks3/case_109_dummy_cloud_storage.js +++ b/tests/cypress/e2e/actions_tasks3/case_109_dummy_cloud_storage.js @@ -72,7 +72,8 @@ context('Dummy cloud storages.', { browser: '!firefox' }, () => { } function testGoToCSUpdatePage() { - cy.get('.cvat-cloud-storage-item-menu-button').trigger('mousemove').trigger('mouseover'); + cy.get('.cvat-cloud-storage-item-menu-button').trigger('mousemove'); + cy.get('.cvat-cloud-storage-item-menu-button').trigger('mouseover'); cy.get('.ant-dropdown') .not('.ant-dropdown-hidden') .within(() => { diff --git a/tests/cypress/e2e/actions_tasks3/case_118_multi_tasks.js b/tests/cypress/e2e/actions_tasks3/case_118_multi_tasks.js index 7c8b00f6deb0..2d6e2f202486 100644 --- a/tests/cypress/e2e/actions_tasks3/case_118_multi_tasks.js +++ b/tests/cypress/e2e/actions_tasks3/case_118_multi_tasks.js @@ -84,7 +84,8 @@ context('Create mutli tasks.', () => { 'https://raw.githubusercontent.com/cvat-ai/cvat/v1.2.0/cvat/apps/documentation/static/documentation/images/cvatt.jpg'; cy.contains('[role="tab"]', 'Remote sources').click(); - cy.get('.cvat-file-selector-remote').clear().type(imageUrls); + cy.get('.cvat-file-selector-remote').clear(); + cy.get('.cvat-file-selector-remote').type(imageUrls); cy.get('.cvat-create-task-content-alert').should('be.visible'); cy.get('.cvat-create-task-content-footer [type="submit"]').should('be.disabled'); @@ -116,7 +117,8 @@ context('Create mutli tasks.', () => { videoFiles.videos.forEach((video) => { const URL = `${baseUrl}/${revision}/${folder}/videos/${video}`; - cy.get('.cvat-file-selector-remote').type(URL).type('{enter}'); + cy.get('.cvat-file-selector-remote').type(URL); + cy.get('.cvat-file-selector-remote').type('{enter}'); }); submitTask(); diff --git a/tests/cypress/e2e/actions_tasks3/case_19_all_image_rotate_features.js b/tests/cypress/e2e/actions_tasks3/case_19_all_image_rotate_features.js index 34222292c265..78434c0cbdbd 100644 --- a/tests/cypress/e2e/actions_tasks3/case_19_all_image_rotate_features.js +++ b/tests/cypress/e2e/actions_tasks3/case_19_all_image_rotate_features.js @@ -14,7 +14,8 @@ context('Rotate all images feature.', () => { } function imageRotate(direction = 'anticlockwise', deg) { - cy.get('.cvat-rotate-canvas-control').trigger('mouseover').should('be.visible'); + cy.get('.cvat-rotate-canvas-control').trigger('mouseover'); + cy.get('.cvat-rotate-canvas-control').should('be.visible'); if (direction === 'clockwise') { cy.get('.cvat-rotate-canvas-controls-right').should('be.visible').click(); } else { diff --git a/tests/cypress/e2e/actions_tasks3/case_46_create_task_with_files_from_remote_sources.js b/tests/cypress/e2e/actions_tasks3/case_46_create_task_with_files_from_remote_sources.js index 85b49f09e3ff..64924778dfbf 100644 --- a/tests/cypress/e2e/actions_tasks3/case_46_create_task_with_files_from_remote_sources.js +++ b/tests/cypress/e2e/actions_tasks3/case_46_create_task_with_files_from_remote_sources.js @@ -37,7 +37,8 @@ context('Create a task with files from remote sources.', () => { }); it('Set correct URL to remote file. The task is created.', () => { - cy.get('.cvat-file-selector-remote').clear().type(correctUrl); + cy.get('.cvat-file-selector-remote').clear(); + cy.get('.cvat-file-selector-remote').type(correctUrl); cy.contains('button', 'Submit & Continue').click(); cy.get('.cvat-notification-create-task-success').should('exist'); cy.goToTaskList(); diff --git a/tests/cypress/e2e/actions_tasks3/case_50_settings_player_speed.js b/tests/cypress/e2e/actions_tasks3/case_50_settings_player_speed.js index 1f0e2ce7d3a5..4591ea8c1909 100644 --- a/tests/cypress/e2e/actions_tasks3/case_50_settings_player_speed.js +++ b/tests/cypress/e2e/actions_tasks3/case_50_settings_player_speed.js @@ -18,7 +18,8 @@ context('Settings. "Player speed" option.', () => { function changePlayerSpeed(speed) { cy.openSettings(); cy.get('.cvat-player-settings-speed').within(() => { - cy.get('.cvat-player-settings-speed-select').click().wait(300); // Wait for the dropdown menu transition. + cy.get('.cvat-player-settings-speed-select').click(); + cy.wait(300); // Wait for the dropdown menu transition. }); cy.get(`.cvat-player-settings-speed-${speed}`).click(); cy.get('.cvat-player-settings-speed-select').should( diff --git a/tests/cypress/e2e/actions_tasks3/case_74_drag_canvas.js b/tests/cypress/e2e/actions_tasks3/case_74_drag_canvas.js index 92e2706baa3c..98f3cdf95b73 100644 --- a/tests/cypress/e2e/actions_tasks3/case_74_drag_canvas.js +++ b/tests/cypress/e2e/actions_tasks3/case_74_drag_canvas.js @@ -24,7 +24,8 @@ context('Drag canvas.', () => { leftBefore = +$style.split(';').find((el) => el.includes('left')).split(':')[1].replace('px', '').trim(); }); cy.get('.cvat-move-control').click(); // Without this action, the function is not covered - cy.get('.cvat-canvas-container').trigger('mousedown', { button: 0 }).trigger('mousemove', 500, 500); + cy.get('.cvat-canvas-container').trigger('mousedown', { button: 0 }); + cy.get('.cvat-canvas-container').trigger('mousemove', 500, 500); }); it('Top and left style perameters is changed.', () => { diff --git a/tests/cypress/e2e/actions_tasks3/case_7_image_scale_roi.js b/tests/cypress/e2e/actions_tasks3/case_7_image_scale_roi.js index ec9ff9fd7462..56b80efa1681 100644 --- a/tests/cypress/e2e/actions_tasks3/case_7_image_scale_roi.js +++ b/tests/cypress/e2e/actions_tasks3/case_7_image_scale_roi.js @@ -23,10 +23,9 @@ context('Check if image was scaled to ROI', () => { scaleBefore = Number($scale.match(/scale\((\d\.\d+)\)/m)[1]); }); cy.get('.cvat-resize-control').click(); - cy.get('.cvat-canvas-container') - .trigger('mousedown', 309, 431, { which: 1 }) - .trigger('mousemove', 616, 671) - .trigger('mouseup', 616, 671); + cy.get('.cvat-canvas-container').trigger('mousedown', 309, 431, { which: 1 }); + cy.get('.cvat-canvas-container').trigger('mousemove', 616, 671); + cy.get('.cvat-canvas-container').trigger('mouseup', 616, 671); }); it('Image scaled to ROI', () => { cy.get('#cvat_canvas_background') diff --git a/tests/cypress/e2e/actions_users/issue_1810_login_logout.js b/tests/cypress/e2e/actions_users/issue_1810_login_logout.js index 5c0e30b20f52..072946f1b844 100644 --- a/tests/cypress/e2e/actions_users/issue_1810_login_logout.js +++ b/tests/cypress/e2e/actions_users/issue_1810_login_logout.js @@ -12,8 +12,10 @@ context('When clicking on the Logout button, get the user session closed.', () = let taskId; function login(credential, password) { - cy.get('#credential').clear().type(credential); - cy.get('#password').clear().type(password); + cy.get('#credential').clear(); + cy.get('#credential').type(credential); + cy.get('#password').clear(); + cy.get('#password').type(password); cy.get('[type="submit"]').click(); } diff --git a/tests/cypress/e2e/actions_users/issue_2440_value_must_be_a_user_instance.js b/tests/cypress/e2e/actions_users/issue_2440_value_must_be_a_user_instance.js index 996bdeb1e271..3a8ae5cbc352 100644 --- a/tests/cypress/e2e/actions_users/issue_2440_value_must_be_a_user_instance.js +++ b/tests/cypress/e2e/actions_users/issue_2440_value_must_be_a_user_instance.js @@ -40,7 +40,9 @@ context('Value must be a user instance.', () => { cy.get('.cvat-spinner', { timeout: 500 }).should('not.exist'); // Remove the user's assignment for next tests. cy.get('.cvat-task-details-user-block').within(() => { - cy.get('input').click().clear().type('{Enter}'); + cy.get('input').click(); + cy.get('input').clear(); + cy.get('input').type('{Enter}'); }); }); }); diff --git a/tests/cypress/e2e/actions_users/registration_involved/issue_1599_pl_user_registration.js b/tests/cypress/e2e/actions_users/registration_involved/issue_1599_pl_user_registration.js index 015934e8015c..7406fbb58c6f 100644 --- a/tests/cypress/e2e/actions_users/registration_involved/issue_1599_pl_user_registration.js +++ b/tests/cypress/e2e/actions_users/registration_involved/issue_1599_pl_user_registration.js @@ -25,11 +25,13 @@ context('Issue 1599 (Polish alphabet).', () => { describe('User registration using the Polish alphabet.', () => { it('Filling in the placeholder "First name"', () => { - cy.get('#firstName').type(firstName).should('not.have.class', 'has-error'); + cy.get('#firstName').type(firstName); + cy.get('#firstName').should('not.have.class', 'has-error'); }); it('Filling in the placeholder "Last name"', () => { - cy.get('#lastName').type(lastName).should('not.have.class', 'has-error'); + cy.get('#lastName').type(lastName); + cy.get('#lastName').should('not.have.class', 'has-error'); }); it('Filling in the placeholder "Username"', () => { diff --git a/tests/cypress/e2e/canvas3d_functionality/case_83_canvas3d_functionality_cuboid_grouping.js b/tests/cypress/e2e/canvas3d_functionality/case_83_canvas3d_functionality_cuboid_grouping.js index 8f5de734262f..d73a31f9fcd4 100644 --- a/tests/cypress/e2e/canvas3d_functionality/case_83_canvas3d_functionality_cuboid_grouping.js +++ b/tests/cypress/e2e/canvas3d_functionality/case_83_canvas3d_functionality_cuboid_grouping.js @@ -68,8 +68,10 @@ context('Canvas 3D functionality. Grouping.', () => { describe(`Testing case "${caseId}"`, () => { it('Grouping two cuboids.', () => { cy.get('.cvat-group-control').click(); - cy.get('.cvat-canvas3d-perspective').trigger('mousemove', 400, 280).click(400, 280); - cy.get('.cvat-canvas3d-perspective').trigger('mousemove', 500, 280).click(500, 280); + cy.get('.cvat-canvas3d-perspective').trigger('mousemove', 400, 280); + cy.get('.cvat-canvas3d-perspective').click(400, 280); + cy.get('.cvat-canvas3d-perspective').trigger('mousemove', 500, 280); + cy.get('.cvat-canvas3d-perspective').click(500, 280); cy.get('.cvat-group-control').click(); cy.changeAppearance('Group'); cy.get('#cvat-objects-sidebar-state-item-1').invoke('attr', 'style').then((bgColorItem1) => { @@ -109,8 +111,10 @@ context('Canvas 3D functionality. Grouping.', () => { it('Reset group.', () => { cy.customScreenshot('.cvat-canvas3d-perspective', 'canvas3d_perspective_before_reset_group'); cy.get('.cvat-group-control').click(); - cy.get('.cvat-canvas3d-perspective').trigger('mousemove', 400, 280).click(400, 280); - cy.get('.cvat-canvas3d-perspective').trigger('mousemove', 500, 280).click(500, 280); + cy.get('.cvat-canvas3d-perspective').trigger('mousemove', 400, 280); + cy.get('.cvat-canvas3d-perspective').click(400, 280); + cy.get('.cvat-canvas3d-perspective').trigger('mousemove', 500, 280); + cy.get('.cvat-canvas3d-perspective').click(500, 280); cy.get('body').type('{Shift}g'); cy.get('#cvat-objects-sidebar-state-item-2').invoke('attr', 'style').then((bgColorItem2) => { expect(bgColorItem).to.be.equal(bgColorItem2); diff --git a/tests/cypress/e2e/canvas3d_functionality/case_84_canvas3d_functionality_cuboid_redraw.js b/tests/cypress/e2e/canvas3d_functionality/case_84_canvas3d_functionality_cuboid_redraw.js index eed1ef9220c9..e208694990b1 100644 --- a/tests/cypress/e2e/canvas3d_functionality/case_84_canvas3d_functionality_cuboid_redraw.js +++ b/tests/cypress/e2e/canvas3d_functionality/case_84_canvas3d_functionality_cuboid_redraw.js @@ -25,7 +25,8 @@ context('Canvas 3D functionality. Redraw.', () => { it('Redraw a cuboid.', () => { cy.get('.cvat-canvas3d-perspective').trigger('mousemove'); cy.get('body').type('{Shift}n'); - cy.get('.cvat-canvas3d-perspective').trigger('mousemove', 450, 250).dblclick(450, 250); + cy.get('.cvat-canvas3d-perspective').trigger('mousemove', 450, 250); + cy.get('.cvat-canvas3d-perspective').dblclick(450, 250); cy.get('.cvat-objects-sidebar-state-item').then((sidebarStateItems) => { expect(sidebarStateItems.length).to.be.equal(1); }); diff --git a/tests/cypress/e2e/canvas3d_functionality/case_85_canvas3d_functionality_cuboid_cancel_drawing.js b/tests/cypress/e2e/canvas3d_functionality/case_85_canvas3d_functionality_cuboid_cancel_drawing.js index f9a6f45f7c9d..088a9ce8e295 100644 --- a/tests/cypress/e2e/canvas3d_functionality/case_85_canvas3d_functionality_cuboid_cancel_drawing.js +++ b/tests/cypress/e2e/canvas3d_functionality/case_85_canvas3d_functionality_cuboid_cancel_drawing.js @@ -43,7 +43,8 @@ context('Canvas 3D functionality. Cancel drawing.', () => { it('Repeat draw.', () => { cy.get('body').type('n'); cy.get('.cvat-canvas3d-perspective').trigger('mousemove'); - cy.get('.cvat-canvas3d-perspective').trigger('mousemove', 450, 250).dblclick(450, 250); + cy.get('.cvat-canvas3d-perspective').trigger('mousemove', 450, 250); + cy.get('.cvat-canvas3d-perspective').dblclick(450, 250); cy.get('.cvat-objects-sidebar-state-item').then((sidebarStateItems) => { expect(sidebarStateItems.length).to.be.equal(1); }); diff --git a/tests/cypress/e2e/canvas3d_functionality/case_87_canvas3d_functionality_cuboid_delete.js b/tests/cypress/e2e/canvas3d_functionality/case_87_canvas3d_functionality_cuboid_delete.js index 5097e8bf64af..4929f63b6383 100644 --- a/tests/cypress/e2e/canvas3d_functionality/case_87_canvas3d_functionality_cuboid_delete.js +++ b/tests/cypress/e2e/canvas3d_functionality/case_87_canvas3d_functionality_cuboid_delete.js @@ -23,7 +23,8 @@ context('Canvas 3D functionality. Delete a cuboid.', () => { describe(`Testing case "${caseId}"`, () => { it('Delete a cuboid.', () => { - cy.get('.cvat-canvas3d-perspective').trigger('mousemove', 300, 200).click(300, 200); // Deactivate the cuboid + cy.get('.cvat-canvas3d-perspective').trigger('mousemove', 300, 200); + cy.get('.cvat-canvas3d-perspective').click(300, 200); // Deactivate the cuboid cy.get('#cvat-objects-sidebar-state-item-1').should('not.have.class', 'cvat-objects-sidebar-state-active-item'); cy.get('.cvat-canvas3d-perspective').trigger('mousemove'); cy.get('#cvat-objects-sidebar-state-item-1').should('have.class', 'cvat-objects-sidebar-state-active-item'); diff --git a/tests/cypress/e2e/canvas3d_functionality/case_91_canvas3d_functionality_dump_upload_annotation_point_cloud_format.js b/tests/cypress/e2e/canvas3d_functionality/case_91_canvas3d_functionality_dump_upload_annotation_point_cloud_format.js index e765d89f2d8d..aef24f68e78a 100644 --- a/tests/cypress/e2e/canvas3d_functionality/case_91_canvas3d_functionality_dump_upload_annotation_point_cloud_format.js +++ b/tests/cypress/e2e/canvas3d_functionality/case_91_canvas3d_functionality_dump_upload_annotation_point_cloud_format.js @@ -92,7 +92,8 @@ context('Canvas 3D functionality. Dump/upload annotation. "Point Cloud" format', cy.verifyNotification(); cy.get('#cvat-objects-sidebar-state-item-1').should('exist'); cy.removeAnnotations(); - cy.get('button').contains('Save').click().trigger('mouseout'); + cy.get('button').contains('Save').click(); + cy.get('button').contains('Save').trigger('mouseout'); cy.get('#cvat-objects-sidebar-state-item-1').should('not.exist'); }); @@ -113,7 +114,8 @@ context('Canvas 3D functionality. Dump/upload annotation. "Point Cloud" format', cy.openTaskJob(taskName); cy.get('#cvat-objects-sidebar-state-item-1').should('exist'); cy.removeAnnotations(); - cy.get('button').contains('Save').click().trigger('mouseout'); + cy.get('button').contains('Save').click(); + cy.get('button').contains('Save').trigger('mouseout'); }); }); }); diff --git a/tests/cypress/e2e/canvas3d_functionality/case_92_canvas3d_functionality_dump_upload_annotation_velodyne_points_format.js b/tests/cypress/e2e/canvas3d_functionality/case_92_canvas3d_functionality_dump_upload_annotation_velodyne_points_format.js index 9aa4c62206b5..f225809ef9b7 100644 --- a/tests/cypress/e2e/canvas3d_functionality/case_92_canvas3d_functionality_dump_upload_annotation_velodyne_points_format.js +++ b/tests/cypress/e2e/canvas3d_functionality/case_92_canvas3d_functionality_dump_upload_annotation_velodyne_points_format.js @@ -93,7 +93,8 @@ context('Canvas 3D functionality. Dump/upload annotation. "Velodyne Points" form cy.closeNotification('.ant-notification-notice-info'); cy.get('#cvat-objects-sidebar-state-item-1').should('exist'); cy.removeAnnotations(); - cy.get('button').contains('Save').click().trigger('mouseout'); + cy.get('button').contains('Save').click(); + cy.get('button').contains('Save').trigger('mouseout'); }); it('Upload annotation to task.', () => { @@ -113,7 +114,8 @@ context('Canvas 3D functionality. Dump/upload annotation. "Velodyne Points" form cy.openTaskJob(taskName); cy.get('#cvat-objects-sidebar-state-item-1').should('exist'); cy.removeAnnotations(); - cy.get('button').contains('Save').click().trigger('mouseout'); + cy.get('button').contains('Save').click(); + cy.get('button').contains('Save').trigger('mouseout'); }); }); }); diff --git a/tests/cypress/e2e/canvas3d_functionality_2/case_63_canvas3d_functionality_control_button_mouse_interaction.js b/tests/cypress/e2e/canvas3d_functionality_2/case_63_canvas3d_functionality_control_button_mouse_interaction.js index 2dded6e47f20..6fa0166bf136 100644 --- a/tests/cypress/e2e/canvas3d_functionality_2/case_63_canvas3d_functionality_control_button_mouse_interaction.js +++ b/tests/cypress/e2e/canvas3d_functionality_2/case_63_canvas3d_functionality_control_button_mouse_interaction.js @@ -21,11 +21,11 @@ context('Canvas 3D functionality. Control button. Mouse interaction.', () => { cy.customScreenshot('.cvat-canvas3d-perspective', screenshotNameBefore); cy.wait(300); if (arrow) { - cy.get(button).trigger('mouseover').click(); + cy.get(button).trigger('mouseover'); + cy.get(button).click(); } else { - cy.contains('button', new RegExp(`^${button}$`)) - .trigger('mouseover') - .click(); + cy.contains('button', new RegExp(`^${button}$`)).trigger('mouseover'); + cy.contains('button', new RegExp(`^${button}$`)).click(); } cy.contains(expectedTooltipText).should('exist').and('be.visible'); // Check tooltip if (arrow) { diff --git a/tests/cypress/e2e/canvas3d_functionality_2/case_64_canvas3d_functionality_cuboid.js b/tests/cypress/e2e/canvas3d_functionality_2/case_64_canvas3d_functionality_cuboid.js index d7d0fd667e4c..bbfc18b02854 100644 --- a/tests/cypress/e2e/canvas3d_functionality_2/case_64_canvas3d_functionality_cuboid.js +++ b/tests/cypress/e2e/canvas3d_functionality_2/case_64_canvas3d_functionality_cuboid.js @@ -29,7 +29,8 @@ context('Canvas 3D functionality. Add cuboid.', () => { describe(`Testing case "${caseId}"`, () => { it('Add cuboid.', () => { cy.create3DCuboid(cuboidCreationParams); - cy.get('#cvat-objects-sidebar-state-item-1').trigger('mouseover').should('have.class', 'cvat-objects-sidebar-state-active-item'); + cy.get('#cvat-objects-sidebar-state-item-1').trigger('mouseover'); + cy.get('#cvat-objects-sidebar-state-item-1').should('have.class', 'cvat-objects-sidebar-state-active-item'); cy.customScreenshot('.cvat-canvas3d-perspective', 'canvas3d_perspective_after_add_cuboid'); // The cuboid displayed cy.compareImagesAndCheckResult( `${screenshotsPath}/canvas3d_perspective_before_all.png`, @@ -51,7 +52,8 @@ context('Canvas 3D functionality. Add cuboid.', () => { }); it('Cuboid interaction by mouse.', () => { - cy.get('.cvat-canvas3d-perspective').trigger('mousemove', 300, 200).click(300, 200); // Deactivate the cuboid + cy.get('.cvat-canvas3d-perspective').trigger('mousemove', 300, 200); + cy.get('.cvat-canvas3d-perspective').click(300, 200); // Deactivate the cuboid cy.customScreenshot('.cvat-canvas3d-perspective', 'canvas3d_perspective_deactivate_cuboid'); ['topview', 'sideview', 'frontview'].forEach((view) => { cy.customScreenshot(`.cvat-canvas3d-${view}`, `canvas3d_${view}_deactivate_cuboid`); diff --git a/tests/cypress/e2e/canvas3d_functionality_2/case_78_canvas3d_functionality_cuboid_label.js b/tests/cypress/e2e/canvas3d_functionality_2/case_78_canvas3d_functionality_cuboid_label.js index f5a00fc404b9..d404fe8080be 100644 --- a/tests/cypress/e2e/canvas3d_functionality_2/case_78_canvas3d_functionality_cuboid_label.js +++ b/tests/cypress/e2e/canvas3d_functionality_2/case_78_canvas3d_functionality_cuboid_label.js @@ -34,10 +34,9 @@ context('Canvas 3D functionality. Interaction with cuboid via sidebar.', () => { describe(`Testing case "${caseId}"`, () => { it('Activate a cuboid on sidear.', () => { - cy.get('#cvat-objects-sidebar-state-item-1') - .trigger('mouseover') - .should('have.class', 'cvat-objects-sidebar-state-active-item') - .wait(1000); // Wating for cuboid activation + cy.get('#cvat-objects-sidebar-state-item-1').trigger('mouseover'); + cy.get('#cvat-objects-sidebar-state-item-1').should('have.class', 'cvat-objects-sidebar-state-active-item'); + cy.wait(1000); // Wating for cuboid activation cy.customScreenshot('.cvat-canvas3d-perspective', 'canvas3d_perspective_after_activating_cuboid'); cy.compareImagesAndCheckResult( `${screenshotsPath}/canvas3d_perspective_before_all.png`, diff --git a/tests/cypress/e2e/canvas3d_functionality_2/case_80_canvas3d_functionality_cuboid_make_copy.js b/tests/cypress/e2e/canvas3d_functionality_2/case_80_canvas3d_functionality_cuboid_make_copy.js index d2ea214095a1..13f292328548 100644 --- a/tests/cypress/e2e/canvas3d_functionality_2/case_80_canvas3d_functionality_cuboid_make_copy.js +++ b/tests/cypress/e2e/canvas3d_functionality_2/case_80_canvas3d_functionality_cuboid_make_copy.js @@ -29,11 +29,14 @@ context('Canvas 3D functionality. Make a copy.', () => { it('Change a label and make a copy via sidebar.', () => { cy.get('#cvat-objects-sidebar-state-item-1') .find('.cvat-objects-sidebar-state-item-label-selector') - .type(`${secondLabel}{Enter}`) + .type(`${secondLabel}{Enter}`); + cy.get('#cvat-objects-sidebar-state-item-1') + .find('.cvat-objects-sidebar-state-item-label-selector') .trigger('mouseout'); cy.get('#cvat-objects-sidebar-state-item-1').find('[aria-label="more"]').click(); cy.get('.ant-dropdown-menu').not('.ant-dropdown-menu-hidden').find('[aria-label="copy"]').click(); - cy.get('.cvat-canvas3d-perspective').trigger('mousemove', 480, 270).dblclick(480, 270); + cy.get('.cvat-canvas3d-perspective').trigger('mousemove', 480, 270); + cy.get('.cvat-canvas3d-perspective').dblclick(480, 270); cy.get('#cvat-objects-sidebar-state-item-1') .invoke('attr', 'style') .then((bgColor) => { @@ -42,9 +45,12 @@ context('Canvas 3D functionality. Make a copy.', () => { }); it('Make a copy via hot keys.', () => { - cy.get('.cvat-canvas3d-perspective').trigger('mousemove', 480, 270).trigger('mousemove', 480, 270); - cy.get('body').type('{Ctrl}c').type('{Ctrl}v'); - cy.get('.cvat-canvas3d-perspective').trigger('mousemove', 430, 220).dblclick(430, 220); + cy.get('.cvat-canvas3d-perspective').trigger('mousemove', 480, 270); + cy.get('.cvat-canvas3d-perspective').trigger('mousemove', 480, 270); + cy.get('body').type('{Ctrl}c'); + cy.get('body').type('{Ctrl}v'); + cy.get('.cvat-canvas3d-perspective').trigger('mousemove', 430, 220); + cy.get('.cvat-canvas3d-perspective').dblclick(430, 220); cy.get('.cvat-objects-sidebar-state-item').then((sideBarItems) => { expect(sideBarItems.length).to.be.equal(3); }); @@ -56,12 +62,15 @@ context('Canvas 3D functionality. Make a copy.', () => { }); it('Copy a cuboid to an another frame.', () => { - cy.get('.cvat-canvas3d-perspective').trigger('mousemove', 480, 270).trigger('mousemove', 480, 270); + cy.get('.cvat-canvas3d-perspective').trigger('mousemove', 480, 270); + cy.get('.cvat-canvas3d-perspective').trigger('mousemove', 480, 270); cy.get('#cvat-objects-sidebar-state-item-2').should('have.class', 'cvat-objects-sidebar-state-active-item'); cy.get('body').type('{Ctrl}c'); - cy.get('.cvat-player-next-button').click().wait(1000); + cy.get('.cvat-player-next-button').click(); + cy.wait(1000); cy.get('body').type('{Ctrl}v'); - cy.get('.cvat-canvas3d-perspective').trigger('mousemove', 480, 270).dblclick(480, 270); + cy.get('.cvat-canvas3d-perspective').trigger('mousemove', 480, 270); + cy.get('.cvat-canvas3d-perspective').dblclick(480, 270); cy.get('.cvat-objects-sidebar-state-item').then((sideBarItems) => { expect(sideBarItems.length).to.be.equal(1); }); diff --git a/tests/cypress/e2e/canvas3d_functionality_2/case_82_canvas3d_functionality_cuboid_opacity_outlined_borders.js b/tests/cypress/e2e/canvas3d_functionality_2/case_82_canvas3d_functionality_cuboid_opacity_outlined_borders.js index 76d75239f8b5..c16d7c651cda 100644 --- a/tests/cypress/e2e/canvas3d_functionality_2/case_82_canvas3d_functionality_cuboid_opacity_outlined_borders.js +++ b/tests/cypress/e2e/canvas3d_functionality_2/case_82_canvas3d_functionality_cuboid_opacity_outlined_borders.js @@ -23,7 +23,8 @@ context('Canvas 3D functionality. Opacity. Outlined borders.', () => { cy.openJob(); cy.wait(2000); // Waiting for the point cloud to display cy.create3DCuboid(cuboidCreationParams); - cy.get('.cvat-canvas3d-perspective').trigger('mousemove').click(); // Deactivate the cuboiud + cy.get('.cvat-canvas3d-perspective').trigger('mousemove'); + cy.get('.cvat-canvas3d-perspective').click(); // Deactivate the cuboiud }); const getScene = (el) => el.scene.children[0]; @@ -51,7 +52,9 @@ context('Canvas 3D functionality. Opacity. Outlined borders.', () => { cy.get('.cvat-appearance-selected-opacity-slider').click('right'); cy.get('.cvat-appearance-selected-opacity-slider').find('[role="slider"]').should('have.attr', 'aria-valuenow', 100); cy.get('body').click(); - cy.get('.cvat-canvas3d-perspective').trigger('mousemove').trigger('mousemove', 500, 250).wait(1000); // Waiting for the cuboid activation + cy.get('.cvat-canvas3d-perspective').trigger('mousemove'); + cy.get('.cvat-canvas3d-perspective').trigger('mousemove', 500, 250); + cy.wait(1000); // Waiting for the cuboid activation cy.get('.cvat-canvas3d-perspective canvas').then(([el]) => { expect(el.scene.children[0].children[0].material.opacity).to.equal(1); @@ -66,7 +69,8 @@ context('Canvas 3D functionality. Opacity. Outlined borders.', () => { }); it('Enable/disable outlined borders.', () => { - cy.get('.cvat-appearance-outlinded-borders-checkbox').find('[type="checkbox"]').check().should('be.checked'); + cy.get('.cvat-appearance-outlinded-borders-checkbox').find('[type="checkbox"]').check(); + cy.get('.cvat-appearance-outlinded-borders-checkbox').find('[type="checkbox"]').should('be.checked'); cy.get('.cvat-appearance-outlined-borders-button').click(); cy.get('.cvat-label-color-picker').should('exist').and('be.visible').within(() => { cy.get('div[title="#ff007c"]').click(); @@ -76,7 +80,8 @@ context('Canvas 3D functionality. Opacity. Outlined borders.', () => { expect({ ...getWireframe(el).material.color }).to.deep.equal({ r: 1, g: 0, b: 0.48627450980392156 }); }); - cy.get('.cvat-appearance-outlinded-borders-checkbox').find('[type="checkbox"]').uncheck().should('not.be.checked'); + cy.get('.cvat-appearance-outlinded-borders-checkbox').find('[type="checkbox"]').uncheck(); + cy.get('.cvat-appearance-outlinded-borders-checkbox').find('[type="checkbox"]').should('not.be.checked'); cy.get('.cvat-canvas3d-perspective canvas').then(([el]) => { expect({ ...getWireframe(el).material.color }).to.deep.equal({ ...getFirstChild(el).material.color }); }); diff --git a/tests/cypress/e2e/issues_prs/issue_1882_polygon_interpolation.js b/tests/cypress/e2e/issues_prs/issue_1882_polygon_interpolation.js index 3d17a8c9358a..f072defc43a0 100644 --- a/tests/cypress/e2e/issues_prs/issue_1882_polygon_interpolation.js +++ b/tests/cypress/e2e/issues_prs/issue_1882_polygon_interpolation.js @@ -44,12 +44,11 @@ context("The points of the previous polygon mustn't appear while polygon's inter }); it('Redraw the polygon', () => { const keyCodeN = 78; - cy.get('#cvat_canvas_shape_1') - .trigger('mousemove', { force: true }) - .trigger('keydown', { keyCode: keyCodeN, code: 'KeyN', shiftKey: true }) - .trigger('keyup', { - force: true, keyCode: keyCodeN, code: 'KeyN', shiftKey: true, - }); + cy.get('#cvat_canvas_shape_1').trigger('mousemove', { force: true }); + cy.get('#cvat_canvas_shape_1').trigger('keydown', { keyCode: keyCodeN, code: 'KeyN', shiftKey: true }); + cy.get('#cvat_canvas_shape_1').trigger('keyup', { + force: true, keyCode: keyCodeN, code: 'KeyN', shiftKey: true, + }); cy.createPolygon(reDrawPolygonTrack); }); it('Activate auto bordering mode', () => { diff --git a/tests/cypress/e2e/issues_prs/issue_1919_check_text_attr.js b/tests/cypress/e2e/issues_prs/issue_1919_check_text_attr.js index abb6ea94f44a..a0dac3de9c76 100644 --- a/tests/cypress/e2e/issues_prs/issue_1919_check_text_attr.js +++ b/tests/cypress/e2e/issues_prs/issue_1919_check_text_attr.js @@ -29,7 +29,8 @@ context('Check label attribute changes', () => { describe(`Testing issue "${issueId}"`, () => { it('Open object menu', () => { cy.createRectangle(createRectangleShape2Points); - cy.get('#cvat_canvas_shape_1').trigger('mousemove').rightclick(); + cy.get('#cvat_canvas_shape_1').trigger('mousemove'); + cy.get('#cvat_canvas_shape_1').rightclick(); }); it('Open object menu details', () => { @@ -41,10 +42,8 @@ context('Check label attribute changes', () => { .contains(attrName) .parents('.cvat-object-item-attribute-wrapper') .within(() => { - cy.get('.cvat-object-item-text-attribute') - .should('have.value', textDefaultValue) - .clear() - .type(newLabelAttrValue); + cy.get('.cvat-object-item-text-attribute').should('have.value', textDefaultValue).clear(); + cy.get('.cvat-object-item-text-attribute').type(newLabelAttrValue); }); }); @@ -63,9 +62,8 @@ context('Check label attribute changes', () => { .contains(attrName) .parents('.cvat-object-item-attribute-wrapper') .within(() => { - cy.get('.cvat-object-item-text-attribute') - .clear() - .type(multilineValue); + cy.get('.cvat-object-item-text-attribute').clear(); + cy.get('.cvat-object-item-text-attribute').type(multilineValue); }); cy.saveJob(); cy.reload(); diff --git a/tests/cypress/e2e/issues_prs/issue_1922_error_canvas_is_busy_at_resize_element.js b/tests/cypress/e2e/issues_prs/issue_1922_error_canvas_is_busy_at_resize_element.js index a15727c0a338..c38381d5efe5 100644 --- a/tests/cypress/e2e/issues_prs/issue_1922_error_canvas_is_busy_at_resize_element.js +++ b/tests/cypress/e2e/issues_prs/issue_1922_error_canvas_is_busy_at_resize_element.js @@ -39,13 +39,11 @@ context('Check error canvas is busy at resize element', () => { it('Resize element on second frame and go to previous frame at resizing element', () => { const { secondX, secondY } = createRectangleShape2Points; - cy.get('.cvat-canvas-container') - .trigger('mousemove', secondX - 10, secondY - 10) // activate second shape - .trigger('mousedown', secondX, secondY, { button: 0 }) - .trigger('mousemove', secondX + 100, secondY + 100) - .get('body') - .type('d') // go to previous frame - .trigger('mouseup'); + cy.get('.cvat-canvas-container').trigger('mousemove', secondX - 10, secondY - 10); // activate second shape + cy.get('.cvat-canvas-container').trigger('mousedown', secondX, secondY, { button: 0 }); + cy.get('.cvat-canvas-container').trigger('mousemove', secondX + 100, secondY + 100); + cy.get('body').type('d'); // go to previous frame + cy.get('body').trigger('mouseup'); }); it('Page with the error is missing', () => { diff --git a/tests/cypress/e2e/issues_prs/issue_2230_maintenance_popover_visibility.js b/tests/cypress/e2e/issues_prs/issue_2230_maintenance_popover_visibility.js index c55da8d87a6a..305a0e666205 100644 --- a/tests/cypress/e2e/issues_prs/issue_2230_maintenance_popover_visibility.js +++ b/tests/cypress/e2e/issues_prs/issue_2230_maintenance_popover_visibility.js @@ -16,7 +16,8 @@ context('Check maintenance of popups visibility.', () => { describe(`Testing issue "${issueId}"`, () => { it('Open a popover for draw an object and apply the "mouseout" event to it. The popover be visible.', () => { cy.interactControlButton('draw-rectangle'); - cy.get('.cvat-draw-rectangle-popover').trigger('mouseout').wait(500); + cy.get('.cvat-draw-rectangle-popover').trigger('mouseout'); + cy.wait(500); cy.get('.cvat-draw-rectangle-popover').should('be.visible'); }); diff --git a/tests/cypress/e2e/issues_prs/issue_2411_deleting_attributes.js b/tests/cypress/e2e/issues_prs/issue_2411_deleting_attributes.js index 11fd0bd30e3f..9d786f2c75ba 100644 --- a/tests/cypress/e2e/issues_prs/issue_2411_deleting_attributes.js +++ b/tests/cypress/e2e/issues_prs/issue_2411_deleting_attributes.js @@ -45,7 +45,8 @@ context('Wrong attribute is removed in label constructor.', () => { }); it('Go to Raw labels editor. Insert values.', () => { cy.get('[role="tab"]').contains('Raw').click(); - cy.get('#labels').clear().type(JSON.stringify(taskRaw), { parseSpecialCharSequences: false }); + cy.get('#labels').clear(); + cy.get('#labels').type(JSON.stringify(taskRaw), { parseSpecialCharSequences: false }); cy.contains('Done').click(); }); it('Go to constructor tab. The label "person" appeared there.', () => { diff --git a/tests/cypress/e2e/issues_prs/issue_2486_not_edit_object_aam.js b/tests/cypress/e2e/issues_prs/issue_2486_not_edit_object_aam.js index 444464360657..79f9490ee01e 100644 --- a/tests/cypress/e2e/issues_prs/issue_2486_not_edit_object_aam.js +++ b/tests/cypress/e2e/issues_prs/issue_2486_not_edit_object_aam.js @@ -27,10 +27,9 @@ context("Object can't be draggable/resizable in AAM", () => { describe(`Testing issue "${issueId}"`, () => { it.skip('Create, acttivate a object', () => { cy.createRectangle(createRectangleShape2Points); - cy.get('#cvat_canvas_shape_1') - .should('not.have.class', 'cvat_canvas_shape_activated') - .trigger('mousemove') - .should('have.class', 'cvat_canvas_shape_activated'); + cy.get('#cvat_canvas_shape_1').should('not.have.class', 'cvat_canvas_shape_activated'); + cy.get('#cvat_canvas_shape_1').trigger('mousemove'); + cy.get('#cvat_canvas_shape_1').should('have.class', 'cvat_canvas_shape_activated'); }); it.skip('Go to AAM', () => { @@ -39,9 +38,9 @@ context("Object can't be draggable/resizable in AAM", () => { cy.get('#cvat_canvas_shape_1') .then((shape) => { shapeXPos = Math.floor(shape.attr('x')); - }) - .trigger('mousemove') - .should('not.have.class', 'cvat_canvas_shape_activated'); + }); + cy.get('#cvat_canvas_shape_1').trigger('mousemove'); + cy.get('#cvat_canvas_shape_1').should('not.have.class', 'cvat_canvas_shape_activated'); cy.get('circle').then((circle) => { for (let i = 0; i < circle.length; i++) { if (circle[i].id.match(/^SvgjsCircle\d+$/)) { @@ -52,10 +51,9 @@ context("Object can't be draggable/resizable in AAM", () => { }); it.skip('Try to move/resize the object', () => { - cy.get('.cvat-canvas-container') - .trigger('mousedown', { button: 0 }) - .trigger('mousemove', 550, 251) - .trigger('mouseup'); + cy.get('.cvat-canvas-container').trigger('mousedown', { button: 0 }); + cy.get('.cvat-canvas-container').trigger('mousemove', 550, 251); + cy.get('.cvat-canvas-container').trigger('mouseup'); cy.get('#cvat_canvas_shape_1').then((shapeAam) => { expect(shapeXPos).to.be.equal(Math.floor(shapeAam.attr('x'))); // The object didn't move. }); diff --git a/tests/cypress/e2e/issues_prs/issue_2487_extra_instances_canvas_grouping.js b/tests/cypress/e2e/issues_prs/issue_2487_extra_instances_canvas_grouping.js index 6dba5d4e0925..5e1b46536eed 100644 --- a/tests/cypress/e2e/issues_prs/issue_2487_extra_instances_canvas_grouping.js +++ b/tests/cypress/e2e/issues_prs/issue_2487_extra_instances_canvas_grouping.js @@ -20,9 +20,8 @@ context('Extra instances on canvas when grouping.', () => { it('Start drawing a group region and press "G". Group region not exist', () => { cy.get('.cvat-group-control').click(); - cy.get('.cvat-canvas-container') - .trigger('mousedown', 250, 250, { button: 0 }) - .trigger('mousemove', 500, 500); + cy.get('.cvat-canvas-container').trigger('mousedown', 250, 250, { button: 0 }); + cy.get('.cvat-canvas-container').trigger('mousemove', 500, 500); cy.get('body').type('g'); cy.get('.cvat_canvas_shape_grouping').should('not.exist'); }); diff --git a/tests/cypress/e2e/issues_prs/issue_2807_polyline_editing.js b/tests/cypress/e2e/issues_prs/issue_2807_polyline_editing.js index 05f668dad022..dac882350070 100644 --- a/tests/cypress/e2e/issues_prs/issue_2807_polyline_editing.js +++ b/tests/cypress/e2e/issues_prs/issue_2807_polyline_editing.js @@ -38,18 +38,18 @@ context('After draw correcting line and press the latest drawn point then it clo describe(`Testing issue "${issueId}"`, () => { it('Draw correcting line', () => { - cy.get('.cvat-canvas-container').trigger('mousemove', 600, 250).trigger('mouseover', 600, 250); + cy.get('.cvat-canvas-container').trigger('mousemove', 600, 250); + cy.get('.cvat-canvas-container').trigger('mouseover', 600, 250); cy.get('#cvat_canvas_shape_1').should('have.class', 'cvat_canvas_shape_activated'); getCircleAndWriteToArr(svgJsCircle); // Getting a list of "SvgjsCircleNNNN" objects cy.get('.cvat-canvas-container').click(600, 250, { shiftKey: true }); // Activate editing move // There is no "cvat_canvas_shape_activated" class during the activated change mode cy.get('#cvat_canvas_shape_1').should('not.have.class', 'cvat_canvas_shape_activated'); - cy.get('.cvat-canvas-container') - .trigger('mousemove', 500, 250) - .click(500, 250) - .trigger('mousemove', 500, 240) - .trigger('mousemove', 500, 250) - .click(500, 250); + cy.get('.cvat-canvas-container').trigger('mousemove', 500, 250); + cy.get('.cvat-canvas-container').click(500, 250); + cy.get('.cvat-canvas-container').trigger('mousemove', 500, 240); + cy.get('.cvat-canvas-container').trigger('mousemove', 500, 250); + cy.get('.cvat-canvas-container').click(500, 250); getCircleAndWriteToArr(svgJsCircleAfterCorrection); }); diff --git a/tests/cypress/e2e/issues_prs/pr_1370_check_UI_fail_with_object_dragging_and_go_next_frame.js b/tests/cypress/e2e/issues_prs/pr_1370_check_UI_fail_with_object_dragging_and_go_next_frame.js index 70ff423039d6..ce4e42654911 100644 --- a/tests/cypress/e2e/issues_prs/pr_1370_check_UI_fail_with_object_dragging_and_go_next_frame.js +++ b/tests/cypress/e2e/issues_prs/pr_1370_check_UI_fail_with_object_dragging_and_go_next_frame.js @@ -27,7 +27,9 @@ context('Check if the UI fails by moving to the next frame while dragging the ob cy.createRectangle(createRectangleShape2Points); }); it('Start object dragging and go to next frame (F).', () => { - cy.get('#cvat_canvas_shape_1').trigger('mousemove').trigger('mouseover').trigger('mousedown', { which: 1 }); + cy.get('#cvat_canvas_shape_1').trigger('mousemove'); + cy.get('#cvat_canvas_shape_1').trigger('mouseover'); + cy.get('#cvat_canvas_shape_1').trigger('mousedown', { which: 1 }); cy.get('body').type('f'); }); it('Page with the error is missing', () => { diff --git a/tests/cypress/e2e/issues_prs2/issue_1216_Check_if_UI_not_fails_with_shape_dragging_over_sidebar.js b/tests/cypress/e2e/issues_prs2/issue_1216_Check_if_UI_not_fails_with_shape_dragging_over_sidebar.js index 9475945ba52b..3bc95dc3a65e 100644 --- a/tests/cypress/e2e/issues_prs2/issue_1216_Check_if_UI_not_fails_with_shape_dragging_over_sidebar.js +++ b/tests/cypress/e2e/issues_prs2/issue_1216_Check_if_UI_not_fails_with_shape_dragging_over_sidebar.js @@ -41,7 +41,9 @@ context('Check if UI not fails with shape dragging over sidebar', () => { it('Shape dragging over sidebar.', () => { /* To reproduce the error, move the any shape under any #cvat-objects-sidebar-state-item-*. */ - cy.get('#cvat_canvas_shape_2').trigger('mousemove').trigger('mouseover').trigger('mousedown', { which: 1 }); + cy.get('#cvat_canvas_shape_2').trigger('mousemove'); + cy.get('#cvat_canvas_shape_2').trigger('mouseover'); + cy.get('#cvat_canvas_shape_2').trigger('mousedown', { which: 1 }); }); it('There is no error like "Canvas is busy. Action: drag" in the console', () => { cy.get('body') diff --git a/tests/cypress/e2e/issues_prs2/issue_1368_points_track_invisible_next_frame.js b/tests/cypress/e2e/issues_prs2/issue_1368_points_track_invisible_next_frame.js index 08ff1917f830..fa033b9534e7 100644 --- a/tests/cypress/e2e/issues_prs2/issue_1368_points_track_invisible_next_frame.js +++ b/tests/cypress/e2e/issues_prs2/issue_1368_points_track_invisible_next_frame.js @@ -26,7 +26,8 @@ context('Points track it is still invisible on next frames', () => { cy.get('#cvat-objects-sidebar-state-item-1').should('contain', '1').and('contain', 'POINTS TRACK'); }); it('Switch outside property', () => { - cy.get('#cvat_canvas_shape_1').trigger('mousemove').trigger('mouseover'); + cy.get('#cvat_canvas_shape_1').trigger('mousemove'); + cy.get('#cvat_canvas_shape_1').trigger('mouseover'); cy.get('body').type('o'); cy.get('#cvat_canvas_shape_1').should('be.hidden'); }); diff --git a/tests/cypress/e2e/issues_prs2/issue_1391_delete_point.js b/tests/cypress/e2e/issues_prs2/issue_1391_delete_point.js index bb424ebe8783..68d986317458 100644 --- a/tests/cypress/e2e/issues_prs2/issue_1391_delete_point.js +++ b/tests/cypress/e2e/issues_prs2/issue_1391_delete_point.js @@ -41,7 +41,8 @@ context('When delete a point, the required point is deleted.', () => { }); }); it('Remove the second point from created polyline', () => { - cy.get('#cvat_canvas_shape_1').trigger('mousemove', { force: true }).trigger('mouseover', { force: true }); + cy.get('#cvat_canvas_shape_1').trigger('mousemove', { force: true }); + cy.get('#cvat_canvas_shape_1').trigger('mouseover', { force: true }); cy.get('.svg_select_points').then((points) => { cy.get(points) .eq(0) diff --git a/tests/cypress/e2e/issues_prs2/issue_1433_hide_functionality.js b/tests/cypress/e2e/issues_prs2/issue_1433_hide_functionality.js index 5ae14e54b95d..f13dde3fb766 100644 --- a/tests/cypress/e2e/issues_prs2/issue_1433_hide_functionality.js +++ b/tests/cypress/e2e/issues_prs2/issue_1433_hide_functionality.js @@ -26,11 +26,10 @@ context('Check hide functionality (H)', () => { it('Object is hidden', () => { const keyCodeH = 72; cy.createRectangle(createRectangleShape2Points); - cy.get('#cvat_canvas_shape_1') - .trigger('mousemove') - .trigger('mouseover') - .trigger('keydown', { keyCode: keyCodeH, code: 'KeyH' }) - .should('be.hidden'); + cy.get('#cvat_canvas_shape_1').trigger('mousemove'); + cy.get('#cvat_canvas_shape_1').trigger('mouseover'); + cy.get('#cvat_canvas_shape_1').trigger('keydown', { keyCode: keyCodeH, code: 'KeyH' }); + cy.get('#cvat_canvas_shape_1').should('be.hidden'); }); }); }); diff --git a/tests/cypress/e2e/issues_prs2/issue_1438_cancel_multiple_paste_ui_not_lock.js b/tests/cypress/e2e/issues_prs2/issue_1438_cancel_multiple_paste_ui_not_lock.js index 27e090cec3ee..d4a5841f0248 100644 --- a/tests/cypress/e2e/issues_prs2/issue_1438_cancel_multiple_paste_ui_not_lock.js +++ b/tests/cypress/e2e/issues_prs2/issue_1438_cancel_multiple_paste_ui_not_lock.js @@ -25,8 +25,12 @@ context('Cancel "multiple paste". UI is not locked.', () => { describe(`Testing issue "${issueId}"`, () => { it('Copy, paste opject. Cancel pasting.', () => { cy.createRectangle(createRectangleShape2Points); - cy.get('#cvat_canvas_shape_1').trigger('mousemove').trigger('mouseover'); - cy.get('body').type('{ctrl}c').type('{ctrl}v').click({ ctrlKey: true }).type('{esc}'); + cy.get('#cvat_canvas_shape_1').trigger('mousemove'); + cy.get('#cvat_canvas_shape_1').trigger('mouseover'); + cy.get('body').type('{ctrl}c'); + cy.get('body').type('{ctrl}v'); + cy.get('body').click({ ctrlKey: true }); + cy.get('body').type('{esc}'); }); it('UI is not locked.', () => { cy.get('.cvat-draw-rectangle-control').click(); diff --git a/tests/cypress/e2e/issues_prs2/issue_1540_add_remove_tag.js b/tests/cypress/e2e/issues_prs2/issue_1540_add_remove_tag.js index a2518f6b30a7..a1eaa5352bfc 100644 --- a/tests/cypress/e2e/issues_prs2/issue_1540_add_remove_tag.js +++ b/tests/cypress/e2e/issues_prs2/issue_1540_add_remove_tag.js @@ -21,11 +21,9 @@ context('Check if the UI not to crash after remove a tag', () => { }); it('Remove the tag', () => { const keyCodeDel = 46; - cy.get('#cvat-objects-sidebar-state-item-1') - .should('contain', '1') - .and('contain', 'TAG') - .trigger('mouseover') - .trigger('keydown', { keyCode: keyCodeDel, code: 'Delete' }); + cy.get('#cvat-objects-sidebar-state-item-1').should('contain', '1').and('contain', 'TAG'); + cy.get('#cvat-objects-sidebar-state-item-1').trigger('mouseover'); + cy.get('#cvat-objects-sidebar-state-item-1').trigger('keydown', { keyCode: keyCodeDel, code: 'Delete' }); }); it('Page with the error is missing', () => { cy.contains('Oops, something went wrong').should('not.exist'); diff --git a/tests/cypress/e2e/issues_prs2/issue_1819_first_part_split_track_visible.js b/tests/cypress/e2e/issues_prs2/issue_1819_first_part_split_track_visible.js index f44963d2d47a..1df9aee23d13 100644 --- a/tests/cypress/e2e/issues_prs2/issue_1819_first_part_split_track_visible.js +++ b/tests/cypress/e2e/issues_prs2/issue_1819_first_part_split_track_visible.js @@ -34,7 +34,8 @@ context('First part of a split track is visible', () => { }); it('Split track', () => { cy.get('body').type('{alt}m'); - cy.get('#cvat_canvas_shape_1').trigger('mousemove', { button: 0 }).trigger('click', { button: 0 }); + cy.get('#cvat_canvas_shape_1').trigger('mousemove', { button: 0 }); + cy.get('#cvat_canvas_shape_1').trigger('click', { button: 0 }); }); it('Go to previous frame', () => { cy.get('.cvat-player-previous-button').click(); diff --git a/tests/cypress/e2e/issues_prs2/issue_1823_opening_context_menu_when_switching_another_frame.js b/tests/cypress/e2e/issues_prs2/issue_1823_opening_context_menu_when_switching_another_frame.js index 30e18e73bf17..58a261db0f36 100644 --- a/tests/cypress/e2e/issues_prs2/issue_1823_opening_context_menu_when_switching_another_frame.js +++ b/tests/cypress/e2e/issues_prs2/issue_1823_opening_context_menu_when_switching_another_frame.js @@ -82,7 +82,8 @@ context('Cannot read property label of undefined', { browser: ['!chrome', '!fire it('Go to another frame. During this procedure open context menu for a shape.', () => { cy.get('body').type('f'); - cy.get('#cvat_canvas_shape_1').trigger('mousemove').rightclick(); + cy.get('#cvat_canvas_shape_1').trigger('mousemove'); + cy.get('#cvat_canvas_shape_1').rightclick(); }); it('Page with the error is missing', () => { diff --git a/tests/cypress/e2e/issues_prs2/issue_1825_tooltip_hidden_mouseout.js b/tests/cypress/e2e/issues_prs2/issue_1825_tooltip_hidden_mouseout.js index 268c37784938..5b7acf8acdc0 100644 --- a/tests/cypress/e2e/issues_prs2/issue_1825_tooltip_hidden_mouseout.js +++ b/tests/cypress/e2e/issues_prs2/issue_1825_tooltip_hidden_mouseout.js @@ -17,7 +17,9 @@ context('Tooltip does not interfere with interaction with elements.', () => { it('Mouseover to "Shape" button when draw new rectangle. The tooltip open.', () => { cy.get('.cvat-draw-rectangle-control').click(); cy.get('.cvat-draw-shape-popover-content'); - cy.contains('Shape').invoke('show').trigger('mouseover', 'top').should('have.class', 'ant-tooltip-open'); + cy.contains('Shape').invoke('show'); + cy.contains('Shape').trigger('mouseover', 'top'); + cy.contains('Shape').should('have.class', 'ant-tooltip-open'); }); it('The radio element was clicked successfully', () => { /* Before the fix, cypress can't click on the radio element diff --git a/tests/cypress/e2e/issues_prs2/issue_1870_cursor_not_jump_to_end.js b/tests/cypress/e2e/issues_prs2/issue_1870_cursor_not_jump_to_end.js index 38dcf641139e..a3a812744412 100644 --- a/tests/cypress/e2e/issues_prs2/issue_1870_cursor_not_jump_to_end.js +++ b/tests/cypress/e2e/issues_prs2/issue_1870_cursor_not_jump_to_end.js @@ -34,9 +34,8 @@ context( .contains(attrName) .parents('.cvat-object-item-attribute-wrapper') .within(() => { - cy.get('.cvat-object-item-text-attribute') - .type('{leftarrow}{leftarrow}ee') - .should('have.value', textDefaultValue.replace('Text', 'Teeext')); + cy.get('.cvat-object-item-text-attribute').type('{leftarrow}{leftarrow}ee'); + cy.get('.cvat-object-item-text-attribute').should('have.value', textDefaultValue.replace('Text', 'Teeext')); }); }); }); diff --git a/tests/cypress/e2e/issues_prs2/issue_3821_delete_point.js b/tests/cypress/e2e/issues_prs2/issue_3821_delete_point.js index e1fbd5b023e9..985bdf1633e7 100644 --- a/tests/cypress/e2e/issues_prs2/issue_3821_delete_point.js +++ b/tests/cypress/e2e/issues_prs2/issue_3821_delete_point.js @@ -31,7 +31,8 @@ context('When delete a point, the required point is deleted.', () => { describe(`Testing issue "${issueId}"`, () => { it('Remove point holding Alt key from each shape. Point must be removed from first shape, second one should stay the same', () => { - cy.get('#cvat_canvas_shape_1').trigger('mousemove', { force: true }).trigger('mouseover', { force: true }); + cy.get('#cvat_canvas_shape_1').trigger('mousemove', { force: true }); + cy.get('#cvat_canvas_shape_1').trigger('mouseover', { force: true }); cy.get('body').type('{alt}', { release: false }); cy.get('#cvat_canvas_shape_1') .children() @@ -60,7 +61,8 @@ context('When delete a point, the required point is deleted.', () => { }); it('Remove point holding Ctrl key from each shape. Point must be removed from first shape, second one should stay the same', () => { - cy.get('#cvat_canvas_shape_3').trigger('mousemove', { force: true }).trigger('mouseover', { force: true }); + cy.get('#cvat_canvas_shape_3').trigger('mousemove', { force: true }); + cy.get('#cvat_canvas_shape_3').trigger('mouseover', { force: true }); cy.get('body').type('{ctrl}', { release: false }); cy.get('#cvat_canvas_shape_3') .children()