summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGrzegorz Bizon <grzesiek.bizon@gmail.com>2018-01-11 12:26:09 +0100
committerGrzegorz Bizon <grzesiek.bizon@gmail.com>2018-01-11 12:26:09 +0100
commitaf1680ab2d46d82cb7b4c32f0eca6ad682428bb0 (patch)
tree82eac658a16e9e5d181589475ec448d14c75bdc9
parenta3ab8aa3bbcf83c80e8f6195994bd531507e7348 (diff)
downloadgitlab-ce-feature/qa/gb/populate-qa-factories-with-data.tar.gz
Populate QA project factory product with project namefeature/qa/gb/populate-qa-factories-with-data
-rw-r--r--qa/qa/factory/resource/project.rb4
-rw-r--r--qa/qa/specs/features/project/create_spec.rb4
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/
)