ama_layout 5.12.0 → 6.3.0.pre

Sign up to get free protection for your applications and to get access to all the features.
Files changed (53) hide show
  1. checksums.yaml +4 -4
  2. data/.travis.yml +0 -2
  3. data/ama_layout.gemspec +20 -21
  4. data/app/assets/javascripts/ama_layout/desktop/foundation-custom.js +8 -10
  5. data/app/assets/javascripts/ama_layout/desktop/index.js +0 -1
  6. data/app/helpers/ama_layout_path_helper.rb +5 -5
  7. data/app/views/ama_layout/_siteheader.html.erb +3 -8
  8. data/lib/ama_layout.rb +20 -28
  9. data/lib/ama_layout/decorators/moneris_decorator.rb +2 -3
  10. data/lib/ama_layout/decorators/navigation_decorator.rb +6 -52
  11. data/lib/ama_layout/decorators/navigation_item_decorator.rb +2 -3
  12. data/lib/ama_layout/moneris.rb +1 -4
  13. data/lib/ama_layout/navigation.rb +1 -7
  14. data/lib/ama_layout/navigation.yml +6 -58
  15. data/lib/ama_layout/navigation_item.rb +1 -4
  16. data/lib/ama_layout/version.rb +1 -1
  17. data/spec/ama_layout/decorators/navigation_decorator_spec.rb +8 -124
  18. data/spec/ama_layout/decorators/navigation_item_decorator_spec.rb +4 -2
  19. data/spec/ama_layout/navigation_spec.rb +43 -13
  20. data/spec/helpers/ama_layout_path_helper_spec.rb +6 -6
  21. data/spec/internal/app/controllers/application_controller.rb +0 -21
  22. data/spec/internal/config/routes.rb +0 -1
  23. data/spec/spec_helper.rb +16 -9
  24. data/styles.scss +0 -0
  25. metadata +41 -79
  26. data/PULL_REQUEST_TEMPLATE.md +0 -10
  27. data/app/assets/javascripts/ama_layout/notifications.coffee +0 -17
  28. data/app/controllers/ama_layout/api/v1/notifications_controller.rb +0 -18
  29. data/app/views/ama_layout/_notification.html.erb +0 -10
  30. data/app/views/ama_layout/_notification_sidebar.html.erb +0 -22
  31. data/app/views/ama_layout/_notifications.html.erb +0 -6
  32. data/app/views/ama_layout/_sign_out_link.html.erb +0 -3
  33. data/config/routes.rb +0 -9
  34. data/lib/ama_layout/decorators/notification_decorator.rb +0 -46
  35. data/lib/ama_layout/draper_replacement.rb +0 -27
  36. data/lib/ama_layout/navigation_helper.rb +0 -31
  37. data/lib/ama_layout/notification.rb +0 -87
  38. data/lib/ama_layout/notification_scrubber.rb +0 -13
  39. data/lib/ama_layout/notification_set.rb +0 -140
  40. data/lib/ama_layout/notifications.rb +0 -73
  41. data/lib/ama_layout/notifications/abstract_store.rb +0 -17
  42. data/lib/ama_layout/notifications/redis_store.rb +0 -38
  43. data/spec/ama_layout/controllers/ama_layout/api/v1/notifications_controller_spec.rb +0 -13
  44. data/spec/ama_layout/decorators/notification_decorator_spec.rb +0 -57
  45. data/spec/ama_layout/navigation_helper_spec.rb +0 -63
  46. data/spec/ama_layout/notification_scrubber_spec.rb +0 -10
  47. data/spec/ama_layout/notification_set_spec.rb +0 -281
  48. data/spec/ama_layout/notification_spec.rb +0 -193
  49. data/spec/ama_layout/notifications/abstract_store_spec.rb +0 -23
  50. data/spec/ama_layout/notifications/redis_store_spec.rb +0 -94
  51. data/spec/ama_layout/notifications_spec.rb +0 -109
  52. data/spec/factories/users.rb +0 -35
  53. data/spec/support/shared_examples/member_navigation.rb +0 -105
@@ -1,105 +0,0 @@
1
- shared_examples 'member_navigation' do
2
-
3
- context 'overview' do
4
- it 'has the correct overview text and url' do
5
- expect(subject.items[0].text).to eq 'My Account Overview'
6
- expect(subject.items[0].link).to eq "#{gatekeeper_site}/"
7
- end
8
- end
9
-
10
- context "membership" do
11
- let(:membership_subnav) { subject.items[1].sub_nav }
12
-
13
- it "returns the subnav items" do
14
- length = membership_subnav.length
15
-
16
- expect(membership_subnav[0].text).to eq 'Membership Overview'
17
- expect(membership_subnav[0].link).to eq "#{membership_site}/membership/overview"
18
-
19
- expect(membership_subnav[length - 3].text).to eq 'Manage Membership'
20
- expect(membership_subnav[length - 3].link).to eq "#{membership_site}/membership/manage"
21
-
22
- expect(membership_subnav[length - 2].text).to eq 'Billing Options'
23
- expect(membership_subnav[length - 2].link).to eq "#{youraccount_site}/billing"
24
-
25
- expect(membership_subnav.last.text).to eq 'Print/Request New Card'
26
- expect(membership_subnav.last.link).to eq "#{youraccount_site}/membership"
27
- end
28
- end
29
-
30
- context 'automotive' do
31
- let(:automotive_subnav) { subject.items[2].sub_nav }
32
-
33
- it 'returns the subnav items' do
34
- expect(automotive_subnav[0].text).to eq 'Roadside Assistance Overview'
35
- expect(automotive_subnav[0].link).to eq "#{automotive_site}/"
36
- end
37
- end
38
-
39
- context 'driver education' do
40
- let(:driver_education_subnav) { subject.items[3].sub_nav }
41
-
42
- it 'return the subnav items' do
43
- expect(driver_education_subnav[0].text).to eq 'Driver Education Overview'
44
- expect(driver_education_subnav[0].link).to eq "#{driveredonline_site}/"
45
-
46
- expect(driver_education_subnav[1].text).to eq 'New Driver Online Program'
47
- expect(driver_education_subnav[1].link).to eq "#{driveredonline_site}/dashboard"
48
- end
49
- end
50
-
51
- context 'rewards' do
52
- let(:rewards_subnav) { subject.items[4].sub_nav }
53
-
54
- it 'returns the subnav items' do
55
- expect(rewards_subnav[0].text).to eq 'Rewards Overview'
56
- expect(rewards_subnav[0].link).to eq "#{youraccount_site}/rewards"
57
-
58
- expect(rewards_subnav[1].text).to eq 'Gift Cards'
59
- expect(rewards_subnav[1].link).to eq "#{membership_site}/reward_cards"
60
-
61
- expect(rewards_subnav[2].text).to eq 'Transaction History'
62
- expect(rewards_subnav[2].link).to eq "#{youraccount_site}/reward_dollars"
63
-
64
- expect(rewards_subnav[3].text).to eq 'Pizza 73 Coupon Codes'
65
- expect(rewards_subnav[3].link).to eq "#{youraccount_site}/pizza73"
66
- end
67
- end
68
-
69
- context 'registries' do
70
- let(:registries_subnav) { subject.items[5].sub_nav }
71
-
72
- it 'returns the subnav items' do
73
- expect(registries_subnav[0].text).to eq 'Registries Overview'
74
- expect(registries_subnav[0].link).to eq "#{registries_site}/"
75
-
76
- expect(registries_subnav[1].text).to eq 'Vehicle Registration Auto-Renew'
77
- expect(registries_subnav[1].link).to eq "#{registries_site}/order/registrations/new"
78
- end
79
- end
80
-
81
- context 'travel' do
82
- it 'has the correct travel text and url' do
83
- expect(subject.items[6].text).to eq 'My Travel'
84
- expect(subject.items[6].link).to eq "#{travel_site}"
85
- end
86
- end
87
-
88
- context 'my account' do
89
- let(:my_account_subnav) { subject.items[7].sub_nav }
90
-
91
- it 'returns the subnav items' do
92
- expect(my_account_subnav[0].text).to eq 'Change Email/Password'
93
- expect(my_account_subnav[0].link).to eq "#{gatekeeper_site}/user/edit"
94
-
95
- expect(my_account_subnav[1].text).to eq 'Email Subscriptions'
96
- expect(my_account_subnav[1].link).to eq "#{youraccount_site}/subscriptions"
97
-
98
- expect(my_account_subnav[2].text).to eq 'AMA Insider Magazine'
99
- expect(my_account_subnav[2].link).to eq "#{youraccount_site}/amainsider"
100
-
101
- expect(my_account_subnav[3].text).to eq 'Change Address'
102
- expect(my_account_subnav[3].link).to eq "#{youraccount_site}/membership_update/new"
103
- end
104
- end
105
- end