File tree Expand file tree Collapse file tree 2 files changed +10
-20
lines changed Expand file tree Collapse file tree 2 files changed +10
-20
lines changed Original file line number Diff line number Diff line change 44describe 'Video Component' , type : :feature , js : true do
55
66 it 'Renders a video tag on the page' do
7- #
8- # class ExamplePage < Matestack::Ui::Page
9- # def response
10- # components {
11- # # simple video
12- # # test below fails, either add something to `spec/dummy/app/assets/videos/*` or stub it
13- # # video path: 'yourvid.mp4', width: 500, height: 300
14- # }
15- # end
16- # end
17- #
18- # visit '/example'
19- #
20- # static_output = page.html
21- #
22- # expected_static_output = <<~HTML
23- # <video src="yourvid.mp4" width="500" height="300"></video>
24- # HTML
25- #
26- # expect(stripped(static_output)).to include(stripped(expected_static_output))
7+ class ExamplePage < Matestack ::Ui ::Page
8+ def response
9+ components {
10+ video path : 'corgi.mp4' , width : 500 , height : 300
11+ }
12+ end
13+ end
14+
15+ visit '/example'
16+ expect ( page ) . to have_xpath ( "//video[contains(@src,'corgi.mp4') and @width='500' and @height='300']" )
2717 end
2818end
You can’t perform that action at this time.
0 commit comments