Commit af1680ab authored by Grzegorz Bizon's avatar Grzegorz Bizon

Populate QA project factory product with project name

parent a3ab8aa3
...@@ -13,6 +13,10 @@ module QA ...@@ -13,6 +13,10 @@ module QA
@description = 'My awesome project' @description = 'My awesome project'
end end
product :name do
Page::Project::Show.act { project_name }
end
def fabricate! def fabricate!
group.visit! group.visit!
......
...@@ -4,11 +4,13 @@ module QA ...@@ -4,11 +4,13 @@ module QA
Runtime::Browser.visit(:gitlab, Page::Main::Login) Runtime::Browser.visit(:gitlab, Page::Main::Login)
Page::Main::Login.act { sign_in_using_credentials } Page::Main::Login.act { sign_in_using_credentials }
Factory::Resource::Project.fabricate! do |project| created_project = Factory::Resource::Project.fabricate! do |project|
project.name = 'awesome-project' project.name = 'awesome-project'
project.description = 'create awesome project test' project.description = 'create awesome project test'
end end
expect(created_project.name).to match /^awesome-project-\h{16}$/
expect(page).to have_content( expect(page).to have_content(
/Project \S?awesome-project\S+ was successfully created/ /Project \S?awesome-project\S+ was successfully created/
) )
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment