forked from solidusio-contrib/solidus_comments
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from Sinetheta/solidus-compat
Make compatible with Solidus master
- Loading branch information
Showing
17 changed files
with
123 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
sudo: false | ||
language: ruby | ||
rvm: | ||
- 2.3.0 | ||
env: | ||
matrix: | ||
- SOLIDUS_BRANCH=v1.0 | ||
- SOLIDUS_BRANCH=v1.1 | ||
- SOLIDUS_BRANCH=v1.2 | ||
- SOLIDUS_BRANCH=v1.3 | ||
- SOLIDUS_BRANCH=master |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
Empty file.
Empty file.
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
require 'spec_helper' | ||
|
||
RSpec.feature 'Order Comments', :js do | ||
let!(:order) { create(:completed_order_with_totals) } | ||
|
||
before :each do | ||
login_as_admin | ||
end | ||
|
||
it "adding comments" do | ||
visit spree.comments_admin_order_path(order) | ||
expect(page).to have_text('NO COMMENTS FOUND') | ||
|
||
fill_in 'Comment', with: 'A test comment.' | ||
click_button 'Add Comment' | ||
|
||
expect(page).to have_text(/Comments \(1\)/i) # uppercase < v1.2, sentence case >= v1.3 | ||
expect(page).to have_text('A test comment.') | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
require 'capybara/rspec' | ||
require 'capybara/rails' | ||
require 'capybara/poltergeist' | ||
|
||
RSpec.configure do |config| | ||
config.include Rack::Test::Methods, type: :requests | ||
|
||
Capybara.javascript_driver = :poltergeist | ||
Capybara.register_driver(:poltergeist) do |app| | ||
Capybara::Poltergeist::Driver.new app, js_errors: true, timeout: 60 | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
require 'database_cleaner' | ||
|
||
RSpec.configure do |config| | ||
|
||
config.before(:suite) do | ||
DatabaseCleaner.clean_with :truncation | ||
end | ||
|
||
config.before do | ||
DatabaseCleaner.strategy = :transaction | ||
end | ||
|
||
config.before(:each, :js) do | ||
DatabaseCleaner.strategy = :truncation | ||
end | ||
|
||
config.before do | ||
DatabaseCleaner.start | ||
end | ||
|
||
config.after do | ||
DatabaseCleaner.clean | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
require 'ffaker' | ||
require 'factory_girl' | ||
|
||
FactoryGirl.find_definitions | ||
|
||
RSpec.configure do |config| | ||
config.include FactoryGirl::Syntax::Methods | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
module FeatureHelper | ||
def login_as_admin | ||
admin = create(:admin_user, password: 'test123', password_confirmation: 'test123') | ||
visit spree.admin_path | ||
fill_in 'Email', with: admin.email | ||
fill_in 'Password', with: 'test123' | ||
click_button 'Login' | ||
admin | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
require 'spree/testing_support/factories' | ||
require 'spree/testing_support/url_helpers' | ||
require 'spree/testing_support/capybara_ext' | ||
|
||
RSpec.configure do |config| | ||
config.include Spree::TestingSupport::UrlHelpers | ||
end |