add CookieHelper and InputHelper automatically to :js tests

This commit is contained in:
Mike Greiling 2017-11-02 10:26:09 -05:00
parent 787ef979ad
commit 61865cfc93
No known key found for this signature in database
GPG key ID: 0303DF507FA67596
10 changed files with 2 additions and 18 deletions

View file

@ -1,7 +1,6 @@
require 'rails_helper' require 'rails_helper'
describe 'Issue Boards', :js do describe 'Issue Boards', :js do
include CookieHelper
include DragTo include DragTo
let(:group) { create(:group, :nested) } let(:group) { create(:group, :nested) }

View file

@ -1,9 +1,7 @@
require 'rails_helper' require 'rails_helper'
describe 'Visual tokens', :js do describe 'Visual tokens', :js do
include CookieHelper
include FilteredSearchHelpers include FilteredSearchHelpers
include WaitForRequests
let!(:project) { create(:project) } let!(:project) { create(:project) }
let!(:user) { create(:user, name: 'administrator', username: 'root') } let!(:user) { create(:user, name: 'administrator', username: 'root') }

View file

@ -1,8 +1,6 @@
require 'rails_helper' require 'rails_helper'
feature 'GFM autocomplete', :js do feature 'GFM autocomplete', :js do
include InputHelper
let(:user) { create(:user, name: '💃speciąl someone💃', username: 'someone.special') } let(:user) { create(:user, name: '💃speciąl someone💃', username: 'someone.special') }
let(:project) { create(:project) } let(:project) { create(:project) }
let(:label) { create(:label, project: project, title: 'special+') } let(:label) { create(:label, project: project, title: 'special+') }

View file

@ -1,7 +1,6 @@
require 'spec_helper' require 'spec_helper'
feature 'Diff note avatars', :js do feature 'Diff note avatars', :js do
include CookieHelper
include NoteInteractionHelpers include NoteInteractionHelpers
let(:user) { create(:user) } let(:user) { create(:user) }

View file

@ -1,7 +1,6 @@
require 'spec_helper' require 'spec_helper'
feature 'Merge requests > User posts diff notes', :js do feature 'Merge requests > User posts diff notes', :js do
include CookieHelper
include MergeRequestDiffHelpers include MergeRequestDiffHelpers
let(:user) { create(:user) } let(:user) { create(:user) }

View file

@ -1,8 +1,6 @@
require 'rails_helper' require 'rails_helper'
feature 'Ref switcher', :js do feature 'Ref switcher', :js do
include CookieHelper
let(:user) { create(:user) } let(:user) { create(:user) }
let(:project) { create(:project, :public, :repository) } let(:project) { create(:project, :public, :repository) }

View file

@ -1,9 +1,6 @@
require 'spec_helper' require 'spec_helper'
feature 'Multi-file editor new directory', :js do feature 'Multi-file editor new directory', :js do
include CookieHelper
include WaitForRequests
let(:user) { create(:user) } let(:user) { create(:user) }
let(:project) { create(:project, :repository) } let(:project) { create(:project, :repository) }

View file

@ -1,9 +1,6 @@
require 'spec_helper' require 'spec_helper'
feature 'Multi-file editor new file', :js do feature 'Multi-file editor new file', :js do
include CookieHelper
include WaitForRequests
let(:user) { create(:user) } let(:user) { create(:user) }
let(:project) { create(:project, :repository) } let(:project) { create(:project, :repository) }

View file

@ -1,9 +1,6 @@
require 'spec_helper' require 'spec_helper'
feature 'Multi-file editor upload file', :js do feature 'Multi-file editor upload file', :js do
include CookieHelper
include WaitForRequests
let(:user) { create(:user) } let(:user) { create(:user) }
let(:project) { create(:project, :repository) } let(:project) { create(:project, :repository) }
let(:txt_file) { File.join(Rails.root, 'spec', 'fixtures', 'doc_sample.txt') } let(:txt_file) { File.join(Rails.root, 'spec', 'fixtures', 'doc_sample.txt') }

View file

@ -48,6 +48,8 @@ RSpec.configure do |config|
config.include Warden::Test::Helpers, type: :request config.include Warden::Test::Helpers, type: :request
config.include LoginHelpers, type: :feature config.include LoginHelpers, type: :feature
config.include SearchHelpers, type: :feature config.include SearchHelpers, type: :feature
config.include CookieHelper, :js
config.include InputHelper, :js
config.include WaitForRequests, :js config.include WaitForRequests, :js
config.include StubConfiguration config.include StubConfiguration
config.include EmailHelpers, :mailer, type: :mailer config.include EmailHelpers, :mailer, type: :mailer