Sha256: 59a7c352fb78f0dafe9a7e81be56cd0f56ec1d5289f4dcd26b0de6f67b51b915

Contents?: true

Size: 593 Bytes

Versions: 2

Compression:

Stored size: 593 Bytes

Contents

require 'spec_helper'

feature 'ImageLayers > Delete', js: true do
  include NamedFactories

  scenario 'deleting an image layer' do
    image_layer_1a1

    capybara_sign_in user_1
    visit "/flms/blocks/#{block_1a.id}/edit"

    # Click on the 'delete' button.
    page.execute_script 'window.confirm = function() { return true }'
    click_link "delete-layer-#{image_layer_1a1.id}"

    # Expect to be back at the block page.
    expect(current_path).to eql "/flms/blocks/#{block_1a.id}/edit"

    # Expect that the layer is deleted.
    expect(Flms::Layer).to have(0).instances
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
flms-0.9.0 spec/features/layers/image_layers/delete_spec.rb
flms-0.1.0 spec/features/layers/image_layers/delete_spec.rb