Commit b852dfdb authored by Oswaldo Ferreira's avatar Oswaldo Ferreira

Merge branch 'ck3g-fix-indentation-in-graphql-specs' into 'master'

Fix GraphQL query example indentation in specs

See merge request gitlab-org/gitlab!39239
parents e6018671 ade086ac
......@@ -38,7 +38,7 @@ RSpec.describe GitlabSchema.types['Group'] do
let_it_be(:query) do
%(
query {
group(fullPath:"#{group.full_path}") {
group(fullPath: "#{group.full_path}") {
name
vulnerabilities {
nodes {
......
......@@ -31,14 +31,14 @@ RSpec.describe GitlabSchema.types['Project'] do
let_it_be(:query) do
%(
query {
project(fullPath: "#{project.full_path}") {
securityScanners {
enabled
available
pipelineRun
}
}
}
project(fullPath: "#{project.full_path}") {
securityScanners {
enabled
available
pipelineRun
}
}
}
)
end
......@@ -74,7 +74,7 @@ RSpec.describe GitlabSchema.types['Project'] do
let_it_be(:query) do
%(
query {
project(fullPath:"#{project.full_path}") {
project(fullPath: "#{project.full_path}") {
vulnerabilities {
nodes {
title
......
......@@ -26,7 +26,7 @@ RSpec.describe GitlabSchema.types['Vulnerability'] do
let(:query) do
%(
query {
project(fullPath:"#{project.full_path}") {
project(fullPath: "#{project.full_path}") {
name
vulnerabilities {
nodes {
......
......@@ -91,16 +91,16 @@ RSpec.describe 'getting epics information' do
field_queries = args.map { |key, value| "#{key}:\"#{value}\"" }.join(',')
<<~QUERY
query {
group(fullPath:"#{group.full_path}") {
id,
epics(#{field_queries}) {
nodes {
id
}
query {
group(fullPath: "#{group.full_path}") {
id,
epics(#{field_queries}) {
nodes {
id
}
}
}
}
QUERY
end
......
......@@ -20,8 +20,8 @@ RSpec.describe 'Query.project(fullPath).pipeline(iid).securityReportSummary' do
let_it_be(:query) do
%(
query {
project(fullPath:"#{project.full_path}") {
pipeline(iid:"#{pipeline.iid}") {
project(fullPath: "#{project.full_path}") {
pipeline(iid: "#{pipeline.iid}") {
securityReportSummary {
dast {
scannedResourcesCount
......
......@@ -10,7 +10,7 @@ RSpec.describe 'Query.project(fullPath).vulnerabilitySeveritiesCount' do
let_it_be(:query) do
%(
query {
project(fullPath:"#{project.full_path}") {
project(fullPath: "#{project.full_path}") {
vulnerabilitySeveritiesCount {
high
}
......
......@@ -132,14 +132,14 @@ RSpec.describe GitlabSchema.types['Issue'] do
let(:query) do
%(
query {
project(fullPath:"#{project.full_path}"){
issue(iid:"#{issue.iid}"){
project(fullPath: "#{project.full_path}") {
issue(iid: "#{issue.iid}") {
descriptionHtml
notes{
edges{
node{
notes {
edges {
node {
bodyHtml
author{
author {
username
}
body
......
......@@ -148,47 +148,47 @@ RSpec.describe GitlabSchema.types['Project'] do
let_it_be(:query) do
%(
query {
project(fullPath: "#{project.full_path}") {
sastCiConfiguration {
global {
project(fullPath: "#{project.full_path}") {
sastCiConfiguration {
global {
nodes {
type
options {
nodes {
type
options {
nodes {
label
value
}
}
field
label
defaultValue
value
}
}
pipeline {
field
label
defaultValue
value
}
}
pipeline {
nodes {
type
options {
nodes {
type
options {
nodes {
label
value
}
}
field
label
defaultValue
value
}
}
analyzers {
nodes {
name
label
enabled
}
}
field
label
defaultValue
value
}
}
analyzers {
nodes {
name
label
enabled
}
}
}
}
}
)
end
......
......@@ -44,7 +44,7 @@ RSpec.describe GitlabSchema.types['SnippetBlobViewer'] do
let(:query) do
%(
query {
snippets(ids:"#{snippet.to_global_id}"){
snippets(ids: "#{snippet.to_global_id}") {
edges {
node {
blob {
......@@ -70,7 +70,7 @@ RSpec.describe GitlabSchema.types['SnippetBlobViewer'] do
let(:query) do
%(
query {
snippets(ids:"#{snippet.to_global_id}"){
snippets(ids: "#{snippet.to_global_id}") {
edges {
node {
blob {
......
......@@ -30,22 +30,22 @@ RSpec.describe 'Getting Metrics Dashboard Annotations' do
let(:query) do
%(
query {
project(fullPath:"#{project.full_path}") {
environments(name: "#{environment.name}") {
nodes {
metricsDashboard(path: "#{path}"){
annotations(#{args}){
nodes {
#{fields}
}
}
query {
project(fullPath: "#{project.full_path}") {
environments(name: "#{environment.name}") {
nodes {
metricsDashboard(path: "#{path}") {
annotations(#{args}) {
nodes {
#{fields}
}
}
}
}
}
)
}
}
)
end
before do
......
......@@ -107,7 +107,7 @@ RSpec.describe 'query Jira import data' do
let(:query) do
%(
query {
project(fullPath:"#{project.full_path}") {
project(fullPath: "#{project.full_path}") {
jiraImports(first: 1) {
nodes {
jiraProjectKey
......@@ -133,7 +133,7 @@ RSpec.describe 'query Jira import data' do
let(:query) do
%(
query {
project(fullPath:"#{project.full_path}") {
project(fullPath: "#{project.full_path}") {
jiraImports(last: 1) {
nodes {
jiraProjectKey
......
......@@ -76,16 +76,16 @@ RSpec.describe 'getting project information' do
def run_query(number)
q = <<~GQL
query {
project(fullPath: "#{project.full_path}") {
mergeRequests(first: #{number}) {
nodes {
assignees { nodes { username } }
headPipeline { status }
query {
project(fullPath: "#{project.full_path}") {
mergeRequests(first: #{number}) {
nodes {
assignees { nodes { username } }
headPipeline { status }
}
}
}
}
}
GQL
post_graphql(q, current_user: current_user)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment