diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-02-13 09:08:52 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-02-13 09:08:52 +0000 |
commit | f0707f413ce49b5712fca236b950acbec029be1e (patch) | |
tree | e28b49d89d4cf2422ee0066600c0ea045dcf7669 /spec | |
parent | 31a49d924418aa9983ae30be28e6e304a30939e1 (diff) | |
download | gitlab-ce-f0707f413ce49b5712fca236b950acbec029be1e.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec')
4 files changed, 124 insertions, 19 deletions
diff --git a/spec/features/projects/pipelines/pipeline_spec.rb b/spec/features/projects/pipelines/pipeline_spec.rb index 8d9a397de9a..63c0695fe95 100644 --- a/spec/features/projects/pipelines/pipeline_spec.rb +++ b/spec/features/projects/pipelines/pipeline_spec.rb @@ -359,13 +359,27 @@ describe 'Pipeline', :js do context 'test tabs' do let(:pipeline) { create(:ci_pipeline, :with_test_reports, project: project) } - it 'shows badge counter in Tests tab' do + before do visit_pipeline wait_for_requests + end + it 'shows badge counter in Tests tab' do expect(pipeline.test_reports.total_count).to eq(4) expect(page.find('.js-test-report-badge-counter').text).to eq(pipeline.test_reports.total_count.to_s) end + + it 'does not call test_report.json endpoint by default', :js do + expect(page).to have_selector('.js-no-tests-to-show', visible: :all) + end + + it 'does call test_report.json endpoint when tab is selected', :js do + find('.js-tests-tab-link').click + wait_for_requests + + expect(page).to have_content('Test suites') + expect(page).to have_selector('.js-tests-detail', visible: :all) + end end context 'retrying jobs' do diff --git a/spec/fixtures/lib/gitlab/import_export/group_exports/complex/group.json b/spec/fixtures/lib/gitlab/import_export/group_exports/complex/group.json index 6403b5fa080..7cd91ff225b 100644 --- a/spec/fixtures/lib/gitlab/import_export/group_exports/complex/group.json +++ b/spec/fixtures/lib/gitlab/import_export/group_exports/complex/group.json @@ -260,25 +260,101 @@ ], "boards": [ { - "id": 56, + "id": 173, "project_id": null, - "created_at": "2019-11-20T17:27:16.808Z", - "updated_at": "2019-11-20T17:27:16.808Z", - "name": "Development", + "created_at": "2020-02-11T14:35:51.561Z", + "updated_at": "2020-02-11T14:35:51.561Z", + "name": "first board", "milestone_id": null, "group_id": 4351, "weight": null, - "labels": [] - }, - { - "id": 57, - "project_id": null, - "created_at": "2019-11-20T17:27:41.118Z", - "updated_at": "2019-11-20T17:27:41.118Z", - "name": "Board!", - "milestone_id": 7638, - "group_id": 4351, - "weight": null, + "lists": [ + { + "id": 189, + "board_id": 173, + "label_id": 271, + "list_type": "label", + "position": 0, + "created_at": "2020-02-11T14:35:57.131Z", + "updated_at": "2020-02-11T14:35:57.131Z", + "user_id": null, + "milestone_id": null, + "max_issue_count": 0, + "max_issue_weight": 0, + "label": { + "id": 271, + "title": "TSL", + "color": "#58796f", + "project_id": null, + "created_at": "2019-11-20T17:02:20.541Z", + "updated_at": "2020-02-06T15:44:52.048Z", + "template": false, + "description": null, + "group_id": 4351, + "type": "GroupLabel", + "priorities": [] + }, + "board": { + "id": 173, + "project_id": null, + "created_at": "2020-02-11T14:35:51.561Z", + "updated_at": "2020-02-11T14:35:51.561Z", + "name": "hi", + "milestone_id": null, + "group_id": 4351, + "weight": null + } + }, + { + "id": 190, + "board_id": 173, + "label_id": 272, + "list_type": "label", + "position": 1, + "created_at": "2020-02-11T14:35:57.868Z", + "updated_at": "2020-02-11T14:35:57.868Z", + "user_id": null, + "milestone_id": null, + "max_issue_count": 0, + "max_issue_weight": 0, + "label": { + "id": 272, + "title": "Sosync", + "color": "#110320", + "project_id": null, + "created_at": "2019-11-20T17:02:20.532Z", + "updated_at": "2020-02-06T15:44:52.057Z", + "template": false, + "description": null, + "group_id": 4351, + "type": "GroupLabel", + "priorities": [] + }, + "board": { + "id": 173, + "project_id": null, + "created_at": "2020-02-11T14:35:51.561Z", + "updated_at": "2020-02-11T14:35:51.561Z", + "name": "hi", + "milestone_id": null, + "group_id": 4351, + "weight": null + } + }, + { + "id": 188, + "board_id": 173, + "label_id": null, + "list_type": "closed", + "position": null, + "created_at": "2020-02-11T14:35:51.593Z", + "updated_at": "2020-02-11T14:35:51.593Z", + "user_id": null, + "milestone_id": null, + "max_issue_count": 0, + "max_issue_weight": 0 + } + ], "labels": [] } ], diff --git a/spec/lib/gitlab/import_export/group_tree_restorer_spec.rb b/spec/lib/gitlab/import_export/group_tree_restorer_spec.rb index 0d9b07ffaf0..4d52f1fdda3 100644 --- a/spec/lib/gitlab/import_export/group_tree_restorer_spec.rb +++ b/spec/lib/gitlab/import_export/group_tree_restorer_spec.rb @@ -39,8 +39,18 @@ describe Gitlab::ImportExport::GroupTreeRestorer do expect(@group.labels.count).to eq(10) end - it 'has issue boards' do - expect(@group.boards.count).to eq(2) + context 'issue boards' do + it 'has issue boards' do + expect(@group.boards.count).to eq(1) + end + + it 'has board label lists' do + lists = @group.boards.find_by(name: 'first board').lists + + expect(lists.count).to eq(3) + expect(lists.first.label.title).to eq('TSL') + expect(lists.second.label.title).to eq('Sosync') + end end it 'has badges' do diff --git a/spec/lib/gitlab/import_export/group_tree_saver_spec.rb b/spec/lib/gitlab/import_export/group_tree_saver_spec.rb index b856441981a..17538db3c68 100644 --- a/spec/lib/gitlab/import_export/group_tree_saver_spec.rb +++ b/spec/lib/gitlab/import_export/group_tree_saver_spec.rb @@ -95,6 +95,10 @@ describe Gitlab::ImportExport::GroupTreeSaver do expect(saved_group_json['boards']).not_to be_empty end + it 'has board label list' do + expect(saved_group_json['boards'].first['lists']).not_to be_empty + end + it 'has group members' do expect(saved_group_json['members']).not_to be_empty end @@ -168,7 +172,8 @@ describe Gitlab::ImportExport::GroupTreeSaver do create(:group_badge, group: group) group_label = create(:group_label, group: group) create(:label_priority, label: group_label, priority: 1) - create(:board, group: group) + board = create(:board, group: group) + create(:list, board: board, label: group_label) create(:group_badge, group: group) group |