[Web IDE] Implement integration test for creating new files and directories in the Web IDE
Description
Implement an integration test that exercises uploading files, creating files, and creating directories in the Web IDE. The goal is migrating E2E tests implemented in the GitLab repository to the integration test frame in the Web IDE. For more information about this goal, see &18056 (closed).
See the acceptance criteria section for the specific behaviors that should be covered by the test.
Acceptance criteria
-
Assert that the Web IDE raises an Error when the user attempts to create a file that already exists - https://gitlab.com/gitlab-org/gitlab/-/quality/test_cases/432899 -
Assert that the Web IDE raises an Error when the user attempts to create a directory that already exists - https://gitlab.com/gitlab-org/gitlab/-/quality/test_cases/432899 -
Assert that the Web IDE shows an alert when trying to close the Web Browser tab with unsaved changed - https://gitlab.com/gitlab-org/gitlab/-/quality/test_cases/411298 -
Assert the user can upload a text file - https://gitlab.com/gitlab-org/gitlab/-/quality/test_cases/390007. -
Assert the user can upload an image file - https://gitlab.com/gitlab-org/gitlab/-/quality/test_cases/390007. -
Assert that the Web IDE raises an Error when the user attempts to upload a file that already exists - https://gitlab.com/gitlab-org/gitlab/-/quality/test_cases/390005
Implementation plan
- Encapsulate locators in component classes.
- Mock API request that creates a commit in a new branch.
- Mock API request that creates merge request.
Edited by Enrique Alcántara