Sha256: 24e46257d54b7818649d65b6ac7ac4831742b39c5a4f3e0939a5d24cd5f600c4

Contents?: true

Size: 966 Bytes

Versions: 25

Compression:

Stored size: 966 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) {}
  let(:component_fragment) {}

  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.26.10 lib/decidim/api/test/component_context.rb
decidim-api-0.26.9 lib/decidim/api/test/component_context.rb
decidim-api-0.26.8 lib/decidim/api/test/component_context.rb
decidim-api-0.26.7 lib/decidim/api/test/component_context.rb
decidim-api-0.26.5 lib/decidim/api/test/component_context.rb
decidim-api-0.26.4 lib/decidim/api/test/component_context.rb
decidim-api-0.26.3 lib/decidim/api/test/component_context.rb
decidim-api-0.26.2 lib/decidim/api/test/component_context.rb
decidim-api-0.26.1 lib/decidim/api/test/component_context.rb
decidim-api-0.26.0 lib/decidim/api/test/component_context.rb
decidim-api-0.26.0.rc2 lib/decidim/api/test/component_context.rb
decidim-api-0.26.0.rc1 lib/decidim/api/test/component_context.rb
decidim-api-0.25.2 lib/decidim/api/test/component_context.rb
decidim-api-0.25.1 lib/decidim/api/test/component_context.rb
decidim-api-0.25.0 lib/decidim/api/test/component_context.rb
decidim-api-0.25.0.rc4 lib/decidim/api/test/component_context.rb
decidim-api-0.25.0.rc3 lib/decidim/api/test/component_context.rb
decidim-api-0.25.0.rc2 lib/decidim/api/test/component_context.rb
decidim-api-0.25.0.rc1 lib/decidim/api/test/component_context.rb
decidim-api-0.24.3 lib/decidim/api/test/component_context.rb