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 test. Collapse sidebar. Fullscreen. #3302

Merged

Conversation

dvkruchinin
Copy link
Contributor

Motivation and context

Cypress test for PR #3289
An additional plugin for Cypress is installed for correct interaction with the fullscreen activation button.
Otherwise, I would get an error

Failed to execute 'requestFullscreen' on 'Element': API can only be initiated by a user gesture.
onClick @ right-group.tsx:150

Uncaught (in promise) TypeError: fullscreen error
    at onClick (cvat-ui.48af1c4a35bbdd68752d.min.js:435)
    at Q (cvat-ui.48af1c4a35bbdd68752d.min.js:24)
    at Object.s (cvat-ui.48af1c4a35bbdd68752d.min.js:352)
    at p (cvat-ui.48af1c4a35bbdd68752d.min.js:352)
    at cvat-ui.48af1c4a35bbdd68752d.min.js:352
    at v (cvat-ui.48af1c4a35bbdd68752d.min.js:352)
    at it (cvat-ui.48af1c4a35bbdd68752d.min.js:352)
    at at (cvat-ui.48af1c4a35bbdd68752d.min.js:352)
    at st (cvat-ui.48af1c4a35bbdd68752d.min.js:352)
    at pt (cvat-ui.48af1c4a35bbdd68752d.min.js:352)

The test must also be run in the headed mode for the fullscreen to work correctly. To do this, I put it in the directory where the tests are run in the headed mode.

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

@dvkruchinin dvkruchinin requested a review from azhavoro as a code owner June 8, 2021 13:34
@bsekachev
Copy link
Member

@dvkruchinin

Actually, we do not need exactly fullscreen in this test. Just need to resize the browser window anyhow. Is cypress able to do it?
Maybe manual raising a "resize" event would be a solution also.

@bsekachev bsekachev self-assigned this Jun 8, 2021
@dvkruchinin
Copy link
Contributor Author

Actually, we do not need exactly fullscreen in this test. Just need to resize the browser window anyhow. Is cypress able to do it?

Thanks. I reworked the test using resizing by means of viewport().

@bsekachev
Copy link
Member

@dvkruchinin
actions_tasks3/case_44_changing_default_value_for_attribute.js fails often because of an element detached from DOM. Could you please look into it?

@dvkruchinin
Copy link
Contributor Author

actions_tasks3/case_44_changing_default_value_for_attribute.js fails often because of an element detached from DOM. Could you please look into it?

This is a known problem. Attempts have already been made to solve it. I will create a separate task for further study of the problem.

@bsekachev bsekachev merged commit 2dc6498 into cvat-ai:develop Jun 9, 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.

2 participants