0

機能テストの目的で、ほぼ同じ 6 つの製品ページがあります。それらの違いは、現時点では何もしていない説明と画像のみです。これは私のcurrent_setupです:ベースページ:product_page.rb

class ProductPage
  button(:add_fruit_proceed, :id => add_fruit)
  text_field(:fruit_quantity, :id => fruit_quantity)
end

製品ページはすべて次のようになります: apple_page.rb

class ApplePage < ProductPage
  page_url "#{domain}/fruit/apple"
end

これらすべてを統合して、product_page.rb だけにする方法はありますか? テストで visit(ApplePage) を使用しているため、page_url が必要です。

4

1 に答える 1