diff --git a/src/api/spec/features/beta/webui/attributes_spec.rb b/src/api/spec/features/beta/webui/attributes_spec.rb index 983b260f55b..4228f12a3a1 100644 --- a/src/api/spec/features/beta/webui/attributes_spec.rb +++ b/src/api/spec/features/beta/webui/attributes_spec.rb @@ -40,7 +40,7 @@ login user visit index_attribs_path(project: user.home_project_name) - click_link('Add a new attribute') + click_menu_link('Actions', 'Add Attribute') find('select#attrib_attrib_type_id').select('OBS:VeryImportantProject') click_button('Add') expect(page).to have_content('Sorry, you are not authorized to create this Attrib.') @@ -64,7 +64,7 @@ login other_user visit index_attribs_path(project: user.home_project_name) - expect(page).not_to have_content('Add a new attribute') + expect(page).not_to have_content('Add Attribute') end end diff --git a/src/api/spec/support/features/features_attribute.rb b/src/api/spec/support/features/features_attribute.rb index cf22a856f57..580a100ae40 100644 --- a/src/api/spec/support/features/features_attribute.rb +++ b/src/api/spec/support/features/features_attribute.rb @@ -1,7 +1,12 @@ module FeaturesAttribute def add_attribute_with_values(package = nil) visit index_attribs_path(project: user.home_project_name, package: package.try(:name)) - click_link('Add Attribute') + # TODO: Remove once responsive_ux is out of beta. + if page.has_link?('Actions') + click_menu_link('Actions', 'Add Attribute') + else + click_link('Add Attribute') + end expect(page).to have_text('Add Attribute') find('select#attrib_attrib_type_id').select("#{attribute_type.attrib_namespace}:#{attribute_type.name}", match: :first) click_button('Add')