From 948db7594b74b3c5f8320a48949d04d0527099c1 Mon Sep 17 00:00:00 2001 From: Boris Sekachev Date: Tue, 22 Aug 2023 19:59:28 +0300 Subject: [PATCH] Enable webhooks pipeline (#6706) ### Motivation and context ### How has this been tested? ### Checklist - [x] I submit my changes into the `develop` branch - [ ] I have added a description of my changes into the [CHANGELOG](https://github.com/opencv/cvat/blob/develop/CHANGELOG.md) file - [ ] I have updated the documentation accordingly - [ ] I have added tests to cover my changes - [ ] I have linked related issues (see [GitHub docs]( https://help.github.com/en/github/managing-your-work-on-github/linking-a-pull-request-to-an-issue#linking-a-pull-request-to-an-issue-using-a-keyword)) - [ ] I have increased versions of npm packages if it is necessary ([cvat-canvas](https://github.com/opencv/cvat/tree/develop/cvat-canvas#versioning), [cvat-core](https://github.com/opencv/cvat/tree/develop/cvat-core#versioning), [cvat-data](https://github.com/opencv/cvat/tree/develop/cvat-data#versioning) and [cvat-ui](https://github.com/opencv/cvat/tree/develop/cvat-ui#versioning)) ### License - [x] I submit _my code changes_ under the same [MIT License]( https://github.com/opencv/cvat/blob/develop/LICENSE) that covers the project. Feel free to contact the maintainers if that's a concern. --- .github/workflows/full.yml | 5 ++--- .github/workflows/main.yml | 5 ++--- .github/workflows/schedule.yml | 5 ++--- tests/cypress.config.js | 6 +----- .../analytics_pipeline.js | 9 +++++---- .../case_113_new_organization_pipeline.js | 0 .../ground_truth_jobs.js | 0 .../e2e/{masks => features}/masks_basics.js | 3 ++- .../skeletons_pipeline.js | 12 ++++++++---- tests/cypress/e2e/{ => features}/webhooks.js | 0 tests/nightly_cypress.config.js | 19 ++++++++++--------- 11 files changed, 32 insertions(+), 32 deletions(-) rename tests/cypress/e2e/{analytics => features}/analytics_pipeline.js (95%) rename tests/cypress/e2e/{actions_organizations => features}/case_113_new_organization_pipeline.js (100%) rename tests/cypress/e2e/{analytics => features}/ground_truth_jobs.js (100%) rename tests/cypress/e2e/{masks => features}/masks_basics.js (98%) rename tests/cypress/e2e/{skeletons => features}/skeletons_pipeline.js (95%) rename tests/cypress/e2e/{ => features}/webhooks.js (100%) diff --git a/.github/workflows/full.yml b/.github/workflows/full.yml index 3f72d3de2..dce65ed3a 100644 --- a/.github/workflows/full.yml +++ b/.github/workflows/full.yml @@ -254,9 +254,8 @@ jobs: matrix: specs: ['actions_tasks', 'actions_tasks2', 'actions_tasks3', 'actions_objects', 'actions_objects2', 'actions_users', - 'actions_projects_models', 'actions_organizations', 'canvas3d_functionality', - 'canvas3d_functionality_2', 'issues_prs', 'issues_prs2', 'masks', 'skeletons', - 'analytics'] + 'actions_projects_models', 'canvas3d_functionality', 'canvas3d_functionality_2', + 'issues_prs', 'issues_prs2', 'features'] steps: - uses: actions/checkout@v3 with: diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 26b7e961b..92f893a0b 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -269,9 +269,8 @@ jobs: matrix: specs: ['actions_tasks', 'actions_tasks2', 'actions_tasks3', 'actions_objects', 'actions_objects2', 'actions_users', - 'actions_projects_models', 'actions_organizations', 'canvas3d_functionality', - 'canvas3d_functionality_2', 'issues_prs', 'issues_prs2', 'masks', 'skeletons', - 'analytics'] + 'actions_projects_models', 'canvas3d_functionality', 'canvas3d_functionality_2', + 'issues_prs', 'issues_prs2', 'features'] steps: - uses: actions/checkout@v3 diff --git a/.github/workflows/schedule.yml b/.github/workflows/schedule.yml index 6d2485be8..bd2dfadc5 100644 --- a/.github/workflows/schedule.yml +++ b/.github/workflows/schedule.yml @@ -194,9 +194,8 @@ jobs: matrix: specs: ['actions_tasks', 'actions_tasks2', 'actions_tasks3', 'actions_objects', 'actions_objects2', 'actions_users', - 'actions_projects_models', 'actions_organizations', 'canvas3d_functionality', - 'canvas3d_functionality_2', 'issues_prs', 'issues_prs2', 'masks', 'skeletons', - 'analytics'] + 'actions_projects_models', 'canvas3d_functionality', 'canvas3d_functionality_2', + 'issues_prs', 'issues_prs2', 'features'] steps: - uses: actions/checkout@v3 diff --git a/tests/cypress.config.js b/tests/cypress.config.js index ffed68240..ef2e7ee9f 100644 --- a/tests/cypress.config.js +++ b/tests/cypress.config.js @@ -20,9 +20,7 @@ module.exports = defineConfig({ baseUrl: 'http://localhost:8080', specPattern: [ 'cypress/e2e/auth_page.js', - 'cypress/e2e/skeletons/*.js', - 'cypress/e2e/webhooks.js', - 'cypress/e2e/masks/*.js', + 'cypress/e2e/features/*.js', 'cypress/e2e/actions_tasks/**/*.js', 'cypress/e2e/actions_tasks2/**/*.js', 'cypress/e2e/actions_tasks3/**/*.js', @@ -31,9 +29,7 @@ module.exports = defineConfig({ 'cypress/e2e/issues_prs/**/*.js', 'cypress/e2e/issues_prs2/**/*.js', 'cypress/e2e/actions_users/**/*.js', - 'cypress/e2e/analytics/*.js', 'cypress/e2e/actions_projects_models/**/*.js', - 'cypress/e2e/actions_organizations/**/*.js', 'cypress/e2e/remove_users_tasks_projects_organizations.js', ], }, diff --git a/tests/cypress/e2e/analytics/analytics_pipeline.js b/tests/cypress/e2e/features/analytics_pipeline.js similarity index 95% rename from tests/cypress/e2e/analytics/analytics_pipeline.js rename to tests/cypress/e2e/features/analytics_pipeline.js index 984120947..399d11dd0 100644 --- a/tests/cypress/e2e/analytics/analytics_pipeline.js +++ b/tests/cypress/e2e/features/analytics_pipeline.js @@ -181,14 +181,15 @@ context('Analytics pipeline', () => { cy.goCheckFrameNumber(0); cy.get('#cvat-objects-sidebar-state-item-1') .find('.cvat-objects-sidebar-state-item-label-selector') - .type(`${secondLabelName}{Enter}`) + .type(`${secondLabelName}{Enter}`); + cy.get('#cvat-objects-sidebar-state-item-1') + .find('.cvat-objects-sidebar-state-item-label-selector') .trigger('mouseout'); cy.saveJob(); cy.goToNextFrame(1); - cy.get('#cvat_canvas_shape_2') - .trigger('mousemove') - .should('have.class', 'cvat_canvas_shape_activated'); + cy.get('#cvat_canvas_shape_2').trigger('mousemove'); + cy.get('#cvat_canvas_shape_2').should('have.class', 'cvat_canvas_shape_activated'); cy.get('body').type('{del}'); cy.get('#cvat_canvas_shape_2').should('not.exist'); cy.saveJob(); diff --git a/tests/cypress/e2e/actions_organizations/case_113_new_organization_pipeline.js b/tests/cypress/e2e/features/case_113_new_organization_pipeline.js similarity index 100% rename from tests/cypress/e2e/actions_organizations/case_113_new_organization_pipeline.js rename to tests/cypress/e2e/features/case_113_new_organization_pipeline.js diff --git a/tests/cypress/e2e/analytics/ground_truth_jobs.js b/tests/cypress/e2e/features/ground_truth_jobs.js similarity index 100% rename from tests/cypress/e2e/analytics/ground_truth_jobs.js rename to tests/cypress/e2e/features/ground_truth_jobs.js diff --git a/tests/cypress/e2e/masks/masks_basics.js b/tests/cypress/e2e/features/masks_basics.js similarity index 98% rename from tests/cypress/e2e/masks/masks_basics.js rename to tests/cypress/e2e/features/masks_basics.js index fda94b6b9..257311b13 100644 --- a/tests/cypress/e2e/masks/masks_basics.js +++ b/tests/cypress/e2e/features/masks_basics.js @@ -42,7 +42,8 @@ context('Manipulations with masks', { scrollBehavior: false }, () => { const { value } = instruction; cy.get('.cvat-brush-tools-brush').click(); cy.get('.cvat-brush-tools-brush-size').within(() => { - cy.get('input').clear().type(`${value}`); + cy.get('input').clear(); + cy.get('input').type(`${value}`); }); } else { const { coordinates } = instruction; diff --git a/tests/cypress/e2e/skeletons/skeletons_pipeline.js b/tests/cypress/e2e/features/skeletons_pipeline.js similarity index 95% rename from tests/cypress/e2e/skeletons/skeletons_pipeline.js rename to tests/cypress/e2e/features/skeletons_pipeline.js index 69a2e79fb..1caf3c347 100644 --- a/tests/cypress/e2e/skeletons/skeletons_pipeline.js +++ b/tests/cypress/e2e/features/skeletons_pipeline.js @@ -77,7 +77,8 @@ context('Manipulations with skeletons', { scrollBehavior: false }, () => { expect(skeletonSize).to.be.equal(skeleton.points.length); cy.get('input[type="file"]').attachFile(archiveName, { subjectType: 'drag-n-drop' }); cy.intercept('/api/tasks?**').as('taskPost'); - cy.contains('Submit & Open').scrollIntoView().click(); + cy.contains('Submit & Open').scrollIntoView(); + cy.contains('Submit & Open').click(); cy.wait('@taskPost').then((interception) => { taskID = interception.response.body.id; expect(interception.response.statusCode).to.be.equal(201); @@ -125,7 +126,8 @@ context('Manipulations with skeletons', { scrollBehavior: false }, () => { cy.get('body').click(); cy.get('#cvat_canvas_shape_1').within(($el) => { cy.get('.cvat_canvas_skeleton_wrapping_rect').should('exist').and('not.be.visible'); - cy.wrap($el).trigger('mousemove').should('have.class', 'cvat_canvas_shape_activated'); + cy.wrap($el).trigger('mousemove'); + cy.wrap($el).should('have.class', 'cvat_canvas_shape_activated'); cy.get('.cvat_canvas_skeleton_wrapping_rect').should('exist').and('be.visible'); }); @@ -160,7 +162,8 @@ context('Manipulations with skeletons', { scrollBehavior: false }, () => { }); cy.get('body').trigger('keydown', { keyCode: 78, code: 'KeyN', shiftKey: true }); cy.get('.cvat-canvas-container') - .click(skeletonPosition.xtl + REDRAW_MARGIN, skeletonPosition.ytl + REDRAW_MARGIN) + .click(skeletonPosition.xtl + REDRAW_MARGIN, skeletonPosition.ytl + REDRAW_MARGIN); + cy.get('.cvat-canvas-container') .click(skeletonPosition.xbr + REDRAW_MARGIN, skeletonPosition.ybr + REDRAW_MARGIN); cy.get('.cvat-cursor-control').should('have.class', 'cvat-active-canvas-control'); cy.get('#cvat_canvas_shape_1').within(() => { @@ -186,7 +189,8 @@ context('Manipulations with skeletons', { scrollBehavior: false }, () => { cy.goCheckFrameNumber(splittingFrame); cy.get('.cvat-split-track-control').click(); - cy.get('#cvat_canvas_shape_1').click().click(); + cy.get('#cvat_canvas_shape_1').click(); + cy.get('#cvat_canvas_shape_1').click(); // check objects after splitting cy.get('#cvat_canvas_shape_1').should('not.exist'); diff --git a/tests/cypress/e2e/webhooks.js b/tests/cypress/e2e/features/webhooks.js similarity index 100% rename from tests/cypress/e2e/webhooks.js rename to tests/cypress/e2e/features/webhooks.js diff --git a/tests/nightly_cypress.config.js b/tests/nightly_cypress.config.js index 9999a4293..9a735f7a7 100644 --- a/tests/nightly_cypress.config.js +++ b/tests/nightly_cypress.config.js @@ -20,15 +20,16 @@ module.exports = defineConfig({ baseUrl: 'http://localhost:8080', specPattern: [ 'cypress/e2e/auth_page.js', - 'cypress/e2e/actions_tasks/*.js', - 'cypress/e2e/actions_tasks2/*.js', - 'cypress/e2e/actions_tasks3/*.js', - 'cypress/e2e/actions_objects/*.js', - 'cypress/e2e/actions_objects2/*.js', - 'cypress/e2e/issues_prs/*.js', - 'cypress/e2e/issues_prs2/*.js', - 'cypress/e2e/actions_projects_models/*.js', - 'cypress/e2e/actions_users/*.js', + 'cypress/e2e/features/*.js', + 'cypress/e2e/actions_tasks/**/*.js', + 'cypress/e2e/actions_tasks2/**/*.js', + 'cypress/e2e/actions_tasks3/**/*.js', + 'cypress/e2e/actions_objects/**/*.js', + 'cypress/e2e/actions_objects2/**/*.js', + 'cypress/e2e/issues_prs/**/*.js', + 'cypress/e2e/issues_prs2/**/*.js', + 'cypress/e2e/actions_users/**/*.js', + 'cypress/e2e/actions_projects_models/**/*.js', 'cypress/e2e/email_system/*.js', 'cypress/e2e/remove_users_tasks_projects_organizations.js', ], -- GitLab