diff --git a/lib/apress/selenium_eti/spec/company_site/eti/product_creation_spec.rb b/lib/apress/selenium_eti/spec/company_site/eti/product_creation_spec.rb index 9ab9de4..8e54c7f 100644 --- a/lib/apress/selenium_eti/spec/company_site/eti/product_creation_spec.rb +++ b/lib/apress/selenium_eti/spec/company_site/eti/product_creation_spec.rb @@ -63,7 +63,7 @@ context 'когда копируем товар' do before(:all) do @product = { - name: Faker::Name.title, + name: Faker::Number.number(5), rubric: CONFIG['eti']['rubric'], exists: CONFIG['eti']['exists']['in stock'], short_description: CONFIG['product_creation']['short_description']['valid'], diff --git a/lib/pages/company_site/eti_page.rb b/lib/pages/company_site/eti_page.rb index 9a51f1c..3031b7d 100644 --- a/lib/pages/company_site/eti_page.rb +++ b/lib/pages/company_site/eti_page.rb @@ -237,8 +237,8 @@ def set_description(text) def set_portal_traits(name, options = {}) Page.text_area(:trait_1, xpath: "//input[@data-name='#{CONFIG['eti']['portal_traits']['trait_1']}']") Page.text_area(:trait_2, xpath: "//input[@data-name='#{CONFIG['eti']['portal_traits']['trait_2']}']") - Page.link(:trait_link1, xpath: "//a[text()='#{options.fetch(:trait_1, '')}']") - Page.link(:trait_link2, xpath: "//a[text()='#{options.fetch(:trait_2, '')}']") + Page.link(:trait_link1, css: ".js-item-trait[data-value='#{options.fetch(:trait_1, '')}']") + Page.link(:trait_link2, css: ".js-item-trait[data-value='#{options.fetch(:trait_2, '')}']") Page.span(:portal_traits_cell, xpath: "//td[@data-text='#{name}']/..//*[contains(text(), 'указать характеристики')]")