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:
Diffstat (limited to 'spec/frontend/pages/projects/learn_gitlab/components')
-rw-r--r--spec/frontend/pages/projects/learn_gitlab/components/__snapshots__/learn_gitlab_a_spec.js.snap66
-rw-r--r--spec/frontend/pages/projects/learn_gitlab/components/__snapshots__/learn_gitlab_b_spec.js.snap66
-rw-r--r--spec/frontend/pages/projects/learn_gitlab/components/learn_gitlab_a_spec.js63
-rw-r--r--spec/frontend/pages/projects/learn_gitlab/components/learn_gitlab_b_spec.js63
4 files changed, 258 insertions, 0 deletions
diff --git a/spec/frontend/pages/projects/learn_gitlab/components/__snapshots__/learn_gitlab_a_spec.js.snap b/spec/frontend/pages/projects/learn_gitlab/components/__snapshots__/learn_gitlab_a_spec.js.snap
new file mode 100644
index 00000000000..c9141d13a46
--- /dev/null
+++ b/spec/frontend/pages/projects/learn_gitlab/components/__snapshots__/learn_gitlab_a_spec.js.snap
@@ -0,0 +1,66 @@
+// Jest Snapshot v1, https://goo.gl/fbAQLP
+
+exports[`Learn GitLab Design A should render the loading state 1`] = `
+<ul>
+ <li>
+ <span>
+ Create a repository
+ </span>
+ </li>
+ <li>
+ <span>
+ Invite your colleagues
+ </span>
+ </li>
+ <li>
+ <span>
+ Set-up CI/CD
+ </span>
+ </li>
+ <li>
+ <span>
+ <gl-link-stub
+ href="http://example.com/"
+ >
+ Start a free trial of GitLab Gold
+ </gl-link-stub>
+ </span>
+ </li>
+ <li>
+ <span>
+ <gl-link-stub
+ href="http://example.com/"
+ >
+ Add code owners
+ </gl-link-stub>
+ </span>
+ </li>
+ <li>
+ <span>
+ <gl-link-stub
+ href="http://example.com/"
+ >
+ Enable require merge approvals
+ </gl-link-stub>
+ </span>
+ </li>
+ <li>
+ <span>
+ <gl-link-stub
+ href="http://example.com/"
+ >
+ Submit a merge request (MR)
+ </gl-link-stub>
+ </span>
+ </li>
+ <li>
+ <span>
+ <gl-link-stub
+ href="http://example.com/"
+ >
+ Run a Security scan using CI/CD
+ </gl-link-stub>
+ </span>
+ </li>
+</ul>
+`;
diff --git a/spec/frontend/pages/projects/learn_gitlab/components/__snapshots__/learn_gitlab_b_spec.js.snap b/spec/frontend/pages/projects/learn_gitlab/components/__snapshots__/learn_gitlab_b_spec.js.snap
new file mode 100644
index 00000000000..85e3b675e5b
--- /dev/null
+++ b/spec/frontend/pages/projects/learn_gitlab/components/__snapshots__/learn_gitlab_b_spec.js.snap
@@ -0,0 +1,66 @@
+// Jest Snapshot v1, https://goo.gl/fbAQLP
+
+exports[`Learn GitLab Design B should render the loading state 1`] = `
+<ul>
+ <li>
+ <span>
+ Create a repository
+ </span>
+ </li>
+ <li>
+ <span>
+ Invite your colleagues
+ </span>
+ </li>
+ <li>
+ <span>
+ Set-up CI/CD
+ </span>
+ </li>
+ <li>
+ <span>
+ <gl-link-stub
+ href="http://example.com/"
+ >
+ Start a free trial of GitLab Gold
+ </gl-link-stub>
+ </span>
+ </li>
+ <li>
+ <span>
+ <gl-link-stub
+ href="http://example.com/"
+ >
+ Add code owners
+ </gl-link-stub>
+ </span>
+ </li>
+ <li>
+ <span>
+ <gl-link-stub
+ href="http://example.com/"
+ >
+ Enable require merge approvals
+ </gl-link-stub>
+ </span>
+ </li>
+ <li>
+ <span>
+ <gl-link-stub
+ href="http://example.com/"
+ >
+ Submit a merge request (MR)
+ </gl-link-stub>
+ </span>
+ </li>
+ <li>
+ <span>
+ <gl-link-stub
+ href="http://example.com/"
+ >
+ Run a Security scan using CI/CD
+ </gl-link-stub>
+ </span>
+ </li>
+</ul>
+`;
diff --git a/spec/frontend/pages/projects/learn_gitlab/components/learn_gitlab_a_spec.js b/spec/frontend/pages/projects/learn_gitlab/components/learn_gitlab_a_spec.js
new file mode 100644
index 00000000000..ddc5339e7e0
--- /dev/null
+++ b/spec/frontend/pages/projects/learn_gitlab/components/learn_gitlab_a_spec.js
@@ -0,0 +1,63 @@
+import { shallowMount } from '@vue/test-utils';
+import { extendedWrapper } from 'helpers/vue_test_utils_helper';
+import LearnGitlabA from '~/pages/projects/learn_gitlab/components/learn_gitlab_a.vue';
+
+const TEST_ACTIONS = {
+ gitWrite: {
+ url: 'http://example.com/',
+ completed: true,
+ },
+ userAdded: {
+ url: 'http://example.com/',
+ completed: true,
+ },
+ pipelineCreated: {
+ url: 'http://example.com/',
+ completed: true,
+ },
+ trialStarted: {
+ url: 'http://example.com/',
+ completed: false,
+ },
+ codeOwnersEnabled: {
+ url: 'http://example.com/',
+ completed: false,
+ },
+ requiredMrApprovalsEnabled: {
+ url: 'http://example.com/',
+ completed: false,
+ },
+ mergeRequestCreated: {
+ url: 'http://example.com/',
+ completed: false,
+ },
+ securityScanEnabled: {
+ url: 'http://example.com/',
+ completed: false,
+ },
+};
+
+describe('Learn GitLab Design A', () => {
+ let wrapper;
+
+ afterEach(() => {
+ wrapper.destroy();
+ wrapper = null;
+ });
+
+ const createWrapper = () => {
+ wrapper = extendedWrapper(
+ shallowMount(LearnGitlabA, {
+ propsData: {
+ actions: TEST_ACTIONS,
+ },
+ }),
+ );
+ };
+
+ it('should render the loading state', () => {
+ createWrapper();
+
+ expect(wrapper.element).toMatchSnapshot();
+ });
+});
diff --git a/spec/frontend/pages/projects/learn_gitlab/components/learn_gitlab_b_spec.js b/spec/frontend/pages/projects/learn_gitlab/components/learn_gitlab_b_spec.js
new file mode 100644
index 00000000000..be4f5768402
--- /dev/null
+++ b/spec/frontend/pages/projects/learn_gitlab/components/learn_gitlab_b_spec.js
@@ -0,0 +1,63 @@
+import { shallowMount } from '@vue/test-utils';
+import { extendedWrapper } from 'helpers/vue_test_utils_helper';
+import LearnGitlabA from '~/pages/projects/learn_gitlab/components/learn_gitlab_a.vue';
+
+const TEST_ACTIONS = {
+ gitWrite: {
+ url: 'http://example.com/',
+ completed: true,
+ },
+ userAdded: {
+ url: 'http://example.com/',
+ completed: true,
+ },
+ pipelineCreated: {
+ url: 'http://example.com/',
+ completed: true,
+ },
+ trialStarted: {
+ url: 'http://example.com/',
+ completed: false,
+ },
+ codeOwnersEnabled: {
+ url: 'http://example.com/',
+ completed: false,
+ },
+ requiredMrApprovalsEnabled: {
+ url: 'http://example.com/',
+ completed: false,
+ },
+ mergeRequestCreated: {
+ url: 'http://example.com/',
+ completed: false,
+ },
+ securityScanEnabled: {
+ url: 'http://example.com/',
+ completed: false,
+ },
+};
+
+describe('Learn GitLab Design B', () => {
+ let wrapper;
+
+ afterEach(() => {
+ wrapper.destroy();
+ wrapper = null;
+ });
+
+ const createWrapper = () => {
+ wrapper = extendedWrapper(
+ shallowMount(LearnGitlabA, {
+ propsData: {
+ actions: TEST_ACTIONS,
+ },
+ }),
+ );
+ };
+
+ it('should render the loading state', () => {
+ createWrapper();
+
+ expect(wrapper.element).toMatchSnapshot();
+ });
+});