diff options
Diffstat (limited to 'qa/qa/factory/resource/user.rb')
-rw-r--r-- | qa/qa/factory/resource/user.rb | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/qa/qa/factory/resource/user.rb b/qa/qa/factory/resource/user.rb index e8b9ea2e6b4..6e6f46f7a95 100644 --- a/qa/qa/factory/resource/user.rb +++ b/qa/qa/factory/resource/user.rb @@ -5,7 +5,6 @@ module QA module Resource class User < Factory::Base attr_reader :unique_id - attr_writer :username, :password, :name, :email def initialize @unique_id = SecureRandom.hex(8) @@ -31,14 +30,14 @@ module QA defined?(@username) && defined?(@password) end - product(:name) { |factory| factory.name } - product(:username) { |factory| factory.username } - product(:email) { |factory| factory.email } - product(:password) { |factory| factory.password } + attribute :name + attribute :username + attribute :email + attribute :password def fabricate! # Don't try to log-out if we're not logged-in - if Page::Main::Menu.act { has_personal_area?(wait: 0) } + if Page::Main::Menu.perform { |p| p.has_personal_area?(wait: 0) } Page::Main::Menu.perform { |main| main.sign_out } end |