Sha256: 383b79b3e042bd2428b73f5e45efc58cd6cdcebf1a6eec23f56cd78ce7554a8b

Contents?: true

Size: 780 Bytes

Versions: 5

Compression:

Stored size: 780 Bytes

Contents

require 'test_helper'

module Workarea
  decorate Storefront::NavigationSystemTest, with: :nvy_theme do
    def test_mobile_navigation_menus
      resize_window_to('small')

      leaf = create_taxon(name: 'Leaf', url: 'http://example.com')
      menu = create_menu(taxon: leaf)
      content = Content.for(menu)
      content.blocks.create!(type: 'text', data: { text: 'Foo' })

      visit storefront.root_path
      click_link 'mobile_nav_button'

      click_link 'First Level'
      assert(page.has_content?('Second Level'))

      click_link '◀'
      click_link 'Leaf'
      assert(page.has_content?('Foo'))
      assert_current_path(storefront.root_path)

      page.execute_script("$('body').trigger('click');")
      refute(page.has_content?('Foo'))
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
workarea-nvy_theme-1.2.1 test/system/workarea/storefront/navigation_system_test.decorator
workarea-nvy_theme-1.2.0 test/system/workarea/storefront/navigation_system_test.decorator
workarea-nvy_theme-1.1.4 test/system/workarea/storefront/navigation_system_test.decorator
workarea-nvy_theme-1.1.3 test/system/workarea/storefront/navigation_system_test.decorator
workarea-nvy_theme-1.1.2 test/system/workarea/storefront/navigation_system_test.decorator