Add QA test to download merge request patch/diffs
What does this MR do?
Automates end-to-end tests for downloading merge request patch/diffs. This corresponds to functionality represented in the download button (cloud with downward facing arrow) for open merge requests.
Current approach for implementing tests:
- Log in as root user
- Create merge request
and verify merge request content - Get the link to the downloaded patch or diff file
- View the link to the downloaded patch or diff file in a new page
- Verify file content in the page
Open issue to address before merging:
-
Should automating the download functionality be implemented for this test?Resolved, viewing the patch/diff is sufficient based on the comments below.
The dropdown to download patch/diff files in a browser reference a hyperlink element with a download attribute. This hyperlink can be retrieved and opened in a new page, which achieves the same result as downloading patch/diff files without much effort. However, the tests as-is do not use the download option as the UI does, which would take more effort to automate. One thing to note is that the browser provides the option to open the downloaded file as a link in a new tab or window by right clicking on this button through the UI.
What are the relevant issue numbers?
https://gitlab.com/gitlab-org/gitlab-ce/issues/57693
https://gitlab.com/gitlab-org/gitlab-ce/issues/57589
Does this MR meet the acceptance criteria?
-
Changelog entry added, if necessary -
Documentation created/updated via this MR -
Documentation reviewed by technical writer or follow-up review issue created -
Tests added for this feature/bug -
Tested in all supported browsers -
Conforms to the code review guidelines -
Conforms to the merge request performance guidelines -
Conforms to the style guides -
Conforms to the database guides -
Link to e2e tests MR added if this MR has Requires e2e tests label. See the Test Planning Process. -
Security reports checked/validated by reviewer