Add latest changes from gitlab-org/gitlab@master
This commit is contained in:
parent
ba2d791767
commit
bf10fcacaa
|
@ -167,7 +167,12 @@ export default {
|
||||||
</template>
|
</template>
|
||||||
</user-callout-dismisser>
|
</user-callout-dismisser>
|
||||||
|
|
||||||
<gl-tabs content-class="gl-pt-0" sync-active-tab-with-query-params lazy>
|
<gl-tabs
|
||||||
|
content-class="gl-pt-0"
|
||||||
|
data-qa-selector="security_configuration_container"
|
||||||
|
sync-active-tab-with-query-params
|
||||||
|
lazy
|
||||||
|
>
|
||||||
<gl-tab
|
<gl-tab
|
||||||
data-testid="security-testing-tab"
|
data-testid="security-testing-tab"
|
||||||
:title="$options.i18n.securityTesting"
|
:title="$options.i18n.securityTesting"
|
||||||
|
|
|
@ -32,7 +32,9 @@ module Pages
|
||||||
|
|
||||||
{
|
{
|
||||||
type: 'zip',
|
type: 'zip',
|
||||||
path: deployment.file.url_or_file_path(expire_at: 1.day.from_now),
|
path: deployment.file.url_or_file_path(
|
||||||
|
expire_at: ::Gitlab::Pages::CacheControl::DEPLOYMENT_EXPIRATION.from_now
|
||||||
|
),
|
||||||
global_id: global_id,
|
global_id: global_id,
|
||||||
sha256: deployment.file_sha256,
|
sha256: deployment.file_sha256,
|
||||||
file_size: deployment.size,
|
file_size: deployment.size,
|
||||||
|
|
|
@ -26,6 +26,7 @@ module Gitlab
|
||||||
RefreshImportJidWorker.perform_in_the_future(project.id, jid)
|
RefreshImportJidWorker.perform_in_the_future(project.id, jid)
|
||||||
|
|
||||||
info(project.id, message: "starting importer", importer: 'Importer::RepositoryImporter')
|
info(project.id, message: "starting importer", importer: 'Importer::RepositoryImporter')
|
||||||
|
|
||||||
importer = Importer::RepositoryImporter.new(project, client)
|
importer = Importer::RepositoryImporter.new(project, client)
|
||||||
|
|
||||||
importer.execute
|
importer.execute
|
||||||
|
|
|
@ -306,6 +306,11 @@ To create a custom configuration, you can use passthrough chains. Passthroughs c
|
||||||
to build more complex configurations. For more details, see
|
to build more complex configurations. For more details, see
|
||||||
[SAST Customize ruleset](../sast/customize_rulesets.md).
|
[SAST Customize ruleset](../sast/customize_rulesets.md).
|
||||||
|
|
||||||
|
Only the following passthrough types are supported by the `secrets` analyzer:
|
||||||
|
|
||||||
|
- `file`
|
||||||
|
- `raw`
|
||||||
|
|
||||||
In the `secret-detection-ruleset.toml` file, do one of the following:
|
In the `secret-detection-ruleset.toml` file, do one of the following:
|
||||||
|
|
||||||
- Define a custom ruleset, for example:
|
- Define a custom ruleset, for example:
|
||||||
|
|
|
@ -59,7 +59,8 @@ module API
|
||||||
# Gitlab::Pages::CacheControl
|
# Gitlab::Pages::CacheControl
|
||||||
present_cached virtual_domain,
|
present_cached virtual_domain,
|
||||||
cache_context: nil,
|
cache_context: nil,
|
||||||
with: Entities::Internal::Pages::VirtualDomain
|
with: Entities::Internal::Pages::VirtualDomain,
|
||||||
|
expires_in: ::Gitlab::Pages::CacheControl::EXPIRE
|
||||||
else
|
else
|
||||||
present virtual_domain, with: Entities::Internal::Pages::VirtualDomain
|
present virtual_domain, with: Entities::Internal::Pages::VirtualDomain
|
||||||
end
|
end
|
||||||
|
|
|
@ -60,6 +60,10 @@ module Gitlab
|
||||||
work_item_type_id: issue.work_item_type_id
|
work_item_type_id: issue.work_item_type_id
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Issue.with_project_iid_supply(project) do |supply|
|
||||||
|
attributes[:iid] = supply.next_value
|
||||||
|
end
|
||||||
|
|
||||||
insert_and_return_id(attributes, project.issues)
|
insert_and_return_id(attributes, project.issues)
|
||||||
rescue ActiveRecord::InvalidForeignKey
|
rescue ActiveRecord::InvalidForeignKey
|
||||||
# It's possible the project has been deleted since scheduling this
|
# It's possible the project has been deleted since scheduling this
|
||||||
|
|
|
@ -5,6 +5,10 @@ module Gitlab
|
||||||
class CacheControl
|
class CacheControl
|
||||||
include Gitlab::Utils::StrongMemoize
|
include Gitlab::Utils::StrongMemoize
|
||||||
|
|
||||||
|
EXPIRE = 12.hours
|
||||||
|
# To avoid delivering expired deployment URL in the cached payload,
|
||||||
|
# use a longer expiration time in the deployment URL
|
||||||
|
DEPLOYMENT_EXPIRATION = (EXPIRE + 12.hours)
|
||||||
CACHE_KEY_FORMAT = 'pages_domain_for_%{type}_%{id}_%{settings}'
|
CACHE_KEY_FORMAT = 'pages_domain_for_%{type}_%{id}_%{settings}'
|
||||||
|
|
||||||
class << self
|
class << self
|
||||||
|
|
|
@ -9,6 +9,7 @@ module QA
|
||||||
include QA::Page::Settings::Common
|
include QA::Page::Settings::Common
|
||||||
|
|
||||||
view 'app/assets/javascripts/security_configuration/components/app.vue' do
|
view 'app/assets/javascripts/security_configuration/components/app.vue' do
|
||||||
|
element :security_configuration_container
|
||||||
element :security_configuration_history_link
|
element :security_configuration_history_link
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -17,6 +18,7 @@ module QA
|
||||||
element :sast_status, "`${feature.type}_status`" # rubocop:disable QA/ElementWithPattern
|
element :sast_status, "`${feature.type}_status`" # rubocop:disable QA/ElementWithPattern
|
||||||
element :sast_enable_button, "`${feature.type}_enable_button`" # rubocop:disable QA/ElementWithPattern
|
element :sast_enable_button, "`${feature.type}_enable_button`" # rubocop:disable QA/ElementWithPattern
|
||||||
element :dependency_scanning_mr_button, "`${feature.type}_mr_button`" # rubocop:disable QA/ElementWithPattern
|
element :dependency_scanning_mr_button, "`${feature.type}_mr_button`" # rubocop:disable QA/ElementWithPattern
|
||||||
|
element :license_scanning_status, "`${feature.type}_status`" # rubocop:disable QA/ElementWithPattern
|
||||||
end
|
end
|
||||||
|
|
||||||
view 'app/assets/javascripts/security_configuration/components/auto_dev_ops_alert.vue' do
|
view 'app/assets/javascripts/security_configuration/components/auto_dev_ops_alert.vue' do
|
||||||
|
@ -67,6 +69,18 @@ module QA
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def has_license_compliance_status?(status_text)
|
||||||
|
within_element(:license_scanning_status) do
|
||||||
|
has_text?(status_text)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
def has_no_license_compliance_status?(status_text)
|
||||||
|
within_element(:license_scanning_status) do
|
||||||
|
has_no_text?(status_text)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
def has_auto_devops_container?
|
def has_auto_devops_container?
|
||||||
has_element?(:autodevops_container)
|
has_element?(:autodevops_container)
|
||||||
end
|
end
|
||||||
|
@ -80,6 +94,18 @@ module QA
|
||||||
has_text?('Quickly enable all continuous testing and compliance tools by enabling Auto DevOps')
|
has_text?('Quickly enable all continuous testing and compliance tools by enabling Auto DevOps')
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def go_to_compliance_tab
|
||||||
|
go_to_tab('Compliance')
|
||||||
|
end
|
||||||
|
|
||||||
|
private
|
||||||
|
|
||||||
|
def go_to_tab(name)
|
||||||
|
within_element(:security_configuration_container) do
|
||||||
|
find('.nav-item', text: name).click
|
||||||
|
end
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -23,6 +23,7 @@ module QA
|
||||||
end
|
end
|
||||||
|
|
||||||
def initialize
|
def initialize
|
||||||
|
# Note: A Group Wiki Home page requires title = 'Home', otherwise when going /-/wikis, Rails will render a new page creation form.
|
||||||
@title = 'Home'
|
@title = 'Home'
|
||||||
@content = 'This wiki page is created via API'
|
@content = 'This wiki page is created via API'
|
||||||
end
|
end
|
||||||
|
|
|
@ -0,0 +1,95 @@
|
||||||
|
# frozen_string_literal: true
|
||||||
|
|
||||||
|
module QA
|
||||||
|
RSpec.describe 'Create' do
|
||||||
|
describe 'Testing wiki content creation inside a project' do
|
||||||
|
let(:new_wiki_title) { "just_another_wiki_page" }
|
||||||
|
let(:new_wiki_content) { "this content is changed or added" }
|
||||||
|
let(:commit_message) { "this is a new addition to the wiki" }
|
||||||
|
|
||||||
|
let(:project) { Resource::Project.fabricate_via_api! }
|
||||||
|
let(:wiki) { Resource::Wiki::ProjectPage.fabricate_via_api! }
|
||||||
|
|
||||||
|
before do
|
||||||
|
Flow::Login.sign_in
|
||||||
|
end
|
||||||
|
|
||||||
|
it 'by adding a home page to the wiki',
|
||||||
|
testcase: 'https://gitlab.com/gitlab-org/gitlab/-/quality/test_cases/347809' do
|
||||||
|
project.visit!
|
||||||
|
|
||||||
|
Page::Project::Menu.perform(&:click_wiki)
|
||||||
|
Page::Project::Wiki::Show.perform(&:click_create_your_first_page)
|
||||||
|
|
||||||
|
Page::Project::Wiki::Edit.perform do |edit|
|
||||||
|
edit.set_title new_wiki_title
|
||||||
|
edit.set_content new_wiki_content
|
||||||
|
edit.set_message commit_message
|
||||||
|
end
|
||||||
|
|
||||||
|
Page::Project::Wiki::Edit.perform(&:click_submit)
|
||||||
|
|
||||||
|
Page::Project::Wiki::Show.perform do |wiki|
|
||||||
|
expect(wiki).to have_title new_wiki_title
|
||||||
|
expect(wiki).to have_content new_wiki_content
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
it 'by adding a second page to the wiki',
|
||||||
|
testcase: 'https://gitlab.com/gitlab-org/gitlab/-/quality/test_cases/347808' do
|
||||||
|
wiki.visit!
|
||||||
|
|
||||||
|
Page::Project::Wiki::Show.perform(&:click_new_page)
|
||||||
|
|
||||||
|
Page::Project::Wiki::Edit.perform do |edit|
|
||||||
|
edit.set_title new_wiki_title
|
||||||
|
edit.set_content new_wiki_content
|
||||||
|
edit.set_message commit_message
|
||||||
|
end
|
||||||
|
|
||||||
|
Page::Project::Wiki::Edit.perform(&:click_submit)
|
||||||
|
|
||||||
|
Page::Project::Wiki::Show.perform do |wiki|
|
||||||
|
expect(wiki).to have_title new_wiki_title
|
||||||
|
expect(wiki).to have_content new_wiki_content
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
it 'by adding a home page to the wiki using git push',
|
||||||
|
testcase: 'https://gitlab.com/gitlab-org/gitlab/-/quality/test_cases/347806' do
|
||||||
|
empty_wiki = Resource::Wiki::ProjectPage.new do |empty_wiki|
|
||||||
|
empty_wiki.project = project
|
||||||
|
end
|
||||||
|
|
||||||
|
Resource::Repository::WikiPush.fabricate! do |push|
|
||||||
|
push.file_name = "#{new_wiki_title}.md"
|
||||||
|
push.file_content = new_wiki_content
|
||||||
|
push.commit_message = commit_message
|
||||||
|
push.wiki = empty_wiki
|
||||||
|
push.new_branch = true
|
||||||
|
end.visit!
|
||||||
|
|
||||||
|
Page::Project::Wiki::Show.perform do |wiki|
|
||||||
|
expect(wiki).to have_title new_wiki_title
|
||||||
|
expect(wiki).to have_content new_wiki_content
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
it 'by adding a second page to the wiki using git push',
|
||||||
|
testcase: 'https://gitlab.com/gitlab-org/gitlab/-/quality/test_cases/347807' do
|
||||||
|
Resource::Repository::WikiPush.fabricate! do |push|
|
||||||
|
push.file_name = "#{new_wiki_title}.md"
|
||||||
|
push.file_content = new_wiki_content
|
||||||
|
push.commit_message = commit_message
|
||||||
|
push.wiki = wiki
|
||||||
|
push.new_branch = false
|
||||||
|
end.visit!
|
||||||
|
|
||||||
|
Page::Project::Wiki::Show.perform do |wiki|
|
||||||
|
expect(wiki).to have_title new_wiki_title
|
||||||
|
expect(wiki).to have_content new_wiki_content
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
|
@ -0,0 +1,51 @@
|
||||||
|
# frozen_string_literal: true
|
||||||
|
|
||||||
|
module QA
|
||||||
|
RSpec.describe 'Create' do
|
||||||
|
describe 'Testing wiki content manipulation inside a project' do
|
||||||
|
let(:new_wiki_title) { "just_another_wiki_page" }
|
||||||
|
let(:new_wiki_content) { "this content is changed or added" }
|
||||||
|
let(:commit_message) { "this is a new addition to the wiki" }
|
||||||
|
|
||||||
|
let(:wiki) { Resource::Wiki::ProjectPage.fabricate_via_api! }
|
||||||
|
|
||||||
|
before do
|
||||||
|
Flow::Login.sign_in
|
||||||
|
end
|
||||||
|
|
||||||
|
it 'by manipulating content on the page',
|
||||||
|
testcase: 'https://gitlab.com/gitlab-org/gitlab/-/quality/test_cases/347810' do
|
||||||
|
wiki.visit!
|
||||||
|
|
||||||
|
Page::Project::Wiki::Show.perform(&:click_edit)
|
||||||
|
|
||||||
|
Page::Project::Wiki::Edit.perform do |edit|
|
||||||
|
edit.set_title new_wiki_title
|
||||||
|
edit.set_content new_wiki_content
|
||||||
|
edit.set_message commit_message
|
||||||
|
end
|
||||||
|
|
||||||
|
Page::Project::Wiki::Edit.perform(&:click_submit)
|
||||||
|
|
||||||
|
Page::Project::Wiki::Show.perform do |wiki|
|
||||||
|
expect(wiki).to have_title new_wiki_title
|
||||||
|
expect(wiki).to have_content new_wiki_content
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
it 'by manipulating content on the page using git push',
|
||||||
|
testcase: 'https://gitlab.com/gitlab-org/gitlab/-/quality/test_cases/347811' do
|
||||||
|
Resource::Repository::WikiPush.fabricate! do |push|
|
||||||
|
push.file_content = new_wiki_content
|
||||||
|
push.commit_message = commit_message
|
||||||
|
push.wiki = wiki
|
||||||
|
push.new_branch = false
|
||||||
|
end.visit!
|
||||||
|
|
||||||
|
Page::Project::Wiki::Show.perform do |wiki|
|
||||||
|
expect(wiki).to have_content new_wiki_content
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
module QA
|
module QA
|
||||||
RSpec.describe 'Create' do
|
RSpec.describe 'Create' do
|
||||||
context 'Wiki' do
|
describe 'A project wiki' do
|
||||||
let(:initial_wiki) { Resource::Wiki::ProjectPage.fabricate_via_api! }
|
let(:initial_wiki) { Resource::Wiki::ProjectPage.fabricate_via_api! }
|
||||||
let(:new_path) { "a/new/path-with-spaces" }
|
let(:new_path) { "a/new/path-with-spaces" }
|
||||||
|
|
||||||
|
@ -10,7 +10,8 @@ module QA
|
||||||
Flow::Login.sign_in
|
Flow::Login.sign_in
|
||||||
end
|
end
|
||||||
|
|
||||||
it 'has changed the directory', testcase: 'https://gitlab.com/gitlab-org/gitlab/-/quality/test_cases/347821' do
|
it 'can change the directory path of a page',
|
||||||
|
testcase: 'https://gitlab.com/gitlab-org/gitlab/-/quality/test_cases/347821' do
|
||||||
initial_wiki.visit!
|
initial_wiki.visit!
|
||||||
|
|
||||||
Page::Project::Wiki::Show.perform(&:click_edit)
|
Page::Project::Wiki::Show.perform(&:click_edit)
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
module QA
|
module QA
|
||||||
RSpec.describe 'Create', :reliable do
|
RSpec.describe 'Create', :reliable do
|
||||||
context 'Content Editor' do
|
describe 'Testing project wiki file upload' do
|
||||||
let(:initial_wiki) { Resource::Wiki::ProjectPage.fabricate_via_api! }
|
let(:initial_wiki) { Resource::Wiki::ProjectPage.fabricate_via_api! }
|
||||||
let(:page_title) { 'Content Editor Page' }
|
let(:page_title) { 'Content Editor Page' }
|
||||||
let(:heading_text) { 'My New Heading' }
|
let(:heading_text) { 'My New Heading' }
|
||||||
|
@ -16,7 +16,8 @@ module QA
|
||||||
initial_wiki.project.remove_via_api!
|
initial_wiki.project.remove_via_api!
|
||||||
end
|
end
|
||||||
|
|
||||||
it 'creates a formatted Wiki page with an image uploaded', testcase: 'https://gitlab.com/gitlab-org/gitlab/-/quality/test_cases/347640' do
|
it 'by creating a formatted page with an image uploaded',
|
||||||
|
testcase: 'https://gitlab.com/gitlab-org/gitlab/-/quality/test_cases/347640' do
|
||||||
initial_wiki.visit!
|
initial_wiki.visit!
|
||||||
|
|
||||||
Page::Project::Wiki::Show.perform(&:click_new_page)
|
Page::Project::Wiki::Show.perform(&:click_new_page)
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
module QA
|
module QA
|
||||||
RSpec.describe 'Create' do
|
RSpec.describe 'Create' do
|
||||||
context 'Wiki' do
|
describe 'Project Wiki' do
|
||||||
let(:small_number_of_pages) { 5 }
|
let(:small_number_of_pages) { 5 }
|
||||||
let(:large_number_of_pages) { 15 }
|
let(:large_number_of_pages) { 15 }
|
||||||
let(:random_page) { "bulk_#{rand(0..4)}" }
|
let(:random_page) { "bulk_#{rand(0..4)}" }
|
||||||
|
@ -14,8 +14,9 @@ module QA
|
||||||
Flow::Login.sign_in
|
Flow::Login.sign_in
|
||||||
end
|
end
|
||||||
|
|
||||||
context 'Sidebar' do
|
context 'with Wiki Sidebar' do
|
||||||
it 'has all expected links that work', testcase: 'https://gitlab.com/gitlab-org/gitlab/-/quality/test_cases/347814' do
|
it 'has all expected links that work',
|
||||||
|
testcase: 'https://gitlab.com/gitlab-org/gitlab/-/quality/test_cases/347814' do
|
||||||
small_wiki.visit!
|
small_wiki.visit!
|
||||||
|
|
||||||
small_number_of_pages.times do |index|
|
small_number_of_pages.times do |index|
|
||||||
|
@ -34,8 +35,9 @@ module QA
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
context 'Page List' do
|
context 'with Wiki Page List' do
|
||||||
it 'has all expected links that work', testcase: 'https://gitlab.com/gitlab-org/gitlab/-/quality/test_cases/347813' do
|
it 'has all expected links that work',
|
||||||
|
testcase: 'https://gitlab.com/gitlab-org/gitlab/-/quality/test_cases/347813' do
|
||||||
large_wiki.visit!
|
large_wiki.visit!
|
||||||
|
|
||||||
Page::Project::Wiki::Show.perform(&:click_view_all_pages)
|
Page::Project::Wiki::Show.perform(&:click_view_all_pages)
|
|
@ -0,0 +1,24 @@
|
||||||
|
# frozen_string_literal: true
|
||||||
|
|
||||||
|
module QA
|
||||||
|
RSpec.describe 'Create' do
|
||||||
|
describe 'Testing project wiki'
|
||||||
|
let(:initial_wiki) { Resource::Wiki::ProjectPage.fabricate_via_api! }
|
||||||
|
|
||||||
|
before do
|
||||||
|
Flow::Login.sign_in
|
||||||
|
end
|
||||||
|
|
||||||
|
it 'can delete a page',
|
||||||
|
testcase: 'https://gitlab.com/gitlab-org/gitlab/-/quality/test_cases/347815' do
|
||||||
|
initial_wiki.visit!
|
||||||
|
|
||||||
|
Page::Project::Wiki::Show.perform(&:click_edit)
|
||||||
|
Page::Project::Wiki::Edit.perform(&:delete_page)
|
||||||
|
|
||||||
|
Page::Project::Wiki::Show.perform do |wiki|
|
||||||
|
expect(wiki).to have_no_page
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
|
@ -1,93 +0,0 @@
|
||||||
# frozen_string_literal: true
|
|
||||||
|
|
||||||
module QA
|
|
||||||
RSpec.describe 'Create' do
|
|
||||||
context 'Wiki' do
|
|
||||||
describe 'testing wiki content creation inside a project' do
|
|
||||||
let(:new_wiki_title) { "just_another_wiki_page" }
|
|
||||||
let(:new_wiki_content) { "this content is changed or added" }
|
|
||||||
let(:commit_message) { "this is a new addition to the wiki" }
|
|
||||||
|
|
||||||
let(:project) { Resource::Project.fabricate_via_api! }
|
|
||||||
let(:wiki) { Resource::Wiki::ProjectPage.fabricate_via_api! }
|
|
||||||
|
|
||||||
before do
|
|
||||||
Flow::Login.sign_in
|
|
||||||
end
|
|
||||||
|
|
||||||
it 'by adding a home page to the wiki', testcase: 'https://gitlab.com/gitlab-org/gitlab/-/quality/test_cases/347809' do
|
|
||||||
project.visit!
|
|
||||||
|
|
||||||
Page::Project::Menu.perform(&:click_wiki)
|
|
||||||
Page::Project::Wiki::Show.perform(&:click_create_your_first_page)
|
|
||||||
|
|
||||||
Page::Project::Wiki::Edit.perform do |edit|
|
|
||||||
edit.set_title new_wiki_title
|
|
||||||
edit.set_content new_wiki_content
|
|
||||||
edit.set_message commit_message
|
|
||||||
end
|
|
||||||
|
|
||||||
Page::Project::Wiki::Edit.perform(&:click_submit)
|
|
||||||
|
|
||||||
Page::Project::Wiki::Show.perform do |wiki|
|
|
||||||
expect(wiki).to have_title new_wiki_title
|
|
||||||
expect(wiki).to have_content new_wiki_content
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
it 'by adding a second page to the wiki', testcase: 'https://gitlab.com/gitlab-org/gitlab/-/quality/test_cases/347808' do
|
|
||||||
wiki.visit!
|
|
||||||
|
|
||||||
Page::Project::Wiki::Show.perform(&:click_new_page)
|
|
||||||
|
|
||||||
Page::Project::Wiki::Edit.perform do |edit|
|
|
||||||
edit.set_title new_wiki_title
|
|
||||||
edit.set_content new_wiki_content
|
|
||||||
edit.set_message commit_message
|
|
||||||
end
|
|
||||||
|
|
||||||
Page::Project::Wiki::Edit.perform(&:click_submit)
|
|
||||||
|
|
||||||
Page::Project::Wiki::Show.perform do |wiki|
|
|
||||||
expect(wiki).to have_title new_wiki_title
|
|
||||||
expect(wiki).to have_content new_wiki_content
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
it 'by adding a home page to the wiki using git push', testcase: 'https://gitlab.com/gitlab-org/gitlab/-/quality/test_cases/347806' do
|
|
||||||
empty_wiki = Resource::Wiki::ProjectPage.new do |empty_wiki|
|
|
||||||
empty_wiki.project = project
|
|
||||||
end
|
|
||||||
|
|
||||||
Resource::Repository::WikiPush.fabricate! do |push|
|
|
||||||
push.file_name = "#{new_wiki_title}.md"
|
|
||||||
push.file_content = new_wiki_content
|
|
||||||
push.commit_message = commit_message
|
|
||||||
push.wiki = empty_wiki
|
|
||||||
push.new_branch = true
|
|
||||||
end.visit!
|
|
||||||
|
|
||||||
Page::Project::Wiki::Show.perform do |wiki|
|
|
||||||
expect(wiki).to have_title new_wiki_title
|
|
||||||
expect(wiki).to have_content new_wiki_content
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
it 'by adding a second page to the wiki using git push', testcase: 'https://gitlab.com/gitlab-org/gitlab/-/quality/test_cases/347807' do
|
|
||||||
Resource::Repository::WikiPush.fabricate! do |push|
|
|
||||||
push.file_name = "#{new_wiki_title}.md"
|
|
||||||
push.file_content = new_wiki_content
|
|
||||||
push.commit_message = commit_message
|
|
||||||
push.wiki = wiki
|
|
||||||
push.new_branch = false
|
|
||||||
end.visit!
|
|
||||||
|
|
||||||
Page::Project::Wiki::Show.perform do |wiki|
|
|
||||||
expect(wiki).to have_title new_wiki_title
|
|
||||||
expect(wiki).to have_content new_wiki_content
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
|
@ -1,51 +0,0 @@
|
||||||
# frozen_string_literal: true
|
|
||||||
|
|
||||||
module QA
|
|
||||||
RSpec.describe 'Create' do
|
|
||||||
context 'Wiki' do
|
|
||||||
describe 'testing wiki content manipulation inside a project' do
|
|
||||||
let(:new_wiki_title) { "just_another_wiki_page" }
|
|
||||||
let(:new_wiki_content) { "this content is changed or added" }
|
|
||||||
let(:commit_message) { "this is a new addition to the wiki" }
|
|
||||||
|
|
||||||
let(:wiki) { Resource::Wiki::ProjectPage.fabricate_via_api! }
|
|
||||||
|
|
||||||
before do
|
|
||||||
Flow::Login.sign_in
|
|
||||||
end
|
|
||||||
|
|
||||||
it 'by manipulating content on the page', testcase: 'https://gitlab.com/gitlab-org/gitlab/-/quality/test_cases/347810' do
|
|
||||||
wiki.visit!
|
|
||||||
|
|
||||||
Page::Project::Wiki::Show.perform(&:click_edit)
|
|
||||||
|
|
||||||
Page::Project::Wiki::Edit.perform do |edit|
|
|
||||||
edit.set_title new_wiki_title
|
|
||||||
edit.set_content new_wiki_content
|
|
||||||
edit.set_message commit_message
|
|
||||||
end
|
|
||||||
|
|
||||||
Page::Project::Wiki::Edit.perform(&:click_submit)
|
|
||||||
|
|
||||||
Page::Project::Wiki::Show.perform do |wiki|
|
|
||||||
expect(wiki).to have_title new_wiki_title
|
|
||||||
expect(wiki).to have_content new_wiki_content
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
it 'by manipulating content on the page using git push', testcase: 'https://gitlab.com/gitlab-org/gitlab/-/quality/test_cases/347811' do
|
|
||||||
Resource::Repository::WikiPush.fabricate! do |push|
|
|
||||||
push.file_content = new_wiki_content
|
|
||||||
push.commit_message = commit_message
|
|
||||||
push.wiki = wiki
|
|
||||||
push.new_branch = false
|
|
||||||
end.visit!
|
|
||||||
|
|
||||||
Page::Project::Wiki::Show.perform do |wiki|
|
|
||||||
expect(wiki).to have_content new_wiki_content
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
|
@ -1,26 +0,0 @@
|
||||||
# frozen_string_literal: true
|
|
||||||
|
|
||||||
module QA
|
|
||||||
RSpec.describe 'Create' do
|
|
||||||
context 'Wiki' do
|
|
||||||
let(:initial_wiki) { Resource::Wiki::ProjectPage.fabricate_via_api! }
|
|
||||||
|
|
||||||
before do
|
|
||||||
Flow::Login.sign_in
|
|
||||||
end
|
|
||||||
|
|
||||||
context 'Page deletion' do
|
|
||||||
it 'has removed the deleted page correctly', testcase: 'https://gitlab.com/gitlab-org/gitlab/-/quality/test_cases/347815' do
|
|
||||||
initial_wiki.visit!
|
|
||||||
|
|
||||||
Page::Project::Wiki::Show.perform(&:click_edit)
|
|
||||||
Page::Project::Wiki::Edit.perform(&:delete_page)
|
|
||||||
|
|
||||||
Page::Project::Wiki::Show.perform do |wiki|
|
|
||||||
expect(wiki).to have_no_page
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
|
@ -1,6 +1,7 @@
|
||||||
/* Common setup for both unit and integration test environments */
|
/* Common setup for both unit and integration test environments */
|
||||||
import * as jqueryMatchers from 'custom-jquery-matchers';
|
import * as jqueryMatchers from 'custom-jquery-matchers';
|
||||||
import Vue from 'vue';
|
import Vue from 'vue';
|
||||||
|
import { enableAutoDestroy } from '@vue/test-utils';
|
||||||
import 'jquery';
|
import 'jquery';
|
||||||
import Translate from '~/vue_shared/translate';
|
import Translate from '~/vue_shared/translate';
|
||||||
import setWindowLocation from './set_window_location_helper';
|
import setWindowLocation from './set_window_location_helper';
|
||||||
|
@ -12,6 +13,8 @@ import './dom_shims';
|
||||||
import './jquery';
|
import './jquery';
|
||||||
import '~/commons/bootstrap';
|
import '~/commons/bootstrap';
|
||||||
|
|
||||||
|
enableAutoDestroy(afterEach);
|
||||||
|
|
||||||
// This module has some fairly decent visual test coverage in it's own repository.
|
// This module has some fairly decent visual test coverage in it's own repository.
|
||||||
jest.mock('@gitlab/favicon-overlay');
|
jest.mock('@gitlab/favicon-overlay');
|
||||||
jest.mock('~/lib/utils/axios_utils', () => jest.requireActual('helpers/mocks/axios_utils'));
|
jest.mock('~/lib/utils/axios_utils', () => jest.requireActual('helpers/mocks/axios_utils'));
|
||||||
|
|
|
@ -140,11 +140,12 @@ describe('Vue test utils helpers', () => {
|
||||||
const text = 'foo bar';
|
const text = 'foo bar';
|
||||||
const options = { selector: 'div' };
|
const options = { selector: 'div' };
|
||||||
const mockDiv = document.createElement('div');
|
const mockDiv = document.createElement('div');
|
||||||
const mockVm = new Vue({ render: (h) => h('div') }).$mount();
|
let mockVm;
|
||||||
|
|
||||||
let wrapper;
|
let wrapper;
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
jest.spyOn(vtu, 'createWrapper');
|
jest.spyOn(vtu, 'createWrapper');
|
||||||
|
mockVm = new Vue({ render: (h) => h('div') }).$mount();
|
||||||
|
|
||||||
wrapper = extendedWrapper(
|
wrapper = extendedWrapper(
|
||||||
shallowMount({
|
shallowMount({
|
||||||
|
|
|
@ -170,6 +170,14 @@ describe('Design overlay component', () => {
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should call an update active discussion mutation when clicking a note without moving it', async () => {
|
it('should call an update active discussion mutation when clicking a note without moving it', async () => {
|
||||||
|
createComponent({
|
||||||
|
notes,
|
||||||
|
dimensions: {
|
||||||
|
width: 400,
|
||||||
|
height: 400,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
const note = notes[0];
|
const note = notes[0];
|
||||||
const { position } = note;
|
const { position } = note;
|
||||||
const mutationVariables = {
|
const mutationVariables = {
|
||||||
|
|
|
@ -2,7 +2,10 @@ import { mount } from '@vue/test-utils';
|
||||||
import FileRowStats from '~/diffs/components/file_row_stats.vue';
|
import FileRowStats from '~/diffs/components/file_row_stats.vue';
|
||||||
|
|
||||||
describe('Diff file row stats', () => {
|
describe('Diff file row stats', () => {
|
||||||
const wrapper = mount(FileRowStats, {
|
let wrapper;
|
||||||
|
|
||||||
|
const createComponent = () => {
|
||||||
|
wrapper = mount(FileRowStats, {
|
||||||
propsData: {
|
propsData: {
|
||||||
file: {
|
file: {
|
||||||
addedLines: 20,
|
addedLines: 20,
|
||||||
|
@ -10,6 +13,11 @@ describe('Diff file row stats', () => {
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
beforeEach(() => {
|
||||||
|
createComponent();
|
||||||
|
});
|
||||||
|
|
||||||
it('renders added lines count', () => {
|
it('renders added lines count', () => {
|
||||||
expect(wrapper.find('.cgreen').text()).toContain('+20');
|
expect(wrapper.find('.cgreen').text()).toContain('+20');
|
||||||
|
|
|
@ -2,15 +2,22 @@ import { shallowMount } from '@vue/test-utils';
|
||||||
import RequestWarning from '~/performance_bar/components/request_warning.vue';
|
import RequestWarning from '~/performance_bar/components/request_warning.vue';
|
||||||
|
|
||||||
describe('request warning', () => {
|
describe('request warning', () => {
|
||||||
|
let wrapper;
|
||||||
const htmlId = 'request-123';
|
const htmlId = 'request-123';
|
||||||
|
|
||||||
|
afterEach(() => {
|
||||||
|
wrapper.destroy();
|
||||||
|
});
|
||||||
|
|
||||||
describe('when the request has warnings', () => {
|
describe('when the request has warnings', () => {
|
||||||
const wrapper = shallowMount(RequestWarning, {
|
beforeEach(() => {
|
||||||
|
wrapper = shallowMount(RequestWarning, {
|
||||||
propsData: {
|
propsData: {
|
||||||
htmlId,
|
htmlId,
|
||||||
warnings: ['gitaly calls: 30 over 10', 'gitaly duration: 1500 over 1000'],
|
warnings: ['gitaly calls: 30 over 10', 'gitaly duration: 1500 over 1000'],
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
});
|
||||||
|
|
||||||
it('adds a warning emoji with the correct ID', () => {
|
it('adds a warning emoji with the correct ID', () => {
|
||||||
expect(wrapper.find('span[id]').attributes('id')).toEqual(htmlId);
|
expect(wrapper.find('span[id]').attributes('id')).toEqual(htmlId);
|
||||||
|
@ -19,12 +26,14 @@ describe('request warning', () => {
|
||||||
});
|
});
|
||||||
|
|
||||||
describe('when the request does not have warnings', () => {
|
describe('when the request does not have warnings', () => {
|
||||||
const wrapper = shallowMount(RequestWarning, {
|
beforeEach(() => {
|
||||||
|
wrapper = shallowMount(RequestWarning, {
|
||||||
propsData: {
|
propsData: {
|
||||||
htmlId,
|
htmlId,
|
||||||
warnings: [],
|
warnings: [],
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
});
|
||||||
|
|
||||||
it('does nothing', () => {
|
it('does nothing', () => {
|
||||||
expect(wrapper.html()).toBe('');
|
expect(wrapper.html()).toBe('');
|
||||||
|
|
|
@ -211,7 +211,7 @@ describe('Pipeline Wizard - Commit Page', () => {
|
||||||
}) => {
|
}) => {
|
||||||
let consoleSpy;
|
let consoleSpy;
|
||||||
|
|
||||||
beforeAll(async () => {
|
beforeEach(async () => {
|
||||||
createComponent(
|
createComponent(
|
||||||
{
|
{
|
||||||
filename,
|
filename,
|
||||||
|
@ -246,7 +246,7 @@ describe('Pipeline Wizard - Commit Page', () => {
|
||||||
await waitForPromises();
|
await waitForPromises();
|
||||||
});
|
});
|
||||||
|
|
||||||
afterAll(() => {
|
afterEach(() => {
|
||||||
wrapper.destroy();
|
wrapper.destroy();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -3,12 +3,20 @@ import { Document } from 'yaml';
|
||||||
import YamlEditor from '~/pipeline_wizard/components/editor.vue';
|
import YamlEditor from '~/pipeline_wizard/components/editor.vue';
|
||||||
|
|
||||||
describe('Pages Yaml Editor wrapper', () => {
|
describe('Pages Yaml Editor wrapper', () => {
|
||||||
|
let wrapper;
|
||||||
|
|
||||||
const defaultOptions = {
|
const defaultOptions = {
|
||||||
propsData: { doc: new Document({ foo: 'bar' }), filename: 'foo.yml' },
|
propsData: { doc: new Document({ foo: 'bar' }), filename: 'foo.yml' },
|
||||||
};
|
};
|
||||||
|
|
||||||
|
afterEach(() => {
|
||||||
|
wrapper.destroy();
|
||||||
|
});
|
||||||
|
|
||||||
describe('mount hook', () => {
|
describe('mount hook', () => {
|
||||||
const wrapper = mount(YamlEditor, defaultOptions);
|
beforeEach(() => {
|
||||||
|
wrapper = mount(YamlEditor, defaultOptions);
|
||||||
|
});
|
||||||
|
|
||||||
it('editor is mounted', () => {
|
it('editor is mounted', () => {
|
||||||
expect(wrapper.vm.editor).not.toBeUndefined();
|
expect(wrapper.vm.editor).not.toBeUndefined();
|
||||||
|
@ -19,16 +27,11 @@ describe('Pages Yaml Editor wrapper', () => {
|
||||||
describe('watchers', () => {
|
describe('watchers', () => {
|
||||||
describe('doc', () => {
|
describe('doc', () => {
|
||||||
const doc = new Document({ baz: ['bar'] });
|
const doc = new Document({ baz: ['bar'] });
|
||||||
let wrapper;
|
|
||||||
|
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
wrapper = mount(YamlEditor, defaultOptions);
|
wrapper = mount(YamlEditor, defaultOptions);
|
||||||
});
|
});
|
||||||
|
|
||||||
afterEach(() => {
|
|
||||||
wrapper.destroy();
|
|
||||||
});
|
|
||||||
|
|
||||||
it("causes the editor's value to be set to the stringified document", async () => {
|
it("causes the editor's value to be set to the stringified document", async () => {
|
||||||
await wrapper.setProps({ doc });
|
await wrapper.setProps({ doc });
|
||||||
expect(wrapper.vm.editor.getValue()).toEqual(doc.toString());
|
expect(wrapper.vm.editor.getValue()).toEqual(doc.toString());
|
||||||
|
@ -48,7 +51,10 @@ describe('Pages Yaml Editor wrapper', () => {
|
||||||
|
|
||||||
describe('highlight', () => {
|
describe('highlight', () => {
|
||||||
const highlight = 'foo';
|
const highlight = 'foo';
|
||||||
const wrapper = mount(YamlEditor, defaultOptions);
|
|
||||||
|
beforeEach(() => {
|
||||||
|
wrapper = mount(YamlEditor, defaultOptions);
|
||||||
|
});
|
||||||
|
|
||||||
it('calls editor.highlight(path, keep=true)', async () => {
|
it('calls editor.highlight(path, keep=true)', async () => {
|
||||||
const highlightSpy = jest.spyOn(wrapper.vm.yamlEditorExtension.obj, 'highlight');
|
const highlightSpy = jest.spyOn(wrapper.vm.yamlEditorExtension.obj, 'highlight');
|
||||||
|
|
|
@ -132,7 +132,7 @@ describe('Pipeline Wizard - wrapper.vue', () => {
|
||||||
expectStepDef,
|
expectStepDef,
|
||||||
expectProgressBarValue,
|
expectProgressBarValue,
|
||||||
}) => {
|
}) => {
|
||||||
beforeAll(async () => {
|
beforeEach(async () => {
|
||||||
createComponent();
|
createComponent();
|
||||||
|
|
||||||
for (const emittedValue of navigationEventChain) {
|
for (const emittedValue of navigationEventChain) {
|
||||||
|
@ -145,7 +145,7 @@ describe('Pipeline Wizard - wrapper.vue', () => {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
afterAll(() => {
|
afterEach(() => {
|
||||||
wrapper.destroy();
|
wrapper.destroy();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -184,11 +184,11 @@ describe('Pipeline Wizard - wrapper.vue', () => {
|
||||||
});
|
});
|
||||||
|
|
||||||
describe('editor overlay', () => {
|
describe('editor overlay', () => {
|
||||||
beforeAll(() => {
|
beforeEach(() => {
|
||||||
createComponent();
|
createComponent();
|
||||||
});
|
});
|
||||||
|
|
||||||
afterAll(() => {
|
afterEach(() => {
|
||||||
wrapper.destroy();
|
wrapper.destroy();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -236,11 +236,11 @@ describe('Pipeline Wizard - wrapper.vue', () => {
|
||||||
});
|
});
|
||||||
|
|
||||||
describe('line highlights', () => {
|
describe('line highlights', () => {
|
||||||
beforeAll(() => {
|
beforeEach(() => {
|
||||||
createComponent();
|
createComponent();
|
||||||
});
|
});
|
||||||
|
|
||||||
afterAll(() => {
|
afterEach(() => {
|
||||||
wrapper.destroy();
|
wrapper.destroy();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -266,7 +266,7 @@ describe('Pipeline Wizard - wrapper.vue', () => {
|
||||||
});
|
});
|
||||||
|
|
||||||
describe('integration test', () => {
|
describe('integration test', () => {
|
||||||
beforeAll(async () => {
|
beforeEach(async () => {
|
||||||
createComponent({}, mountExtended);
|
createComponent({}, mountExtended);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -290,14 +290,25 @@ describe('Pipeline Wizard - wrapper.vue', () => {
|
||||||
describe('navigating back', () => {
|
describe('navigating back', () => {
|
||||||
let inputField;
|
let inputField;
|
||||||
|
|
||||||
beforeAll(async () => {
|
beforeEach(async () => {
|
||||||
|
createComponent({}, mountExtended);
|
||||||
|
|
||||||
|
findFirstInputFieldForTarget('$FOO').setValue('fooVal');
|
||||||
|
await nextTick();
|
||||||
|
|
||||||
|
findFirstVisibleStep().vm.$emit('next');
|
||||||
|
await nextTick();
|
||||||
|
|
||||||
|
findFirstInputFieldForTarget('$BAR').setValue('barVal');
|
||||||
|
await nextTick();
|
||||||
|
|
||||||
findFirstVisibleStep().vm.$emit('back');
|
findFirstVisibleStep().vm.$emit('back');
|
||||||
await nextTick();
|
await nextTick();
|
||||||
|
|
||||||
inputField = findFirstInputFieldForTarget('$FOO');
|
inputField = findFirstInputFieldForTarget('$FOO');
|
||||||
});
|
});
|
||||||
|
|
||||||
afterAll(() => {
|
afterEach(() => {
|
||||||
wrapper.destroy();
|
wrapper.destroy();
|
||||||
inputField = undefined;
|
inputField = undefined;
|
||||||
});
|
});
|
||||||
|
|
|
@ -62,8 +62,7 @@ export const steps = `
|
||||||
export const compiledScenario1 = `foo: fooVal
|
export const compiledScenario1 = `foo: fooVal
|
||||||
`;
|
`;
|
||||||
|
|
||||||
export const compiledScenario2 = `foo: fooVal
|
export const compiledScenario2 = `bar: barVal
|
||||||
bar: barVal
|
|
||||||
`;
|
`;
|
||||||
|
|
||||||
export const compiledScenario3 = `foo: newFooVal
|
export const compiledScenario3 = `foo: newFooVal
|
||||||
|
|
|
@ -29,6 +29,8 @@ describe('RunnerStackedLayoutBanner', () => {
|
||||||
});
|
});
|
||||||
|
|
||||||
it('Does not display a banner when dismissed', async () => {
|
it('Does not display a banner when dismissed', async () => {
|
||||||
|
createComponent();
|
||||||
|
|
||||||
findLocalStorageSync().vm.$emit('input', true);
|
findLocalStorageSync().vm.$emit('input', true);
|
||||||
|
|
||||||
await nextTick();
|
await nextTick();
|
||||||
|
|
|
@ -127,6 +127,8 @@ describe('SetStatusForm', () => {
|
||||||
|
|
||||||
describe('when `Clear status after` dropdown is changed', () => {
|
describe('when `Clear status after` dropdown is changed', () => {
|
||||||
it('emits `clear-status-after-click`', async () => {
|
it('emits `clear-status-after-click`', async () => {
|
||||||
|
await createComponent();
|
||||||
|
|
||||||
await wrapper.findByTestId('thirtyMinutes').trigger('click');
|
await wrapper.findByTestId('thirtyMinutes').trigger('click');
|
||||||
|
|
||||||
expect(wrapper.emitted('clear-status-after-click')).toEqual([[timeRanges[0]]]);
|
expect(wrapper.emitted('clear-status-after-click')).toEqual([[timeRanges[0]]]);
|
||||||
|
|
|
@ -1004,7 +1004,7 @@ describe('MrWidgetOptions', () => {
|
||||||
|
|
||||||
await createComponent();
|
await createComponent();
|
||||||
|
|
||||||
expect(pollRequest).toHaveBeenCalledTimes(4);
|
expect(pollRequest).toHaveBeenCalledTimes(2);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -1042,7 +1042,7 @@ describe('MrWidgetOptions', () => {
|
||||||
registerExtension(pollingErrorExtension);
|
registerExtension(pollingErrorExtension);
|
||||||
await createComponent();
|
await createComponent();
|
||||||
|
|
||||||
expect(pollRequest).toHaveBeenCalledTimes(4);
|
expect(pollRequest).toHaveBeenCalledTimes(2);
|
||||||
});
|
});
|
||||||
|
|
||||||
it('captures sentry error and displays error when poll has failed', async () => {
|
it('captures sentry error and displays error when poll has failed', async () => {
|
||||||
|
|
|
@ -106,11 +106,11 @@ describe('Diff Stats Dropdown', () => {
|
||||||
expectedAddedDeletedExpanded,
|
expectedAddedDeletedExpanded,
|
||||||
expectedAddedDeletedCollapsed,
|
expectedAddedDeletedCollapsed,
|
||||||
}) => {
|
}) => {
|
||||||
beforeAll(() => {
|
beforeEach(() => {
|
||||||
createComponent({ changed, added, deleted });
|
createComponent({ changed, added, deleted });
|
||||||
});
|
});
|
||||||
|
|
||||||
afterAll(() => {
|
afterEach(() => {
|
||||||
wrapper.destroy();
|
wrapper.destroy();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -141,7 +141,7 @@ RSpec.describe Gitlab::GithubImport::Importer::IssueImporter, :clean_gitlab_redi
|
||||||
.to receive(:insert_and_return_id)
|
.to receive(:insert_and_return_id)
|
||||||
.with(
|
.with(
|
||||||
{
|
{
|
||||||
iid: 42,
|
iid: 1,
|
||||||
title: 'My Issue',
|
title: 'My Issue',
|
||||||
author_id: user.id,
|
author_id: user.id,
|
||||||
project_id: project.id,
|
project_id: project.id,
|
||||||
|
@ -172,7 +172,7 @@ RSpec.describe Gitlab::GithubImport::Importer::IssueImporter, :clean_gitlab_redi
|
||||||
.to receive(:insert_and_return_id)
|
.to receive(:insert_and_return_id)
|
||||||
.with(
|
.with(
|
||||||
{
|
{
|
||||||
iid: 42,
|
iid: 1,
|
||||||
title: 'My Issue',
|
title: 'My Issue',
|
||||||
author_id: project.creator_id,
|
author_id: project.creator_id,
|
||||||
project_id: project.id,
|
project_id: project.id,
|
||||||
|
|
Loading…
Reference in New Issue