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-06-20 13:43:29 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2023-06-20 13:43:29 +0300
commit3b1af5cc7ed2666ff18b718ce5d30fa5a2756674 (patch)
tree3bc4a40e0ee51ec27eabf917c537033c0c5b14d4 /spec/frontend_integration
parent9bba14be3f2c211bf79e15769cd9b77bc73a13bc (diff)
Add latest changes from gitlab-org/gitlab@16-1-stable-eev16.1.0-rc42
Diffstat (limited to 'spec/frontend_integration')
-rw-r--r--spec/frontend_integration/diffs/diffs_interopability_spec.js29
1 files changed, 21 insertions, 8 deletions
diff --git a/spec/frontend_integration/diffs/diffs_interopability_spec.js b/spec/frontend_integration/diffs/diffs_interopability_spec.js
index 5017fb8c49d..c5bd77adf8f 100644
--- a/spec/frontend_integration/diffs/diffs_interopability_spec.js
+++ b/spec/frontend_integration/diffs/diffs_interopability_spec.js
@@ -3,6 +3,7 @@ import setWindowLocation from 'helpers/set_window_location_helper';
import { TEST_HOST } from 'helpers/test_constants';
import { stubPerformanceWebAPI } from 'helpers/performance';
import initDiffsApp from '~/diffs';
+import { initMrStateLazyLoad } from '~/mr_notes/init';
import { createStore } from '~/mr_notes/stores';
import {
getDiffCodePart,
@@ -53,23 +54,35 @@ const startDiffsApp = () => {
endpointBatch: `${TEST_BASE_URL}diffs_batch.json`,
projectPath: TEST_PROJECT_PATH,
helpPagePath: '/help',
- currentUserData: 'null',
+ currentUserData: '{}',
changesEmptyStateIllustration: '',
isFluidLayout: 'false',
dismissEndpoint: '',
showSuggestPopover: 'false',
showWhitespaceDefault: 'true',
- viewDiffsFileByFile: 'false',
+ fileByFileDefault: 'false',
defaultSuggestionCommitMessage: 'Lorem ipsum',
});
- const store = createStore();
-
- const vm = initDiffsApp(store);
+ const notesEl = document.createElement('div');
+ notesEl.id = 'js-vue-mr-discussions';
+ document.body.appendChild(notesEl);
+ Object.assign(notesEl.dataset, {
+ noteableData: '{ "current_user": {} }',
+ notesData: '{}',
+ currentUserData: '{}',
+ });
- store.dispatch('setActiveTab', 'diffs');
+ window.mrTabs = {
+ getCurrentAction: () => 'diffs',
+ eventHub: {
+ $on() {},
+ },
+ };
+ const store = createStore();
+ initMrStateLazyLoad(store);
- return vm;
+ return initDiffsApp(store);
};
describe('diffs third party interoperability', () => {
@@ -117,7 +130,7 @@ describe('diffs third party interoperability', () => {
${'parallel view right side'} | ${'parallel'} | ${'.diff-tr.line_holder'} | ${'.diff-td.line_content.right-side'} | ${EXPECT_PARALLEL_RIGHT_SIDE}
`('$desc', ({ view, rowSelector, codeSelector, expectation }) => {
beforeEach(async () => {
- setWindowLocation(`${TEST_HOST}/${TEST_BASE_URL}/diffs?view=${view}`);
+ setWindowLocation(`${TEST_HOST}${TEST_BASE_URL}diffs?view=${view}`);
vm = startDiffsApp();