Implemented custom cms format, and associated administration pages.
Applied to existing filter and format. Added embedded_video filter (initially contribute by Javier Velilla).
This commit is contained in:
183
modules/embedded_video/test/test_content_filter_set.e
Normal file
183
modules/embedded_video/test/test_content_filter_set.e
Normal file
@@ -0,0 +1,183 @@
|
||||
note
|
||||
description: "[
|
||||
Eiffel tests that can be executed by testing tool.
|
||||
]"
|
||||
author: "EiffelStudio test wizard"
|
||||
date: "$Date: 2015-07-10 13:38:10 +0200 (ven., 10 juil. 2015) $"
|
||||
revision: "$Revision: 97687 $"
|
||||
testing: "type/manual"
|
||||
|
||||
class
|
||||
TEST_CONTENT_FILTER_SET
|
||||
|
||||
inherit
|
||||
EQA_TEST_SET
|
||||
|
||||
feature -- Test routines
|
||||
|
||||
test_video_filter
|
||||
-- New test routine
|
||||
local
|
||||
f: VIDEO_CONTENT_FILTER
|
||||
text: STRING
|
||||
expected_text: STRING
|
||||
do
|
||||
text := "[video:https://www.youtube.com/embed/jBMOSSnCMCk]"
|
||||
expected_text := "<iframe width=%"420%" height=%"315%"%Nsrc=%"https://www.youtube.com/embed/jBMOSSnCMCk%">%N</iframe>"
|
||||
create f
|
||||
f.filter (text)
|
||||
assert ("expected iframe with video", text.same_string (expected_text))
|
||||
end
|
||||
|
||||
|
||||
test_video_filter_2
|
||||
-- New test routine
|
||||
local
|
||||
f: VIDEO_CONTENT_FILTER
|
||||
text: STRING
|
||||
expected_text: STRING
|
||||
do
|
||||
text := "[ video : https://www.youtube.com/embed/jBMOSSnCMCk ]"
|
||||
expected_text := "<iframe width=%"420%" height=%"315%"%Nsrc=%"https://www.youtube.com/embed/jBMOSSnCMCk%">%N</iframe>"
|
||||
create f
|
||||
f.filter (text)
|
||||
assert ("expected iframe with video", text.same_string (expected_text))
|
||||
end
|
||||
|
||||
|
||||
test_video_filter_3
|
||||
-- New test routine
|
||||
local
|
||||
f: VIDEO_CONTENT_FILTER
|
||||
text: STRING
|
||||
expected_text: STRING
|
||||
do
|
||||
text := "[ video :https://www.youtube.com/embed/jBMOSSnCMCk ]"
|
||||
expected_text := "<iframe width=%"420%" height=%"315%"%Nsrc=%"https://www.youtube.com/embed/jBMOSSnCMCk%">%N</iframe>"
|
||||
create f
|
||||
f.filter (text)
|
||||
assert ("expected iframe with video", text.same_string (expected_text))
|
||||
end
|
||||
|
||||
|
||||
test_video_filter_4
|
||||
-- New test routine
|
||||
local
|
||||
f: VIDEO_CONTENT_FILTER
|
||||
text: STRING
|
||||
expected_text: STRING
|
||||
do
|
||||
text := "[ video :https://www.youtube.com/embed/jBMOSSnCMCk height:425]"
|
||||
expected_text := "<iframe width=%"420%" height=%"425%"%Nsrc=%"https://www.youtube.com/embed/jBMOSSnCMCk%">%N</iframe>"
|
||||
create f
|
||||
f.filter (text)
|
||||
assert ("expected iframe with video", text.same_string (expected_text))
|
||||
end
|
||||
|
||||
|
||||
test_video_filter_5
|
||||
-- New test routine
|
||||
local
|
||||
f: VIDEO_CONTENT_FILTER
|
||||
text: STRING
|
||||
expected_text: STRING
|
||||
do
|
||||
text := "[ video :https://www.youtube.com/embed/jBMOSSnCMCk height : 425]"
|
||||
expected_text := "<iframe width=%"420%" height=%"425%"%Nsrc=%"https://www.youtube.com/embed/jBMOSSnCMCk%">%N</iframe>"
|
||||
create f
|
||||
f.filter (text)
|
||||
assert ("expected iframe with video", text.same_string (expected_text))
|
||||
end
|
||||
|
||||
|
||||
test_video_filter_6
|
||||
-- New test routine
|
||||
local
|
||||
f: VIDEO_CONTENT_FILTER
|
||||
text: STRING
|
||||
expected_text: STRING
|
||||
do
|
||||
text := "[ video :https://www.youtube.com/embed/jBMOSSnCMCk height : 425 width: 425]"
|
||||
expected_text := "<iframe width=%"425%" height=%"425%"%Nsrc=%"https://www.youtube.com/embed/jBMOSSnCMCk%">%N</iframe>"
|
||||
create f
|
||||
f.filter (text)
|
||||
assert ("expected iframe with video", text.same_string (expected_text))
|
||||
end
|
||||
|
||||
test_video_filter_7
|
||||
-- New test routine
|
||||
local
|
||||
f: VIDEO_CONTENT_FILTER
|
||||
text: STRING
|
||||
expected_text: STRING
|
||||
do
|
||||
text := "[video:https://www.youtube.com/embed/jBMOSSnCMCk height:425 width:425]"
|
||||
expected_text := "<iframe width=%"425%" height=%"425%"%Nsrc=%"https://www.youtube.com/embed/jBMOSSnCMCk%">%N</iframe>"
|
||||
create f
|
||||
f.filter (text)
|
||||
assert ("expected iframe with video", text.same_string (expected_text))
|
||||
end
|
||||
|
||||
|
||||
test_video_filter_8
|
||||
-- New test routine
|
||||
local
|
||||
f: VIDEO_CONTENT_FILTER
|
||||
text: STRING
|
||||
expected_text: STRING
|
||||
do
|
||||
text := "[height:425 width:425 video:https://www.youtube.com/embed/jBMOSSnCMCk ]"
|
||||
expected_text := "<iframe width=%"425%" height=%"425%"%Nsrc=%"https://www.youtube.com/embed/jBMOSSnCMCk%">%N</iframe>"
|
||||
create f
|
||||
f.filter (text)
|
||||
assert ("expected iframe with video", text.same_string (expected_text))
|
||||
end
|
||||
|
||||
|
||||
test_video_filter_9
|
||||
-- New test routine
|
||||
local
|
||||
f: VIDEO_CONTENT_FILTER
|
||||
text: STRING
|
||||
expected_text: STRING
|
||||
do
|
||||
text := "[ width:425 video:https://www.youtube.com/embed/jBMOSSnCMCk height:425]"
|
||||
expected_text := "<iframe width=%"425%" height=%"425%"%Nsrc=%"https://www.youtube.com/embed/jBMOSSnCMCk%">%N</iframe>"
|
||||
create f
|
||||
f.filter (text)
|
||||
assert ("expected iframe with video", text.same_string (expected_text))
|
||||
end
|
||||
|
||||
test_video_filter_10
|
||||
-- New test routine
|
||||
local
|
||||
f: VIDEO_CONTENT_FILTER
|
||||
text: STRING
|
||||
expected_text: STRING
|
||||
do
|
||||
text := "[ wrong:425 video:https://www.youtube.com/embed/jBMOSSnCMCk height:425]"
|
||||
expected_text := "<iframe width=%"420%" height=%"425%"%Nsrc=%"https://www.youtube.com/embed/jBMOSSnCMCk%">%N</iframe>"
|
||||
create f
|
||||
f.filter (text)
|
||||
assert ("expected iframe with video", text.same_string (expected_text))
|
||||
end
|
||||
|
||||
|
||||
test_video_filter_11
|
||||
-- New test routine
|
||||
local
|
||||
f: VIDEO_CONTENT_FILTER
|
||||
text: STRING
|
||||
expected_text: STRING
|
||||
do
|
||||
text := "[wrong hello:1020 ]"
|
||||
expected_text := "[wrong hello:1020 ]"
|
||||
create f
|
||||
f.filter (text)
|
||||
assert ("expected iframe with video", text.same_string (expected_text))
|
||||
end
|
||||
|
||||
|
||||
end
|
||||
|
||||
|
||||
3
modules/embedded_video/test/testing-safe.ecf
Normal file
3
modules/embedded_video/test/testing-safe.ecf
Normal file
@@ -0,0 +1,3 @@
|
||||
<?xml version="1.0" encoding="ISO-8859-1"?>
|
||||
<redirection xmlns="http://www.eiffel.com/developers/xml/configuration-1-16-0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.eiffel.com/developers/xml/configuration-1-16-0 http://www.eiffel.com/developers/xml/configuration-1-16-0.xsd" uuid="BD491995-C14C-4413-B09A-C1B4EDDA3116" message="Obsolete: use testing.ecf !" location="testing.ecf">
|
||||
</redirection>
|
||||
21
modules/embedded_video/test/testing.ecf
Normal file
21
modules/embedded_video/test/testing.ecf
Normal file
@@ -0,0 +1,21 @@
|
||||
<?xml version="1.0" encoding="ISO-8859-1"?>
|
||||
<system xmlns="http://www.eiffel.com/developers/xml/configuration-1-16-0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.eiffel.com/developers/xml/configuration-1-16-0 http://www.eiffel.com/developers/xml/configuration-1-16-0.xsd" name="embedded_video_testing" uuid="BD491995-C14C-4413-B09A-C1B4EDDA3116">
|
||||
<target name="embedded_video_testing">
|
||||
<root class="ANY" feature="default_create"/>
|
||||
<file_rule>
|
||||
<exclude>/.git$</exclude>
|
||||
<exclude>/.svn$</exclude>
|
||||
<exclude>/EIFGENs$</exclude>
|
||||
</file_rule>
|
||||
<option warning="true">
|
||||
</option>
|
||||
<capability>
|
||||
<concurrency use="none"/>
|
||||
</capability>
|
||||
<library name="base" location="$ISE_LIBRARY\library\base\base.ecf"/>
|
||||
<library name="embeded_module" location="..\video.ecf"/>
|
||||
<library name="testing" location="$ISE_LIBRARY\library\testing\testing.ecf"/>
|
||||
<library name="text_filter" location="$ISE_LIBRARY\unstable\library\text\text_filter\text_filter.ecf"/>
|
||||
<tests name="src" location=".\"/>
|
||||
</target>
|
||||
</system>
|
||||
Reference in New Issue
Block a user