Chore: Initialize Cypress tests (#1078)
Addresses: #412 Co-authored-by: Pranav Raj S <pranav@thoughtwoot.com>
This commit is contained in:
12
spec/cypress/app_commands/factory_bot.rb
Normal file
12
spec/cypress/app_commands/factory_bot.rb
Normal file
@@ -0,0 +1,12 @@
|
||||
Array.wrap(command_options).map do |factory_options|
|
||||
factory_method = factory_options.shift
|
||||
begin
|
||||
logger.debug "running #{factory_method}, #{factory_options}"
|
||||
CypressOnRails::SmartFactoryWrapper.public_send(factory_method, *factory_options)
|
||||
rescue StandardError => e
|
||||
logger.error "#{e.class}: #{e.message}"
|
||||
logger.error e.backtrace.join("\n")
|
||||
logger.error e.record.inspect.to_s if e.is_a?(ActiveRecord::RecordInvalid)
|
||||
raise e
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user