prestashop-automation 0.8.1 → 0.8.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -62,6 +62,11 @@ module PrestaShopAutomation
62
62
  wait_until do
63
63
  has_selector? 'a.BO' and has_selector? 'a.FO'
64
64
  end
65
+
66
+ if options[:paranoid]
67
+ login_to_back_office
68
+ login_to_front_office
69
+ end
65
70
  end
66
71
 
67
72
  def add_module_from_repo repo, branch=nil
@@ -81,12 +86,14 @@ module PrestaShopAutomation
81
86
  expect(client.query("SELECT * FROM #{safe_database_name}.#{@database_prefix}module WHERE name='#{client.escape name}'").count).to be 1
82
87
  end
83
88
 
84
- def update_all_modules
89
+ def update_all_modules strict=false
85
90
  goto_admin_tab 'AdminModules'
86
91
  if has_selector? '#desc-module-update-all'
87
92
  click '#desc-module-update-all'
88
- goto_admin_tab 'AdminModules'
89
- expect_to have_selector '#desc-module-check-and-update-all'
93
+ if strict
94
+ goto_admin_tab 'AdminModules'
95
+ expect_to have_selector '#desc-module-check-and-update-all'
96
+ end
90
97
  end
91
98
  end
92
99
 
@@ -1,4 +1,4 @@
1
- require 'rspec-expectations'
1
+ require 'rspec'
2
2
  require 'capybara'
3
3
  require 'shellwords'
4
4
 
@@ -19,7 +19,6 @@ module PrestaShopAutomation
19
19
 
20
20
  include RSpec::Expectations
21
21
  include RSpec::Matchers
22
- #include Capybara::RSpecMatchers
23
22
 
24
23
  include PrestaShopAutomation::GeneralHelpers
25
24
 
@@ -32,6 +31,11 @@ module PrestaShopAutomation
32
31
  include PrestaShopAutomation::OrdersActions
33
32
  include PrestaShopAutomation::InstallerActions
34
33
 
34
+ # Rspec defines this method, but we want the one from Capybara::Session
35
+ def all *args
36
+ Capybara::Session.instance_method(:all).bind(self).call *args
37
+ end
38
+
35
39
  def initialize options
36
40
 
37
41
  @front_office_url = options[:front_office_url]
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: prestashop-automation
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.1
4
+ version: 0.8.4
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: