diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-12-16 03:09:40 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-12-16 03:09:40 +0300 |
commit | bfa34fc19c0f74dbbf7caa3063565ec77efe0999 (patch) | |
tree | b2570fe6b5feb3dcef60e74d41265f1bd2716049 /spec/frontend/ide | |
parent | d22c6f7410966b5288a8b8e904cd24758e9cec50 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/frontend/ide')
-rw-r--r-- | spec/frontend/ide/init_gitlab_web_ide_spec.js | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/spec/frontend/ide/init_gitlab_web_ide_spec.js b/spec/frontend/ide/init_gitlab_web_ide_spec.js index a4421855f10..36c7c54d080 100644 --- a/spec/frontend/ide/init_gitlab_web_ide_spec.js +++ b/spec/frontend/ide/init_gitlab_web_ide_spec.js @@ -9,6 +9,10 @@ import waitForPromises from 'helpers/wait_for_promises'; jest.mock('@gitlab/web-ide'); jest.mock('~/lib/utils/confirm_via_gl_modal/confirm_action'); jest.mock('~/lib/utils/create_and_submit_form'); +jest.mock('~/lib/utils/csrf', () => ({ + token: 'mock-csrf-token', + headerKey: 'mock-csrf-header', +})); const ROOT_ELEMENT_ID = 'ide'; const TEST_NONCE = 'test123nonce'; @@ -77,6 +81,10 @@ describe('ide/init_gitlab_web_ide', () => { ref: TEST_BRANCH_NAME, gitlabUrl: TEST_GITLAB_URL, nonce: TEST_NONCE, + httpHeaders: { + 'mock-csrf-header': 'mock-csrf-token', + 'X-Requested-With': 'XMLHttpRequest', + }, links: { userPreferences: TEST_USER_PREFERENCES_PATH, feedbackIssue: GITLAB_WEB_IDE_FEEDBACK_ISSUE, |