summaryrefslogtreecommitdiff
path: root/spec/frontend/pipelines/notification/mock_data.js
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2022-02-18 09:45:46 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2022-02-18 09:45:46 +0000
commita7b3560714b4d9cc4ab32dffcd1f74a284b93580 (patch)
tree7452bd5c3545c2fa67a28aa013835fb4fa071baf /spec/frontend/pipelines/notification/mock_data.js
parentee9173579ae56a3dbfe5afe9f9410c65bb327ca7 (diff)
downloadgitlab-ce-a7b3560714b4d9cc4ab32dffcd1f74a284b93580.tar.gz
Add latest changes from gitlab-org/gitlab@14-8-stable-eev14.8.0-rc42
Diffstat (limited to 'spec/frontend/pipelines/notification/mock_data.js')
-rw-r--r--spec/frontend/pipelines/notification/mock_data.js33
1 files changed, 33 insertions, 0 deletions
diff --git a/spec/frontend/pipelines/notification/mock_data.js b/spec/frontend/pipelines/notification/mock_data.js
new file mode 100644
index 00000000000..e36f391a854
--- /dev/null
+++ b/spec/frontend/pipelines/notification/mock_data.js
@@ -0,0 +1,33 @@
+const randomWarning = {
+ content: 'another random warning',
+ id: 'gid://gitlab/Ci::PipelineMessage/272',
+};
+
+const rootTypeWarning = {
+ content: 'root `types` will be removed in 15.0.',
+ id: 'gid://gitlab/Ci::PipelineMessage/273',
+};
+
+const typeWarning = {
+ content: '`type` will be removed in 15.0.',
+ id: 'gid://gitlab/Ci::PipelineMessage/274',
+};
+
+function createWarningMock(warnings) {
+ return {
+ data: {
+ project: {
+ id: 'gid://gitlab/Project/28"',
+ pipeline: {
+ id: 'gid://gitlab/Ci::Pipeline/183',
+ warningMessages: warnings,
+ },
+ },
+ },
+ };
+}
+
+export const mockWarningsWithoutDeprecation = createWarningMock([randomWarning]);
+export const mockWarningsRootType = createWarningMock([rootTypeWarning]);
+export const mockWarningsType = createWarningMock([typeWarning]);
+export const mockWarningsTypesAll = createWarningMock([rootTypeWarning, typeWarning]);