Commit Graph

102 Commits

Author SHA1 Message Date
Frank West
0d7352813c Set the SSL protocol for secure connections
There are ssl errors when using stripe through phantom js. This allows
other SSL protocols now.
2018-06-15 11:43:26 -07:00
Daniel Dominguez
9d9a974295 Switched gem FactoryGirl to FactoryBot as FactoryGirl is deprecated.
- Change FactoryGirl to FactoryBot everywhere on code.
2018-05-04 11:52:08 -03:00
Pau Perez
719c45b408 Apply Rails 4 patch at boot time not only specs
This makes this patch available also for things like database-related
rake tasks. It moves the patch to an initializer.
2018-02-07 16:21:16 +11:00
Maikel Linke
b70edd5424 Enabling non-privileged postgres users to run specs
Addressing issue #245.

A combination of fixtures and foreign key constraints requires the postgres
user to be superuser. Otherwise an attempt to disable constraints fails.
This got fixed in Rails 4 and this patch brings the same behaviour back to
Rails 3. It will allow us to run the specs with a nosuperuser postgres user.

See:
 - https://github.com/matthuhiggins/foreigner/issues/61
 - 9bb27f7ffe
2018-02-07 16:21:16 +11:00
Enrico Stano
01b0a033fd Merge pull request #1904 from oeoeaio/spree-test-config
Use Spree's approach for preventing config caching when testing
2017-12-04 15:57:11 +11:00
Andy Palmer
e94dc257a1 We actually need to restart the driver, not the session 2017-11-10 08:47:12 +11:00
Andy Palmer
3bd4fc59d4 We reset the phantom js driver after each context to prevent it memory leaking and dying 2017-11-10 08:47:12 +11:00
Maikel Linke
5a767ba3ef Avoid warning, use new syntax 2017-11-10 08:47:12 +11:00
Rob Harrington
7dbfc3740d Revert "Add workaround to pass Spree core tests in Travis"
This reverts commit 9cdec737078caa6eb5a90480cabb6ca477ab597b.
2017-11-10 08:47:12 +11:00
Julius Pabrinkis
b18177c215 Add workaround to pass Spree core tests in Travis 2017-11-10 08:47:12 +11:00
Matt-Yorkley
01647c3df9 Disable allow_backorders by default in test environment 2017-11-02 17:43:46 +11:00
Rob Harrington
efa71c4ac8 Use Spree's approach for handling config when testing 2017-11-02 17:43:04 +11:00
Rob Harrington
dd56e03be1 Stop setting host for url helpers in specs 2017-09-23 14:58:34 +10:00
Em-AK
b5bac722ca Fix: make rspec run 2017-09-08 23:55:49 +10:00
Rohan Mitchell
0446b8d72f TestingSupport moved out of Core namespace 2017-09-08 23:55:48 +10:00
Julius Pabrinkis
e63f1c2991 Refactor time and currency symbol getters 2017-05-03 12:59:16 +01:00
Julius Pabrinkis
a97bcf74de Use more simple getter to retrieve currency symbol 2017-05-03 11:25:37 +01:00
Julius Pabrinkis
dc69c6e825 Use currency symbol from config in tests 2017-05-03 11:25:37 +01:00
Rohan Mitchell
b13360d2d0 Extract filter helpers from individual spec to spec helper 2016-07-29 11:01:52 +10:00
Maikel Linke
e57c06c610 Use require_relative introduced in Ruby 1.9.2
The new `require_relative` command is much shorter and easier to read
then the previous:

    -require File.expand_path('../config/application', __FILE__)
    +require_relative 'config/application'
2016-07-20 16:07:35 +10:00
Maikel Linke
489feb4e01 Longer default page size for feature specs 2016-06-01 16:28:43 +10:00
Rohan Mitchell
920d3bb974 Do not show knapsack time offset warnings unless in CI 2016-02-24 15:05:01 +11:00
Maikel Linke
00af6ef9de cleanup knapsack integration 2016-01-13 15:05:48 +11:00
Maikel Linke
749061d60a knapsack report generation 2016-01-13 15:05:48 +11:00
Rohan Mitchell
a27e593924 Fix deprecation notices 2016-01-07 10:51:39 +11:00
Maikel Linke
efa7c215e2 Removing usage of SimpleCov 2015-12-04 14:51:44 +11:00
Rohan Mitchell
c932d20ef5 Extract multi-sample benchmarking into a helper method 2015-11-13 14:03:07 +11:00
Rob Harrington
bbe25da117 Adding paper_trail verisoning RSpec helpers 2015-09-17 22:37:44 +10:00
Maikel Linke
2488411b94 JS feature specs completing before cleaning db
Some specs ran into a deadlock when the Database::Cleaner tried to do
its job while AJAX requests were still triggering other actions.
2015-09-16 15:38:09 +10:00
Rohan Mitchell
af04c61528 Add rspec-retry for intermittently failing spec 2015-08-05 13:35:53 +10:00
Rohan Mitchell
bc11140a40 Make config reset for all tests more robust. Add cache isolation for parallel specs. 2015-06-24 14:02:45 +10:00
Continuous Integration
c76021462c Auto-merge from CI [skip ci] 2015-06-16 14:12:16 +10:00
Rohan Mitchell
ecbf3c8fa7 Ensure we start with consistent config settings 2015-06-11 16:16:36 +10:00
Rohan Mitchell
bfeb63c8d7 Ensure that changes to Spree::Config.products_require_tax_category do not leak out of the relevant spec 2015-06-11 14:16:18 +10:00
Rohan Mitchell
7946340dad Allow more phantomjs timeout to avoid the first-spec-timeout issue 2015-05-13 15:34:27 +10:00
Rohan Mitchell
a1673afff0 Allow more time for phantomjs, required by first admin spec where assets are compiled 2015-04-17 15:46:51 +10:00
Rohan Mitchell
2914990444 Add save_and_open spec helper method to open HTML emails in the browser 2015-04-17 13:40:08 +10:00
Rohan Mitchell
af4baabb50 Include DelayedJobHelper for specs 2015-04-16 16:54:43 +10:00
Maikel Linke
5c191bcc7f Moving test seeding into spec/support/seeds.rb 2014-12-04 15:38:59 +11:00
Maikel Linke
ef0b0a9a94 Replacing fixtures with minimal seeding
Seeding:
 1 country: Australia
 2 states:  Vic, NSW
2014-11-27 16:38:39 +11:00
Rohan Mitchell
d81a78b907 Add spec helper method for logging in as admin in controller specs 2014-07-16 10:15:27 +10:00
Maikel Linke
5459a54ada Adding perftools.rb
perftools.rb can profile your code. The spec_helper contains comments
about how to activate it.
2014-07-04 13:51:24 +10:00
Rohan Mitchell
fb05ad57e1 Tidy up spec helper, clean database before suite run 2014-05-22 11:00:29 +10:00
Rohan Mitchell
5a0cc1b6db Increase capybara default_wait_time to 30 s, now we know it's not the primary cause of spec slowdown 2014-05-09 16:39:39 +10:00
Will Marshall
c52457505e Fixing issues with offcanvas 2014-05-09 12:18:05 +10:00
Will Marshall
d9f462ba81 Moving useless assets 2014-05-09 10:12:40 +10:00
Rohan Mitchell
4ebc22f438 Remove capybara-screenshot, which appears to have been slowing down the build dramatically 2014-05-09 08:56:10 +10:00
Will Marshall
bbb70342b3 Merging 2014-05-02 15:35:43 +10:00
Rohan Mitchell
db653682b1 Add capybara-screenshot - automatic screenshots for test fails 2014-05-02 14:25:32 +10:00
Rohan Mitchell
930bc2b7ce Set increased Capybara.default_wait_time globally 2014-05-02 14:25:32 +10:00