Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cypress. Fix case "Image rotate" for Firefox. #2857

Conversation

dvkruchinin
Copy link
Contributor

Motivation and context

Patches are designed to solve the error

<div class="ant-popover cvat-rotate-canvas-popover ant-popover-placement-right " style="left: 40px; top: 202px; transform-origin: -4px 50% 0px; pointer-events: none;">...</div>
          pointer-events: none` prevents user mouse interaction.

when running the test by Firefox with headless mode.
Link to check: https://github.com/dvkruchinin/cvat/actions/runs/595622158

How has this been tested?

Checklist

License

  • I submit my code changes under the same MIT License that covers the project.
    Feel free to contact the maintainers if that's a concern.
  • I have updated the license header for each file (see an example below)
# Copyright (C) 2021 Intel Corporation
#
# SPDX-License-Identifier: MIT

@coveralls
Copy link

coveralls commented Feb 24, 2021

Coverage Status

Coverage decreased (-0.02%) to 70.992% when pulling ad28f8e on dvkruchinin:dkru/cypress-case-5-image-rotate-fix-for-firefox into 88f494a on openvinotoolkit:develop.

@@ -31,7 +32,8 @@ context('Check if the image is rotated', () => {
.then(($styles) => {
scaleAfter = Number($styles.match(/scale\((\d\.\d+)\)/m)[1]);
cy.expect(scaleBefore).to.be.greaterThan(scaleAfter);
cy.get('#cvat_canvas_content').dblclick();
cy.get('#cvat_canvas_content').dblclick().wait(500);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not 300 or 10000?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reduced the waiting time. Also separated this behavior depending on the browser. This time was revealed when checking the passing of the test in CI when using the Firefox browser. At the moment, the Cypress repository has an open issue on the issue of different test results in the Firefox browser in headless mode and without it. cypress-io/cypress#8610
If necessary, can I open a separate issue and specify the CVAT repository to reproduce the error?

@dvkruchinin dvkruchinin force-pushed the dkru/cypress-case-5-image-rotate-fix-for-firefox branch from 7cd7e9b to ca6eeff Compare February 24, 2021 15:33
@bsekachev
Copy link
Member

bsekachev commented Feb 24, 2021

@dvkruchinin

What is wrong with this test? It works for me in current implementation (Firefox 85, headless, antd 4.12).
Generally speaking, I am not sure we should rely on magic timeouts when testing UI.

@dvkruchinin
Copy link
Contributor Author

@dvkruchinin

What is wrong with this test? It works for me in current implementation (Firefox 85, headless, antd 4.12).
Generally speaking, I am not sure we should rely on magic timeouts when testing UI.

This test does not always fail. But in CI-nightly, it is steadily falling. I will try to consider other solutions.

…o dkru/cypress-case-5-image-rotate-fix-for-firefox
Add an additional click on the canvas for hide the popover.
@dvkruchinin
Copy link
Contributor Author

dvkruchinin commented Feb 25, 2021

Re-worked the test. Removed wait() and added an extra click on the canvas to hide the popover before scaling the image.

@bsekachev
Copy link
Member

@dvkruchinin

Great, thanks!

@bsekachev bsekachev merged commit 1e33901 into cvat-ai:develop Feb 25, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants