Sha256: e04dfc29e2660c884446b3a64e457274ac08cf086da2eef0dc49c6290c6c2b20

Contents?: true

Size: 976 Bytes

Versions: 25

Compression:

Stored size: 976 Bytes

Contents

# frozen_string_literal: true

require "decidim/api/test/type_context"

shared_context "with a graphql decidim component" do
  include_context "with a graphql class type"

  let(:schema) { Decidim::Api::Schema }

  let(:locale) { "en" }

  let(:participatory_process) { create :participatory_process, organization: current_organization }
  let(:category) { create(:category, participatory_space: participatory_process) }

  let(:component_type) { nil }
  let(:component_fragment) { nil }

  let(:participatory_process_query) do
    %(
      participatoryProcess(id: #{participatory_process.id}) {
        components(filter: {type: "#{component_type}"}){
          id
          name {
            translation(locale: "#{locale}")
          }
          weight
          __typename
          ...fooComponent
        }
        id
      }
    )
  end

  let(:query) do
    %(
      query {
        #{participatory_process_query}
      }
      #{component_fragment}
    )
  end
end

Version data entries

25 entries across 25 versions & 1 rubygems

Version Path
decidim-api-0.29.1 lib/decidim/api/test/component_context.rb
decidim-api-0.28.4 lib/decidim/api/test/component_context.rb
decidim-api-0.27.9 lib/decidim/api/test/component_context.rb
decidim-api-0.29.0 lib/decidim/api/test/component_context.rb
decidim-api-0.28.3 lib/decidim/api/test/component_context.rb
decidim-api-0.27.8 lib/decidim/api/test/component_context.rb
decidim-api-0.29.0.rc4 lib/decidim/api/test/component_context.rb
decidim-api-0.29.0.rc3 lib/decidim/api/test/component_context.rb
decidim-api-0.29.0.rc2 lib/decidim/api/test/component_context.rb
decidim-api-0.29.0.rc1 lib/decidim/api/test/component_context.rb
decidim-api-0.28.2 lib/decidim/api/test/component_context.rb
decidim-api-0.27.7 lib/decidim/api/test/component_context.rb
decidim-api-0.28.1 lib/decidim/api/test/component_context.rb
decidim-api-0.27.6 lib/decidim/api/test/component_context.rb
decidim-api-0.28.0 lib/decidim/api/test/component_context.rb
decidim-api-0.27.5 lib/decidim/api/test/component_context.rb
decidim-api-0.28.0.rc5 lib/decidim/api/test/component_context.rb
decidim-api-0.28.0.rc4 lib/decidim/api/test/component_context.rb
decidim-api-0.27.4 lib/decidim/api/test/component_context.rb
decidim-api-0.27.3 lib/decidim/api/test/component_context.rb