Sha256: 3833dae6a970c92e34b773e81df9f2cd1e782f90d78ea1d8624cd03a6aacb1c2

Contents?: true

Size: 939 Bytes

Versions: 1

Compression:

Stored size: 939 Bytes

Contents

class ProductsScreen < BaseAppScreen
  trait(:page_name)    { 'Products' }
  trait(:page_locator) { { accessibility_id: 'products screen' } }
  trait(:page_url)     { 'store-overview' }

  # Products screen UI elements
  list    :product_list, { xpath: '//XCUIElementTypeScrollView/XCUIElementTypeOther[1]' }
  section :product_list_item, ProductListItem

  def initialize
    super
    # define the list item element for the Product list object
    list_elements = { list_item: { xpath: '//XCUIElementTypeOther[@name="store item"]' } }
    product_list.define_list_elements(list_elements)
    # associate the Product List Item indexed section object with the Product list object
    product_list_item.set_list_index(product_list)
  end

  def verify_page_ui
    super
    ui = {
      header_label => { visible: true, caption: 'Products' },
      # product_list => { visible: true, itemcount: 6 }
    }
    verify_ui_states(ui)
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
testcentricity-3.0.4 features/support/ios/screens/products_screen.rb