Skip to content

Commit

Permalink
Adapt attribute features beta tests
Browse files Browse the repository at this point in the history
  • Loading branch information
David Kang committed May 11, 2020
1 parent 2443d4f commit fcefd93
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/api/spec/features/beta/webui/attributes_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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.')
Expand All @@ -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

Expand Down
7 changes: 6 additions & 1 deletion src/api/spec/support/features/features_attribute.rb
Original file line number Diff line number Diff line change
@@ -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')
Expand Down

0 comments on commit fcefd93

Please sign in to comment.