From daedff420404977226604090a1ebb8e45ed7367f Mon Sep 17 00:00:00 2001 From: Dmitry Kruchinin <33020454+dvkruchinin@users.noreply.github.com> Date: Tue, 16 Feb 2021 13:15:35 +0300 Subject: [PATCH] Update Cypress tests. (#2812) * Add goToTaskList() before user logout. * Add wait() for the dropdown menu transition --- .../registration_involved/base_actions_project_task_user.js | 4 +++- .../actions_tasks_objects/case_50_settings_player_speed.js | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/tests/cypress/integration/actions_projects/registration_involved/base_actions_project_task_user.js b/tests/cypress/integration/actions_projects/registration_involved/base_actions_project_task_user.js index c6ae316318a4..432b8178cbb6 100644 --- a/tests/cypress/integration/actions_projects/registration_involved/base_actions_project_task_user.js +++ b/tests/cypress/integration/actions_projects/registration_involved/base_actions_project_task_user.js @@ -1,4 +1,4 @@ -// Copyright (C) 2020 Intel Corporation +// Copyright (C) 2020-2021 Intel Corporation // // SPDX-License-Identifier: MIT @@ -112,6 +112,7 @@ context('Base actions on the project', () => { cy.get('.cvat-constructor-viewer').should('not.exist'); }); it('Logout first user, register second user, tries to create project and logout.', () => { + cy.goToTaskList(); cy.logout(); cy.goToRegisterPage(); cy.userRegistration(firstName, lastName, userName, emailAddr, password); @@ -141,6 +142,7 @@ context('Base actions on the project', () => { cy.goToTaskList(); cy.contains('strong', taskName.secondTask).should('not.exist'); cy.openTask(taskName.firstTask); + cy.goToTaskList(); cy.logout(userName); }); it('Delete the project. Deleted project not exist. Checking the availability of tasks.', () => { diff --git a/tests/cypress/integration/actions_tasks_objects/case_50_settings_player_speed.js b/tests/cypress/integration/actions_tasks_objects/case_50_settings_player_speed.js index ec696c6dcfe1..90f79eba5aaa 100644 --- a/tests/cypress/integration/actions_tasks_objects/case_50_settings_player_speed.js +++ b/tests/cypress/integration/actions_tasks_objects/case_50_settings_player_speed.js @@ -18,7 +18,7 @@ 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(); + cy.get('.cvat-player-settings-speed-select').click().wait(300); // Wait for the dropdown menu transition. }); cy.get(`.cvat-player-settings-speed-${speed}`).click(); cy.get('.cvat-player-settings-speed-select').should(