Fix broken specs

pull/4879/head
Henriette Dinger 8 years ago
parent d2d9a3ec12
commit c30da3e640
  1. 6
      features/reportings/reporting_permissions.feature
  2. 4
      features/timelines/timeline_view.feature
  3. 3
      lib/redmine/menu_manager/top_menu/projects_menu.rb
  4. 6
      spec/features/members/invitation_spec.rb
  5. 4
      spec/support/pages/members.rb

@ -103,7 +103,7 @@ Feature: Reporting Permissions
And I go to the page of the project called "Santas Project"
And I open the "Timelines" menu
And I click on "Status reportings"
And I click on "New reporting"
And I click on "Reporting" within ".toolbar-items"
And I select "World Domination" from "Reports to project"
And I click on "Create"
@ -132,7 +132,7 @@ Feature: Reporting Permissions
When I go to the page of the project called "Santas Project"
And I open the "Timelines" menu
And I click on "Status reportings"
Then I should not see "New reporting"
Then I should not see "Reporting" within ".toolbar-items"
Scenario: Can see reportings as a privileged user
Given the user "editor" is a "random guy" in the Project "World Domination"
@ -145,7 +145,7 @@ Feature: Reporting Permissions
And I open the "Timelines" menu
And I click on "Status reportings"
Then I should see "New reporting"
Then I should see "Reporting" within ".toolbar-items"
And I should see "Edit" for report "World Domination"
And I should not see "Delete status reported to project: World Domination"

@ -53,7 +53,7 @@ Feature: Timeline View Tests
Scenario: Creating a timeline
When there is a timeline "Testline" for project "ecookbook"
When I go to the page of the timeline "Testline" of the project called "ecookbook"
Then I should see "New timeline report"
Then I should see "Timeline report" within ".toolbar-items"
And I should see "Testline"
And I should be on the page of the timeline "Testline" of the project called "ecookbook"
@ -83,6 +83,6 @@ Feature: Timeline View Tests
And I go to the page of the project called "ecookbook"
And I follow "Timelines"
And I select "Testline2" from "Timeline report"
Then I should see "New timeline report"
Then I should see "Timeline report" within ".toolbar-items"
And I should see "Testline2"
And I should be on the page of the timeline "Testline2" of the project called "ecookbook"

@ -102,7 +102,8 @@ module Redmine::MenuManager::TopMenu::ProjectsMenu
html: {
class: "icon-add #{icon_class}",
accesskey: OpenProject::AccessKeys.key_for(:new_project),
aria: {label: t(:label_project_new)}
aria: {label: t(:label_project_new)},
title: t(:label_project_new)
},
if: Proc.new { User.current.allowed_to?(:add_project, nil, global: true) }
)

@ -42,7 +42,7 @@ feature 'invite user via email', type: :feature, js: true do
context 'with a new user' do
scenario 'adds the invited user to the project' do
members_page.visit!
click_on 'Add Member'
page.find('#add-member-button').click
members_page.search_and_select_principal! 'finkelstein@openproject.com',
'Invite finkelstein@openproject.com'
@ -64,7 +64,7 @@ feature 'invite user via email', type: :feature, js: true do
scenario 'user lookup by email' do
members_page.visit!
click_on 'Add Member'
page.find('#add-member-button').click
members_page.search_and_select_principal! 'hugo@openproject.com',
'Hugo Hurried'
@ -82,7 +82,7 @@ feature 'invite user via email', type: :feature, js: true do
shared_examples 'no user to invite is found' do
scenario 'no matches found' do
members_page.visit!
click_on 'Add Member'
page.find('#add-member-button').click
members_page.search_principal! 'hugo@openproject.com'
expect(members_page).to have_no_search_results

@ -43,7 +43,7 @@ module Pages
end
def open_new_member!
click_on 'Add Member'
page.find('#add-member-button').click
end
##
@ -52,7 +52,7 @@ module Pages
# @param user_name [String] The full name of the user.
# @param as [String] The role as which the user should be added.
def add_user!(user_name, as:)
click_on 'Add Member'
page.find('#add-member-button').click
select_principal! user_name if user_name
select_role! as if as

Loading…
Cancel
Save