Skip to content

Commit

Permalink
Fix: improve tests stability and some fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Copperface committed Jan 25, 2018
1 parent 008e7ed commit 8f93ff2
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,8 @@
@name = Faker::Number.number(5)
@cs_eti_page.add_product
@cs_eti_page.set_name(@name)
@cs_eti_page.wait_until { @cs_eti_page.save_status == 'Все изменения сохранены' }
@cs_eti_page.wait_saving
@cs_eti_page.refresh
@cs_eti_page.wait_until { @cs_eti_page.save_status == 'Все изменения сохранены' }
@cs_eti_page.search_product(@name)
end

Expand All @@ -37,11 +36,11 @@
before(:all) do
@name = Faker::Number.number(5)
@cs_eti_page.add_product
@cs_eti_page.set_rubric(CONFIG['eti']['rubric'])
@cs_eti_page.set_name(@name)
@cs_eti_page.wait_saving
@cs_eti_page.set_rubric(CONFIG['eti']['rubric'])
@cs_eti_page.wait_until { @cs_eti_page.first_product_status_element.attribute('title') == 'Опубликованные' }
@cs_eti_page.refresh
@cs_eti_page.wait_until { @cs_eti_page.save_status == 'Все изменения сохранены' }
@cs_eti_page.search_product(@name)
end

Expand Down Expand Up @@ -85,7 +84,6 @@

@cs_eti_page.refresh
@cs_eti_page.search_product(@product[:name])
@cs_eti_page.wait_saving
end

it 'отобразится 2 идентичных товара' do
Expand Down
2 changes: 2 additions & 0 deletions lib/pages/company_site/eti_page.rb
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ class EtiPage < Page
link(:page_2, xpath: "//*[@data-page='2']")
link(:page_1, xpath: "//*[@data-page='1']")
span(:found_products_count, css: '.js-products-count')
spans(:product_names, css: '.js-eti-name')
radio_button(:from_to, xpath: "(//*[@class = 'va-1 mr5 js-select-type-price'])[2]")
radio_button(:discount, xpath: "(//*[@class = 'va-1 mr5 js-select-type-price'])[3]")

Expand Down Expand Up @@ -319,6 +320,7 @@ def search_product(name)
check_exact_search
self.product_search = name
search_button
wait_until { product_names_elements[0] != name }
end

def delete_product(name)
Expand Down

0 comments on commit 8f93ff2

Please sign in to comment.