diff options
author | Grzegorz Bizon <grzesiek.bizon@gmail.com> | 2018-01-11 14:26:09 +0300 |
---|---|---|
committer | Grzegorz Bizon <grzesiek.bizon@gmail.com> | 2018-01-11 14:26:09 +0300 |
commit | af1680ab2d46d82cb7b4c32f0eca6ad682428bb0 (patch) | |
tree | 82eac658a16e9e5d181589475ec448d14c75bdc9 /qa | |
parent | a3ab8aa3bbcf83c80e8f6195994bd531507e7348 (diff) |
Populate QA project factory product with project name
Diffstat (limited to 'qa')
-rw-r--r-- | qa/qa/factory/resource/project.rb | 4 | ||||
-rw-r--r-- | qa/qa/specs/features/project/create_spec.rb | 4 |
2 files changed, 7 insertions, 1 deletions
diff --git a/qa/qa/factory/resource/project.rb b/qa/qa/factory/resource/project.rb index 07c2e3086d1..7df2dc6618c 100644 --- a/qa/qa/factory/resource/project.rb +++ b/qa/qa/factory/resource/project.rb @@ -13,6 +13,10 @@ module QA @description = 'My awesome project' end + product :name do + Page::Project::Show.act { project_name } + end + def fabricate! group.visit! diff --git a/qa/qa/specs/features/project/create_spec.rb b/qa/qa/specs/features/project/create_spec.rb index 61c19378ae0..b1c07249892 100644 --- a/qa/qa/specs/features/project/create_spec.rb +++ b/qa/qa/specs/features/project/create_spec.rb @@ -4,11 +4,13 @@ module QA Runtime::Browser.visit(:gitlab, Page::Main::Login) 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.description = 'create awesome project test' end + expect(created_project.name).to match /^awesome-project-\h{16}$/ + expect(page).to have_content( /Project \S?awesome-project\S+ was successfully created/ ) |