diff options
Diffstat (limited to 'spec/support')
-rw-r--r-- | spec/support/capybara.rb | 2 | ||||
-rw-r--r-- | spec/support/helpers/filtered_search_helpers.rb | 8 | ||||
-rw-r--r-- | spec/support/helpers/project_forks_helper.rb | 2 | ||||
-rw-r--r-- | spec/support/shared_examples/services/boards/lists_move_service.rb | 12 |
4 files changed, 14 insertions, 10 deletions
diff --git a/spec/support/capybara.rb b/spec/support/capybara.rb index c0ceb0f6605..18a7a392c12 100644 --- a/spec/support/capybara.rb +++ b/spec/support/capybara.rb @@ -100,7 +100,7 @@ RSpec.configure do |config| # capybara/rspec already calls Capybara.reset_sessions! in an `after` hook, # but `block_and_wait_for_requests_complete` is called before it so by - # calling it explicitely here, we prevent any new requests from being fired + # calling it explicitly here, we prevent any new requests from being fired # See https://github.com/teamcapybara/capybara/blob/ffb41cfad620de1961bb49b1562a9fa9b28c0903/lib/capybara/rspec.rb#L20-L25 # We don't reset the session when the example failed, because we need capybara-screenshot to have access to it. Capybara.reset_sessions! unless example.exception diff --git a/spec/support/helpers/filtered_search_helpers.rb b/spec/support/helpers/filtered_search_helpers.rb index 5f42ff77fb2..6569feec39b 100644 --- a/spec/support/helpers/filtered_search_helpers.rb +++ b/spec/support/helpers/filtered_search_helpers.rb @@ -120,8 +120,12 @@ module FilteredSearchHelpers create_token('Label', label_name, symbol) end - def emoji_token(emoji_name = nil) - { name: 'My-Reaction', emoji_name: emoji_name } + def reaction_token(reaction_name = nil, is_emoji = true) + if is_emoji + { name: 'My-Reaction', emoji_name: reaction_name } + else + create_token('My-Reaction', reaction_name) + end end def default_placeholder diff --git a/spec/support/helpers/project_forks_helper.rb b/spec/support/helpers/project_forks_helper.rb index 6a7132c3093..9a86560da2a 100644 --- a/spec/support/helpers/project_forks_helper.rb +++ b/spec/support/helpers/project_forks_helper.rb @@ -35,7 +35,7 @@ module ProjectForksHelper if create_repository # The call to project.repository.after_import in RepositoryForkWorker does # not reset the @exists variable of this forked_project.repository - # so we have to explicitely call this method to clear the @exists variable. + # so we have to explicitly call this method to clear the @exists variable. # of the instance we're returning here. forked_project.repository.after_import end diff --git a/spec/support/shared_examples/services/boards/lists_move_service.rb b/spec/support/shared_examples/services/boards/lists_move_service.rb index 07c98cb29b7..2cdb968a45d 100644 --- a/spec/support/shared_examples/services/boards/lists_move_service.rb +++ b/spec/support/shared_examples/services/boards/lists_move_service.rb @@ -14,7 +14,7 @@ shared_examples 'lists move service' do expect(current_list_positions).to eq [0, 1, 2, 3] end - it 'keeps position of lists when new positon is equal to old position' do + it 'keeps position of lists when new position is equal to old position' do service = described_class.new(parent, user, position: planning.position) service.execute(planning) @@ -22,7 +22,7 @@ shared_examples 'lists move service' do expect(current_list_positions).to eq [0, 1, 2, 3] end - it 'keeps position of lists when new positon is negative' do + it 'keeps position of lists when new position is negative' do service = described_class.new(parent, user, position: -1) service.execute(planning) @@ -30,7 +30,7 @@ shared_examples 'lists move service' do expect(current_list_positions).to eq [0, 1, 2, 3] end - it 'keeps position of lists when new positon is equal to number of labels lists' do + it 'keeps position of lists when new position is equal to number of labels lists' do service = described_class.new(parent, user, position: board.lists.label.size) service.execute(planning) @@ -38,7 +38,7 @@ shared_examples 'lists move service' do expect(current_list_positions).to eq [0, 1, 2, 3] end - it 'keeps position of lists when new positon is greater than number of labels lists' do + it 'keeps position of lists when new position is greater than number of labels lists' do service = described_class.new(parent, user, position: board.lists.label.size + 1) service.execute(planning) @@ -46,7 +46,7 @@ shared_examples 'lists move service' do expect(current_list_positions).to eq [0, 1, 2, 3] end - it 'increments position of intermediate lists when new positon is equal to first position' do + it 'increments position of intermediate lists when new position is equal to first position' do service = described_class.new(parent, user, position: 0) service.execute(staging) @@ -54,7 +54,7 @@ shared_examples 'lists move service' do expect(current_list_positions).to eq [1, 2, 3, 0] end - it 'decrements position of intermediate lists when new positon is equal to last position' do + it 'decrements position of intermediate lists when new position is equal to last position' do service = described_class.new(parent, user, position: board.lists.label.last.position) service.execute(planning) |