debian-mirror-gitlab/spec/features/milestones/user_creates_milestone_spec.rb

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

32 lines
787 B
Ruby
Raw Normal View History

2019-10-12 21:52:04 +05:30
# frozen_string_literal: true
2019-12-04 20:38:33 +05:30
require 'spec_helper'
2018-10-15 14:42:47 +05:30
2020-06-23 00:09:42 +05:30
RSpec.describe "User creates milestone", :js do
2020-04-08 14:13:33 +05:30
let_it_be(:user) { create(:user) }
let_it_be(:project) { create(:project) }
2018-10-15 14:42:47 +05:30
before do
project.add_developer(user)
sign_in(user)
visit(new_project_milestone_path(project))
end
it "creates milestone" do
2021-04-29 21:17:54 +05:30
title = "v2.3"
2018-10-15 14:42:47 +05:30
2020-05-24 23:13:21 +05:30
fill_in("Title", with: title)
2018-10-15 14:42:47 +05:30
fill_in("Description", with: "# Description header")
click_button("Create milestone")
2020-05-24 23:13:21 +05:30
expect(page).to have_content(title)
2018-10-15 14:42:47 +05:30
.and have_content("Issues")
.and have_header_with_correct_id_and_link(1, "Description header", "description-header")
visit(activity_project_path(project))
2018-12-13 13:39:08 +05:30
expect(page).to have_content("#{user.name} #{user.to_reference} opened milestone")
2018-10-15 14:42:47 +05:30
end
end