Chore: Initialize Cypress tests (#1078)
Addresses: #412 Co-authored-by: Pranav Raj S <pranav@thoughtwoot.com>
This commit is contained in:
10
spec/cypress/app_commands/clean.rb
Normal file
10
spec/cypress/app_commands/clean.rb
Normal file
@@ -0,0 +1,10 @@
|
||||
if defined?(DatabaseCleaner)
|
||||
# cleaning the database using database_cleaner
|
||||
DatabaseCleaner.strategy = :truncation
|
||||
DatabaseCleaner.clean
|
||||
else
|
||||
logger.warn 'add database_cleaner or update cypress/app_commands/clean.rb'
|
||||
Post.delete_all if defined?(Post)
|
||||
end
|
||||
|
||||
Rails.logger.info 'APPCLEANED' # used by log_fail.rb
|
||||
Reference in New Issue
Block a user