Sha256: 71fc97bdc2d3a124bd38396cc975620e94f877c009323fd80634b8d7787168b7

Contents?: true

Size: 1.23 KB

Versions: 7

Compression:

Stored size: 1.23 KB

Contents

require 'test_helper'

module Workarea
  module Admin
    class InventorySkusSystemTest < SystemTest
      include Admin::IntegrationTest

      def test_management
        visit admin.inventory_skus_path
        click_link 'add_inventory_sku'

        fill_in 'sku[id]', with: 'SKU1'
        click_button 'create_sku'
        assert(page.has_content?('Success'))
        assert(page.has_content?('SKU1'))

        click_link 'Attributes'
        fill_in 'sku[available]', with: '10'
        click_button 'save_sku'
        assert(page.has_content?('Success'))
        assert(page.has_content?('10'))

        visit admin.inventory_skus_path
        assert(page.has_ordered_text?('SKU1', '10', '0', '0', 'Ignore'))

        visit admin.inventory_sku_path('SKU1')
        click_link 'Delete'

        assert_current_path(admin.inventory_skus_path)
        assert(page.has_content?('Success'))
        refute_text('SKU1')
      end

      def test_editing_a_non_existent_sku
        visit admin.edit_inventory_sku_path('SKU1')

        assert(page.has_content?('SKU1'))
        fill_in 'sku[available]', with: '10'
        click_button 'save_sku'
        assert(page.has_content?('Success'))
        assert(page.has_content?('SKU1'))
      end
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
workarea-admin-3.5.27 test/system/workarea/admin/inventory_skus_system_test.rb
workarea-admin-3.5.26 test/system/workarea/admin/inventory_skus_system_test.rb
workarea-admin-3.5.25 test/system/workarea/admin/inventory_skus_system_test.rb
workarea-admin-3.5.23 test/system/workarea/admin/inventory_skus_system_test.rb
workarea-admin-3.5.22 test/system/workarea/admin/inventory_skus_system_test.rb
workarea-admin-3.5.21 test/system/workarea/admin/inventory_skus_system_test.rb
workarea-admin-3.5.20 test/system/workarea/admin/inventory_skus_system_test.rb