Skip to content

OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub

719 B
Raw Blame
require "spec_helper"

RSpec.describe "Work package table log unit costs", :js do
  let(:user) { create(:admin) }
  let(:work_package) { create(:work_package) }

  let(:wp_table) { Pages::WorkPackagesTable.new }
  let(:menu) { Components::WorkPackages::ContextMenu.new }

  def goto_context_menu
    # Go to table
    wp_table.visit!
    wp_table.expect_work_package_listed(work_package)

    # Open context menu
    menu.expect_closed
    menu.open_for(work_package)
  end

  before do
    login_as(user)
    work_package

    goto_context_menu
  end

  it "renders the log unit costs menu item" do
    menu.choose(I18n.t(:label_log_costs))
    expect(page).to have_css("h2", text: I18n.t(:label_log_costs))
  end
end