Commit 35a4a84e authored by Nick Thomas's avatar Nick Thomas

Merge branch 'cablett-refactor-test' into 'master'

Refactor issue designs tests to use nodes

See merge request gitlab-org/gitlab!44887
parents 826711fa 89d2368c
......@@ -31,8 +31,8 @@ RSpec.describe 'Getting designs related to an issue' do
post_graphql(query(note_fields), current_user: nil)
designs_data = graphql_data['project']['issue']['designs']['designs']
design_data = designs_data['edges'].first['node']
note_data = design_data['notes']['edges'].first['node']
design_data = designs_data['nodes'].first
note_data = design_data['notes']['nodes'].first
expect(note_data['id']).to eq(note.to_global_id.to_s)
end
......@@ -40,18 +40,14 @@ RSpec.describe 'Getting designs related to an issue' do
def query(note_fields = all_graphql_fields_for(Note))
design_node = <<~NODE
designs {
edges {
node {
nodes {
notes {
edges {
node {
nodes {
#{note_fields}
}
}
}
}
}
}
NODE
graphql_query_for(
'project',
......
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