Sha256: 2b0f64beddb113913a3e80359e50e2959402b73459ebe95f4800bcfbe4b4cd19

Contents?: true

Size: 923 Bytes

Versions: 1

Compression:

Stored size: 923 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: '//android.widget.ScrollView' }
  section :product_list_item, ProductListItem

  def initialize
    super
    # define the list item element for the Product list object
    list_elements = { list_item: { xpath: '//android.view.ViewGroup[@content-desc="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/android/screens/products_screen.rb