Sha256: bba96fa1fc3a2bfd6598bc538420357e5ca7e1a787f7739cfce6ad7e12638e31
Contents?: true
Size: 885 Bytes
Versions: 2
Compression:
Stored size: 885 Bytes
Contents
require 'spec_helper' feature 'TextLayers > Create' do include NamedFactories scenario 'creating a new paragraph layer' do capybara_sign_in user_1 visit "/flms/blocks/#{block_1a.id}/edit" click_link 'Add Paragraph Layer' fill_in 'Name', with: 'my-new-layer' fill_in 'Header', with: 'header text' fill_in 'Body', with: 'body content' click_button 'Create Paragraph layer' # Expect to be back at the block edit page. expect(current_path).to eql "/flms/blocks/#{block_1a.id}/edit" # Expect that the layer is created. expect(Flms::Layer).to have(1).instances expect(block_1a.reload).to have(1).layers layer = block_1a.layers.first expect(layer.class).to eql Flms::ParagraphLayer expect(layer.name).to eql 'my-new-layer' expect(layer.header).to eql 'header text' expect(layer.body).to eql 'body content' end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
flms-0.9.0 | spec/features/layers/paragraph_layers/create_spec.rb |
flms-0.1.0 | spec/features/layers/paragraph_layers/create_spec.rb |