Module: UiChanged::ApplicationHelper

Defined in:
app/helpers/ui_changed/application_helper.rb

Instance Method Summary collapse

Instance Method Details

#ignore_all_urls_path(request_fullpath) ⇒ Object



14
15
16
17
18
19
20
21
22
23
24
# File 'app/helpers/ui_changed/application_helper.rb', line 14

def ignore_all_urls_path(request_fullpath)
  if request_fullpath.include?(screenshot_controls_path)
    screenshot_ignore_url_add_all_controls_path
  elsif request_fullpath.include?(screenshot_tests_path)
    screenshot_ignore_url_add_all_tests_path
  elsif request_fullpath.include?(screenshot_compares_path)
    screenshot_ignore_url_add_all_compares_path
  elsif request_fullpath.include?(screenshot_diffs_path)
    screenshot_ignore_url_add_all_diffs_path
  end
end

#remove_all_path(request_fullpath) ⇒ Object



3
4
5
6
7
8
9
10
11
12
13
# File 'app/helpers/ui_changed/application_helper.rb', line 3

def remove_all_path(request_fullpath)
  if request_fullpath.include?(screenshot_controls_path)
    screenshot_destroy_all_controls_path
  elsif request_fullpath.include?(screenshot_tests_path)
    screenshot_destroy_all_tests_path
  elsif request_fullpath.include?(screenshot_compares_path)
    screenshot_destroy_all_compares_path
  elsif request_fullpath.include?(screenshot_ignore_urls_path)
    screenshot_ignore_url_destroy_all_path
  end
end

#show_ignore_url(request_fullpath) ⇒ Object



38
39
40
41
42
43
# File 'app/helpers/ui_changed/application_helper.rb', line 38

def show_ignore_url(request_fullpath)
  request_fullpath.include?(screenshot_diffs_path) || 
  request_fullpath.include?(screenshot_controls_path) || 
  request_fullpath.include?(screenshot_tests_path) ||
  request_fullpath.include?(screenshot_compares_path)
end

#show_remove(request_fullpath) ⇒ Object



29
30
31
32
33
34
# File 'app/helpers/ui_changed/application_helper.rb', line 29

def show_remove(request_fullpath)
  request_fullpath.include?(screenshot_controls_path) || 
  request_fullpath.include?(screenshot_tests_path) ||
  request_fullpath.include?(screenshot_compares_path) ||
  request_fullpath.include?(screenshot_ignore_urls_path)
end

#show_remove_test_and_diff(request_fullpath) ⇒ Object



26
27
28
# File 'app/helpers/ui_changed/application_helper.rb', line 26

def show_remove_test_and_diff(request_fullpath)
  request_fullpath.include?(screenshot_diffs_path) || request_fullpath.include?(screenshot_diff_path)
end

#show_set_test_as_control(request_fullpath) ⇒ Object



35
36
37
# File 'app/helpers/ui_changed/application_helper.rb', line 35

def show_set_test_as_control(request_fullpath)
  request_fullpath.include?(screenshot_diffs_path) || request_fullpath.include?(screenshot_diff_path) || request_fullpath.include?(screenshot_tests_path)
end