From dd4f3708d4fb1d8af6d35d0cd6fbf72da90d9474 Mon Sep 17 00:00:00 2001 From: Furtikov Kirill Date: Wed, 12 Sep 2018 00:15:19 +0500 Subject: [PATCH] fix(traits): new design of binding popup https://jira.railsc.ru/browse/AT-252 --- .../spec/company_site/eti/product_creation_spec.rb | 2 +- lib/pages/company_site/eti_page.rb | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) 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(), 'указать характеристики')]")