Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2023-12-15 03:12:58 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2023-12-15 03:12:58 +0300
commit45465a1f217b65ee3b11870175f363afaf912eb9 (patch)
tree0f4103ad51619ed03fc47cc28e32df3fb57b5c0c /spec/frontend/diffs
parent046498496e140f96beb63ff45ec9b0bb9acdbdd3 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/frontend/diffs')
-rw-r--r--spec/frontend/diffs/components/diff_file_spec.js21
1 files changed, 21 insertions, 0 deletions
diff --git a/spec/frontend/diffs/components/diff_file_spec.js b/spec/frontend/diffs/components/diff_file_spec.js
index 90c42e6e5db..a9fbf4632ac 100644
--- a/spec/frontend/diffs/components/diff_file_spec.js
+++ b/spec/frontend/diffs/components/diff_file_spec.js
@@ -399,6 +399,27 @@ describe('DiffFile', () => {
});
});
+ describe('automatically collapsed generated file', () => {
+ beforeEach(() => {
+ makeFileAutomaticallyCollapsed(store);
+ const file = store.state.diffs.diffFiles[0];
+ Object.assign(store.state.diffs.diffFiles[0], {
+ ...file,
+ viewer: {
+ ...file.viewer,
+ generated: true,
+ },
+ });
+ });
+
+ it('should show the generated file warning with expansion button', () => {
+ expect(findDiffContentArea(wrapper).html()).toContain(
+ 'Generated files are collapsed by default. This behavior can be overriden via .gitattributes file if required.',
+ );
+ expect(findToggleButton(wrapper).exists()).toBe(true);
+ });
+ });
+
describe('not collapsed', () => {
beforeEach(() => {
makeFileOpenByDefault(store);