mirror of
https://github.com/edcommonwealth/sqm-dashboards.git
synced 2026-03-07 21:48:16 -08:00
Seed db with Professional Qualifications construct
This commit is contained in:
parent
c5bd1a9b3f
commit
acac8f67b0
11 changed files with 67 additions and 21 deletions
|
|
@ -20,6 +20,7 @@ feature "School dashboard", type: feature do
|
|||
visit "/districts/winchester/schools/#{school.slug}/dashboard?year=2020-21"
|
||||
|
||||
expect(page).to have_text(school.name)
|
||||
expect(page).to have_text('Professional Qualifications')
|
||||
end
|
||||
|
||||
let(:username) { 'winchester' }
|
||||
|
|
|
|||
14
spec/models/construct_spec.rb
Normal file
14
spec/models/construct_spec.rb
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
require 'rails_helper'
|
||||
|
||||
describe Construct, type: :model do
|
||||
it 'returns the construct for the given construct id' do
|
||||
construct = Construct.find_by_construct_id('1A-i')
|
||||
|
||||
expect(construct.name).to eq 'Professional Qualifications'
|
||||
expect(construct.warning_zone).to eq Construct::Zone.new(1.0, 2.5, :warning)
|
||||
expect(construct.watch_zone).to eq Construct::Zone.new(2.5, 3.0, :watch)
|
||||
expect(construct.growth_zone).to eq Construct::Zone.new(3.0, 3.5, :growth)
|
||||
expect(construct.approval_zone).to eq Construct::Zone.new(3.5, 4.7, :approval)
|
||||
expect(construct.ideal_zone).to eq Construct::Zone.new(4.7, 5.0, :ideal)
|
||||
end
|
||||
end
|
||||
|
|
@ -9,7 +9,7 @@ RSpec.describe "construct graph row presenter" do
|
|||
|
||||
let(:construct) {
|
||||
Construct.new(
|
||||
title: 'Some Title',
|
||||
name: 'Some Title',
|
||||
watch_low_benchmark: watch_low_benchmark,
|
||||
growth_low_benchmark: growth_low_benchmark,
|
||||
approval_low_benchmark: approval_low_benchmark,
|
||||
|
|
@ -23,7 +23,7 @@ RSpec.describe "construct graph row presenter" do
|
|||
|
||||
shared_examples_for 'construct_title' do
|
||||
it('returns the construct title') do
|
||||
expect(presenter.construct_title).to eq 'Some Title'
|
||||
expect(presenter.construct_name).to eq 'Some Title'
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
|||
|
|
@ -50,6 +50,10 @@ RSpec.configure do |config|
|
|||
|
||||
config.include Capybara::DSL
|
||||
|
||||
config.before(:suite) do
|
||||
Rails.application.load_seed # loading seeds
|
||||
end
|
||||
|
||||
# The settings below are suggested to provide a good initial experience
|
||||
# with RSpec, but feel free to customize to your heart's content.
|
||||
=begin
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue