Sha256: 3f0c0367a07e2e4cf0a9e12254c1c28d6a6b3b5974bbb21a196002046248f8a6
Contents?: true
Size: 842 Bytes
Versions: 3
Compression:
Stored size: 842 Bytes
Contents
# frozen_string_literal: true require 'spec_helper' feature 'Defining charts in a questionnaire' do let(:questionnaire_with_chart) { Quby.questionnaires.find('questionnaire_with_chart') } it 'has a chart with plottables' do plottable_keys = questionnaire_with_chart.charts.first.plottables.map(&:key) expect(plottable_keys).to eq([:total, :v_1, :v_2, :v_3]) end it 'has labels for each plottable' do plottable_labels = questionnaire_with_chart.charts.first.plottables.map(&:label) expect(plottable_labels).to eq(["Total", "Label 1", "Title 2", "Title 3"]) end it 'has an overview' do expect(questionnaire_with_chart.charts.overview).to be_present expect(questionnaire_with_chart.charts.overview.y_max).to eq(100) expect(questionnaire_with_chart.charts.overview.subscore).to eq(:value) end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
quby-3.2.1 | spec/features/charts_spec.rb |
quby-3.2.0 | spec/features/charts_spec.rb |
quby-3.2.0.pre.pre1 | spec/features/charts_spec.rb |