Cypress test. Issue 2625. (#2629)

* Add css class for modal window.

* Add cypress test

* Move base_actions_project_task_user.js to another folder.

This folder will not be available when running through Firefox

* Rework cypress main configs.

* Add assert

Co-authored-by: Kruchinin <dmitryx.kruchinin@intel.com>
main
Dmitry Kruchinin 5 years ago committed by GitHub
parent b41afad395
commit 01d35c8794
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -22,6 +22,7 @@ export default function ProjectActionsMenuComponent(props: Props): JSX.Element {
Modal.confirm({
title: `The project ${projectInstance.id} will be deleted`,
content: 'All related data (images, annotations) will be lost. Continue?',
className: 'cvat-modal-confirm-remove-project',
onOk: () => {
dispatch(deleteProjectAsync(projectInstance));
},

@ -13,7 +13,7 @@
"auth_page.js",
"actions_tasks_objects/*",
"actions_users/**/*",
"actions_projects/*",
"actions_projects/**/*",
"remove_users_tasks_projects.js"
]
}

@ -0,0 +1,28 @@
// Copyright (C) 2020 Intel Corporation
//
// SPDX-License-Identifier: MIT
/// <reference types="cypress" />
import { projectName } from '../../support/const_project';
context('Delete a project via actions.', () => {
const issueID = 2625;
before(() => {
cy.openProject(projectName);
});
describe(`Testing "Issue ${issueID}"`, () => {
it('Delete a project via actions.', () => {
cy.get('.cvat-project-top-bar-actions').trigger('mouseover');
cy.get('.cvat-project-actions-menu').within(() => {
cy.contains('[role="menuitem"]', 'Delete').click();
});
cy.get('.cvat-modal-confirm-remove-project').within(() => {
cy.contains('button', 'Delete').click();
});
cy.contains('.cvat-projects-project-item-title', projectName).should('not.exist');
});
});
});

@ -4,7 +4,7 @@
/// <reference types="cypress" />
import { projectName } from '../../support/const_project';
import { projectName } from '../../../support/const_project';
const randomString = (isPassword) => {
let result = '';

@ -12,6 +12,7 @@
"testFiles": [
"auth_page.js",
"actions_tasks_objects/*",
"actions_projects/*",
"actions_users/*",
"email_system/*",
"remove_users_tasks_projects.js"

Loading…
Cancel
Save