Sha256: 4561843974c057b3d8688a56d5ef49070c314a13d5367fcc2a8d0124104f7036

Contents?: true

Size: 602 Bytes

Versions: 1

Compression:

Stored size: 602 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/pages/#{page_1.url}/blocks/#{block_1a.id}"

    # Click on the 'delete' button.
    page.execute_script 'window.confirm = function() { return true }'
    find('.icon-trash').click

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

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

Version data entries

1 entries across 1 versions & 1 rubygems

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