Update Cypress tests. (#2812)

* Add goToTaskList() before user logout.

* Add wait() for the dropdown menu transition
main
Dmitry Kruchinin 5 years ago committed by GitHub
parent 5504ba19aa
commit daedff4204
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -1,4 +1,4 @@
// Copyright (C) 2020 Intel Corporation // Copyright (C) 2020-2021 Intel Corporation
// //
// SPDX-License-Identifier: MIT // SPDX-License-Identifier: MIT
@ -112,6 +112,7 @@ context('Base actions on the project', () => {
cy.get('.cvat-constructor-viewer').should('not.exist'); cy.get('.cvat-constructor-viewer').should('not.exist');
}); });
it('Logout first user, register second user, tries to create project and logout.', () => { it('Logout first user, register second user, tries to create project and logout.', () => {
cy.goToTaskList();
cy.logout(); cy.logout();
cy.goToRegisterPage(); cy.goToRegisterPage();
cy.userRegistration(firstName, lastName, userName, emailAddr, password); cy.userRegistration(firstName, lastName, userName, emailAddr, password);
@ -141,6 +142,7 @@ context('Base actions on the project', () => {
cy.goToTaskList(); cy.goToTaskList();
cy.contains('strong', taskName.secondTask).should('not.exist'); cy.contains('strong', taskName.secondTask).should('not.exist');
cy.openTask(taskName.firstTask); cy.openTask(taskName.firstTask);
cy.goToTaskList();
cy.logout(userName); cy.logout(userName);
}); });
it('Delete the project. Deleted project not exist. Checking the availability of tasks.', () => { it('Delete the project. Deleted project not exist. Checking the availability of tasks.', () => {

@ -18,7 +18,7 @@ context('Settings. "Player speed" option.', () => {
function changePlayerSpeed(speed) { function changePlayerSpeed(speed) {
cy.openSettings(); cy.openSettings();
cy.get('.cvat-player-settings-speed').within(() => { 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-${speed}`).click();
cy.get('.cvat-player-settings-speed-select').should( cy.get('.cvat-player-settings-speed-select').should(

Loading…
Cancel
Save