|
6 | 6 | it 'renders a carousel with slides' do |
7 | 7 | matestack_render do |
8 | 8 | items = [ |
9 | | - { path: asset_path("matestack-teaser.png") }, |
10 | | - { path: asset_path("matestack-teaser.png") } |
| 9 | + { path: image_url("https://picsum.photos/200/300") }, |
| 10 | + { path: image_url("https://picsum.photos/200/300") } |
11 | 11 | ] |
12 | 12 | bs_carousel items: items |
13 | 13 | end |
|
24 | 24 | it 'renders a carousel with slides in dark variant' do |
25 | 25 | matestack_render do |
26 | 26 | items = [ |
27 | | - { path: asset_path("matestack-teaser.png") }, |
28 | | - { path: asset_path("matestack-teaser.png") } |
| 27 | + { path: image_url("https://picsum.photos/200/300") }, |
| 28 | + { path: image_url("https://picsum.photos/200/300") } |
29 | 29 | ] |
30 | 30 | bs_carousel items: items, variant: :dark |
31 | 31 | end |
|
36 | 36 | it 'can have caption on carousel' do |
37 | 37 | matestack_render do |
38 | 38 | items = [ |
39 | | - { path: asset_path("matestack-teaser.png"), title: "First slide", text: "Carousel First Text Caption" }, |
40 | | - { path: asset_path("matestack-teaser.png"), title: "Second slide", text: "Carousel Second Text Caption" } |
| 39 | + { path: image_url("https://picsum.photos/200/300"), title: "First slide", text: "Carousel First Text Caption" }, |
| 40 | + { path: image_url("https://picsum.photos/200/300"), title: "Second slide", text: "Carousel Second Text Caption" } |
41 | 41 | ] |
42 | 42 | bs_carousel items: items |
43 | 43 | end |
|
52 | 52 | it 'renders a carousel with faded animation and start at 2nd item' do |
53 | 53 | matestack_render do |
54 | 54 | items = [ |
55 | | - { path: asset_path("matestack-teaser.png"), title: "First slide", text: "Carousel First Text Caption" }, |
56 | | - { path: asset_path("matestack-teaser.png"), title: "Second slide", text: "Carousel Second Text Caption" } |
| 55 | + { path: image_url("https://picsum.photos/200/300"), title: "First slide", text: "Carousel First Text Caption" }, |
| 56 | + { path: image_url("https://picsum.photos/200/300"), title: "Second slide", text: "Carousel Second Text Caption" } |
57 | 57 | ] |
58 | 58 | bs_carousel fade: true, start: 1, items: items |
59 | 59 | end |
|
70 | 70 | fail |
71 | 71 | matestack_render do |
72 | 72 | items = [ |
73 | | - { path: asset_path("matestack-teaser.png"), title: "First slide", interval: 2000 }, |
74 | | - { path: asset_path("matestack-teaser.png"), title: "Second slide", interval: 3000 } |
| 73 | + { path: image_url("https://picsum.photos/200/300"), title: "First slide", interval: 2000 }, |
| 74 | + { path: image_url("https://picsum.photos/200/300"), title: "Second slide", interval: 3000 } |
75 | 75 | ] |
76 | 76 | bs_carousel items: items |
77 | 77 | end |
|
91 | 91 | it 'renders a carousel with indicators, controls' do |
92 | 92 | matestack_render do |
93 | 93 | items = [ |
94 | | - { path: asset_path("matestack-teaser.png") }, |
95 | | - { path: asset_path("matestack-teaser.png") } |
| 94 | + { path: image_url("https://picsum.photos/200/300") }, |
| 95 | + { path: image_url("https://picsum.photos/200/300") } |
96 | 96 | ] |
97 | 97 | bs_carousel controls: true, indicators: true, items: items, variant: :dark |
98 | 98 | end |
|
107 | 107 | it 'can show next item on event' do |
108 | 108 | matestack_render do |
109 | 109 | items = [ |
110 | | - { path: asset_path("matestack-teaser.png"), title: "First slide", interval: 10000, title_class: 'text-dark' }, |
111 | | - { path: asset_path("matestack-teaser.png"), title: "Second slide", interval: 10000, title_class: 'text-dark' } |
| 110 | + { path: image_url("https://picsum.photos/200/300"), title: "First slide", interval: 10000, title_class: 'text-dark' }, |
| 111 | + { path: image_url("https://picsum.photos/200/300"), title: "Second slide", interval: 10000, title_class: 'text-dark' } |
112 | 112 | ] |
113 | 113 | bs_carousel next_on: "next-carousel", pause_on: "pause", items: items, style: "width: 1000px" |
114 | 114 | end |
|
130 | 130 | it 'can show previous item on event' do |
131 | 131 | matestack_render do |
132 | 132 | items = [ |
133 | | - { path: asset_path("matestack-teaser.png"), title: "First slide" }, |
134 | | - { path: asset_path("matestack-teaser.png"), title: "Second slide" } |
| 133 | + { path: image_url("https://picsum.photos/200/300"), title: "First slide" }, |
| 134 | + { path: image_url("https://picsum.photos/200/300"), title: "Second slide" } |
135 | 135 | ] |
136 | 136 | bs_carousel prev_on: "prev-carousel", items: items |
137 | 137 | end |
|
150 | 150 | it 'can pause on event and restarty cycling after event' do |
151 | 151 | matestack_render do |
152 | 152 | items = [ |
153 | | - { path: asset_path("matestack-teaser.png"), title: "First slide", title_class: 'text-dark' }, |
154 | | - { path: asset_path("matestack-teaser.png"), title: "Second slide", title_class: 'text-dark' } |
| 153 | + { path: image_url("https://picsum.photos/200/300"), title: "First slide", title_class: 'text-dark' }, |
| 154 | + { path: image_url("https://picsum.photos/200/300"), title: "Second slide", title_class: 'text-dark' } |
155 | 155 | ] |
156 | 156 | bs_carousel cycle_on: "cycle-carousel", pause_on: "pause-carousel", items: items, interval: 500, style: "width: 300px" |
157 | 157 | end |
|
181 | 181 |
|
182 | 182 | # matestack_render do |
183 | 183 | # items = [ |
184 | | - # { path: asset_path("matestack-teaser.png"), title: "First slide" }, |
185 | | - # { path: asset_path("matestack-teaser.png"), title: "Second slide" } |
| 184 | + # { path: image_url("https://picsum.photos/200/300"), title: "First slide" }, |
| 185 | + # { path: image_url("https://picsum.photos/200/300"), title: "Second slide" } |
186 | 186 | # ] |
187 | 187 | # carousel items: items |
188 | 188 | # end |
|
0 commit comments