diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-01-14 15:18:55 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-01-14 15:18:55 +0300 |
commit | 8a70817cd9327a4cdfbd71a11f9aa22e838fabf6 (patch) | |
tree | 33ea54e2a4cfaa0f0b7e2a65e433d99f28dbf4cf /spec/frontend/fixtures | |
parent | 7bd8f9822b05eb2e8c8279678e38e7513c3612f6 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/frontend/fixtures')
-rw-r--r-- | spec/frontend/fixtures/runner.rb | 130 |
1 files changed, 70 insertions, 60 deletions
diff --git a/spec/frontend/fixtures/runner.rb b/spec/frontend/fixtures/runner.rb index b5dd3576e8b..36e6cf72750 100644 --- a/spec/frontend/fixtures/runner.rb +++ b/spec/frontend/fixtures/runner.rb @@ -24,99 +24,109 @@ RSpec.describe 'Runner (JavaScript fixtures)' do remove_repository(project) end - describe GraphQL::Query, type: :request do - get_runners_query_name = 'get_runners.query.graphql' - + describe do before do sign_in(admin) enable_admin_mode!(admin) end - let_it_be(:query) do - get_graphql_query_as_string("#{query_path}#{get_runners_query_name}") - end + describe GraphQL::Query, type: :request do + get_runners_query_name = 'get_runners.query.graphql' - it "#{fixtures_path}#{get_runners_query_name}.json" do - post_graphql(query, current_user: admin, variables: {}) + let_it_be(:query) do + get_graphql_query_as_string("#{query_path}#{get_runners_query_name}") + end - expect_graphql_errors_to_be_empty - end + it "#{fixtures_path}#{get_runners_query_name}.json" do + post_graphql(query, current_user: admin, variables: {}) - it "#{fixtures_path}#{get_runners_query_name}.paginated.json" do - post_graphql(query, current_user: admin, variables: { first: 2 }) + expect_graphql_errors_to_be_empty + end - expect_graphql_errors_to_be_empty - end - end - - describe GraphQL::Query, type: :request do - get_runners_count_query_name = 'get_runners_count.query.graphql' + it "#{fixtures_path}#{get_runners_query_name}.paginated.json" do + post_graphql(query, current_user: admin, variables: { first: 2 }) - before do - sign_in(admin) - enable_admin_mode!(admin) - end - - let_it_be(:query) do - get_graphql_query_as_string("#{query_path}#{get_runners_count_query_name}") + expect_graphql_errors_to_be_empty + end end - it "#{fixtures_path}#{get_runners_count_query_name}.json" do - post_graphql(query, current_user: admin, variables: {}) + describe GraphQL::Query, type: :request do + get_runners_count_query_name = 'get_runners_count.query.graphql' - expect_graphql_errors_to_be_empty - end - end + let_it_be(:query) do + get_graphql_query_as_string("#{query_path}#{get_runners_count_query_name}") + end - describe GraphQL::Query, type: :request do - get_runner_query_name = 'get_runner.query.graphql' + it "#{fixtures_path}#{get_runners_count_query_name}.json" do + post_graphql(query, current_user: admin, variables: {}) - before do - sign_in(admin) - enable_admin_mode!(admin) + expect_graphql_errors_to_be_empty + end end - let_it_be(:query) do - get_graphql_query_as_string("#{query_path}#{get_runner_query_name}") - end + describe GraphQL::Query, type: :request do + get_runner_query_name = 'get_runner.query.graphql' + + let_it_be(:query) do + get_graphql_query_as_string("#{query_path}#{get_runner_query_name}") + end - it "#{fixtures_path}#{get_runner_query_name}.json" do - post_graphql(query, current_user: admin, variables: { - id: instance_runner.to_global_id.to_s - }) + it "#{fixtures_path}#{get_runner_query_name}.json" do + post_graphql(query, current_user: admin, variables: { + id: instance_runner.to_global_id.to_s + }) - expect_graphql_errors_to_be_empty + expect_graphql_errors_to_be_empty + end end end - describe GraphQL::Query, type: :request do - get_group_runners_query_name = 'get_group_runners.query.graphql' - + describe do let_it_be(:group_owner) { create(:user) } before do group.add_owner(group_owner) end - let_it_be(:query) do - get_graphql_query_as_string("#{query_path}#{get_group_runners_query_name}") - end + describe GraphQL::Query, type: :request do + get_group_runners_query_name = 'get_group_runners.query.graphql' + + let_it_be(:query) do + get_graphql_query_as_string("#{query_path}#{get_group_runners_query_name}") + end + + it "#{fixtures_path}#{get_group_runners_query_name}.json" do + post_graphql(query, current_user: group_owner, variables: { + groupFullPath: group.full_path + }) - it "#{fixtures_path}#{get_group_runners_query_name}.json" do - post_graphql(query, current_user: group_owner, variables: { - groupFullPath: group.full_path - }) + expect_graphql_errors_to_be_empty + end - expect_graphql_errors_to_be_empty + it "#{fixtures_path}#{get_group_runners_query_name}.paginated.json" do + post_graphql(query, current_user: group_owner, variables: { + groupFullPath: group.full_path, + first: 1 + }) + + expect_graphql_errors_to_be_empty + end end - it "#{fixtures_path}#{get_group_runners_query_name}.paginated.json" do - post_graphql(query, current_user: group_owner, variables: { - groupFullPath: group.full_path, - first: 1 - }) + describe GraphQL::Query, type: :request do + get_group_runners_count_query_name = 'get_group_runners_count.query.graphql' + + let_it_be(:query) do + get_graphql_query_as_string("#{query_path}#{get_group_runners_count_query_name}") + end + + it "#{fixtures_path}#{get_group_runners_count_query_name}.json" do + post_graphql(query, current_user: group_owner, variables: { + groupFullPath: group.full_path + }) - expect_graphql_errors_to_be_empty + expect_graphql_errors_to_be_empty + end end end end |