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/javascripts/pipelines/graph/job_group_dropdown_spec.js')
-rw-r--r--spec/javascripts/pipelines/graph/job_group_dropdown_spec.js85
1 files changed, 0 insertions, 85 deletions
diff --git a/spec/javascripts/pipelines/graph/job_group_dropdown_spec.js b/spec/javascripts/pipelines/graph/job_group_dropdown_spec.js
deleted file mode 100644
index a3957f94caa..00000000000
--- a/spec/javascripts/pipelines/graph/job_group_dropdown_spec.js
+++ /dev/null
@@ -1,85 +0,0 @@
-import Vue from 'vue';
-import mountComponent from 'spec/helpers/vue_mount_component_helper';
-import JobGroupDropdown from '~/pipelines/components/graph/job_group_dropdown.vue';
-
-describe('job group dropdown component', () => {
- const Component = Vue.extend(JobGroupDropdown);
- let vm;
-
- const group = {
- jobs: [
- {
- id: 4256,
- name: '<img src=x onerror=alert(document.domain)>',
- status: {
- icon: 'status_success',
- text: 'passed',
- label: 'passed',
- tooltip: 'passed',
- group: 'success',
- details_path: '/root/ci-mock/builds/4256',
- has_details: true,
- action: {
- icon: 'retry',
- title: 'Retry',
- path: '/root/ci-mock/builds/4256/retry',
- method: 'post',
- },
- },
- },
- {
- id: 4299,
- name: 'test',
- status: {
- icon: 'status_success',
- text: 'passed',
- label: 'passed',
- tooltip: 'passed',
- group: 'success',
- details_path: '/root/ci-mock/builds/4299',
- has_details: true,
- action: {
- icon: 'retry',
- title: 'Retry',
- path: '/root/ci-mock/builds/4299/retry',
- method: 'post',
- },
- },
- },
- ],
- name: 'rspec:linux',
- size: 2,
- status: {
- icon: 'status_success',
- text: 'passed',
- label: 'passed',
- tooltip: 'passed',
- group: 'success',
- details_path: '/root/ci-mock/builds/4256',
- has_details: true,
- action: {
- icon: 'retry',
- title: 'Retry',
- path: '/root/ci-mock/builds/4256/retry',
- method: 'post',
- },
- },
- };
-
- afterEach(() => {
- vm.$destroy();
- });
-
- beforeEach(() => {
- vm = mountComponent(Component, { group });
- });
-
- it('renders button with group name and size', () => {
- expect(vm.$el.querySelector('button').textContent).toContain(group.name);
- expect(vm.$el.querySelector('button').textContent).toContain(group.size);
- });
-
- it('renders dropdown with jobs', () => {
- expect(vm.$el.querySelectorAll('.scrollable-menu>ul>li').length).toEqual(group.jobs.length);
- });
-});