Skip to content

Commit

Permalink
Merge branch 'develop' into bs/open_org
Browse files Browse the repository at this point in the history
  • Loading branch information
bsekachev authored Aug 20, 2023
2 parents 4275b7b + afefe22 commit bbeb59c
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,10 @@ context('Some parts of the Redux state (issues) is not reset after changing a ta
});

after(() => {
cy.goToTaskList();
cy.deleteTask(taskName.firstTaskName);
cy.deleteTask(taskName.secondTaskName);
cy.logout();
cy.getAuthKey().then((authKey) => {
cy.deleteTasks(authKey, [taskName.firstTaskName, taskName.secondTaskName]);
});
});

describe(`Testing "${labelName}"`, () => {
Expand Down
5 changes: 5 additions & 0 deletions tests/cypress/support/commands_projects.js
Original file line number Diff line number Diff line change
Expand Up @@ -104,12 +104,17 @@ Cypress.Commands.add('clickInProjectMenu', (item, fromProjectPage, projectName =

Cypress.Commands.add('deleteProject', (projectName, projectID, expectedResult = 'success') => {
cy.clickInProjectMenu('Delete', false, projectName);
const interceptorName = `deleteProject_${projectID}`;
cy.intercept('DELETE', `/api/projects/${projectID}**`).as(interceptorName);
cy.get('.cvat-modal-confirm-remove-project')
.should('contain', `The project ${projectID} will be deleted`)
.within(() => {
cy.contains('button', 'Delete').click();
});
if (expectedResult === 'success') {
cy.wait(`@${interceptorName}`).then((interseption) => {
expect(interseption.response.statusCode).to.be.equal(204);
});
cy.get('.cvat-projects-project-item-card').should('have.css', 'opacity', '0.5');
} else if (expectedResult === 'fail') {
cy.get('.cvat-projects-project-item-card').should('not.have.css', 'opacity', '0.5');
Expand Down

0 comments on commit bbeb59c

Please sign in to comment.