From 292e1c4db7882e1d7244fa373657a6b2db005739 Mon Sep 17 00:00:00 2001 From: Boris Sekachev Date: Tue, 23 Jul 2024 10:38:21 +0300 Subject: [PATCH] Tried to make cypress test stable: features/annotation_actions.js (#8208) --- tests/cypress/e2e/features/annotations_actions.js | 1 - tests/cypress/support/commands.js | 10 ++++++---- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/tests/cypress/e2e/features/annotations_actions.js b/tests/cypress/e2e/features/annotations_actions.js index 43be5cca5953..cda91f9c33ba 100644 --- a/tests/cypress/e2e/features/annotations_actions.js +++ b/tests/cypress/e2e/features/annotations_actions.js @@ -379,7 +379,6 @@ context('Testing annotations actions workflow', () => { as: 'exportAnnotations', type: 'annotations', format: FORMAT_NAME, - scrollList: true, }; cy.exportJob(exportAnnotation); cy.downloadExport().then((file) => { diff --git a/tests/cypress/support/commands.js b/tests/cypress/support/commands.js index 170220b8e952..3af8b83875c4 100644 --- a/tests/cypress/support/commands.js +++ b/tests/cypress/support/commands.js @@ -1259,13 +1259,15 @@ Cypress.Commands.add('exportTask', ({ Cypress.Commands.add('exportJob', ({ type, format, archiveCustomName, targetStorage = null, useDefaultLocation = true, - scrollList = false, }) => { cy.interactMenu('Export job dataset'); cy.get('.cvat-modal-export-job').should('be.visible').find('.cvat-modal-export-select').click(); - if (scrollList) { - cy.contains('.cvat-modal-export-option-item', format).scrollIntoView(); - } + cy.get('.ant-select-dropdown') + .not('.ant-select-dropdown-hidden') + .not('.ant-slide-up') + .within(() => { + cy.contains('.cvat-modal-export-option-item', format).scrollIntoView(); + }); cy.contains('.cvat-modal-export-option-item', format).should('be.visible').click(); cy.get('.cvat-modal-export-job').find('.cvat-modal-export-select').should('contain.text', format); if (type === 'dataset') {