Commit 1a9214b2 by Valera Rozuvan

Fixing merge conflicts in tests.EOF

Fixing merge conflicts in tests.
parent a16fe343
......@@ -78,7 +78,7 @@ Feature: Video Component Editor
And I enter a "http://youtu.be/t__eq_exist" source to field number 1
Then I see status message "not found"
And I see button "import"
And I click button "import"
And I click transcript button "import"
Then I see status message "found"
And I see button "upload_new_timed_transcripts"
And I see button "download_to_edit"
......@@ -111,7 +111,7 @@ Feature: Video Component Editor
And I enter a "http://youtu.be/t_neq_exist" source to field number 1
And I see status message "replace"
And I see button "replace"
And I click button "replace"
And I click transcript button "replace"
And I see status message "found"
And I see value "t_neq_exist" in the field "HTML5 Transcript"
......@@ -153,7 +153,7 @@ Feature: Video Component Editor
And I enter a "http://youtu.be/t__eq_exist" source to field number 1
Then I see status message "not found"
And I see button "import"
And I click button "import"
And I click transcript button "import"
Then I see status message "found"
And I enter a "t_not_exist.mp4" source to field number 2
......@@ -205,7 +205,7 @@ Feature: Video Component Editor
And I enter a "http://youtu.be/t__eq_exist" source to field number 1
Then I see status message "not found"
And I see button "import"
And I click button "import"
And I click transcript button "import"
Then I see status message "found"
And I see button "upload_new_timed_transcripts"
......@@ -287,7 +287,7 @@ Feature: Video Component Editor
And I enter a "http://youtu.be/t__eq_exist" source to field number 1
Then I see status message "not found"
And I see button "import"
And I click button "import"
And I click transcript button "import"
Then I see status message "found"
And I see button "upload_new_timed_transcripts"
......@@ -309,7 +309,7 @@ Feature: Video Component Editor
And I enter a "http://youtu.be/t__eq_exist" source to field number 1
Then I see status message "not found"
And I see button "import"
And I click button "import"
And I click transcript button "import"
Then I see status message "found"
And I see button "upload_new_timed_transcripts"
......@@ -364,7 +364,7 @@ Feature: Video Component Editor
And I see choose button "test_transcripts.mp4" number 1
And I see choose button "t_not_exist.webm" number 2
And I click button "choose" number 2
And I click transcript button "choose" number 2
And I see value "test_transcripts|t_not_exist" in the field "HTML5 Transcript"
#21
......@@ -384,13 +384,13 @@ Feature: Video Component Editor
And I enter a "video_name_2.mp4" source to field number 1
Then I see status message "use existing"
And I see button "use_existing"
And I click button "use_existing"
And I click transcript button "use_existing"
And I see value "video_name_2" in the field "HTML5 Transcript"
And I enter a "video_name_3.mp4" source to field number 1
Then I see status message "use existing"
And I see button "use_existing"
And I click button "use_existing"
And I click transcript button "use_existing"
And I see value "video_name_3" in the field "HTML5 Transcript"
#22
......@@ -410,7 +410,7 @@ Feature: Video Component Editor
And I enter a "video_name_2.mp4" source to field number 1
Then I see status message "use existing"
And I see button "use_existing"
And I click button "use_existing"
And I click transcript button "use_existing"
And I see value "video_name_2" in the field "HTML5 Transcript"
And I enter a "video_name_3.mp4" source to field number 1
......@@ -420,7 +420,7 @@ Feature: Video Component Editor
And I enter a "video_name_4.mp4" source to field number 1
Then I see status message "use existing"
And I see button "use_existing"
And I click button "use_existing"
And I click transcript button "use_existing"
And I see value "video_name_4" in the field "HTML5 Transcript"
#23
......@@ -443,7 +443,7 @@ Feature: Video Component Editor
And I enter a "video_name_3.webm" source to field number 2
Then I see status message "use existing"
And I see button "use_existing"
And I click button "use_existing"
And I click transcript button "use_existing"
And I see value "video_name_2|video_name_3" in the field "HTML5 Transcript"
#24 Uploading subtitles with different file name than file
......
......@@ -38,7 +38,7 @@ SELECTORS = {
}
# button type , button css selector, button message
BUTTONS = {
TRANSCRIPTS_BUTTONS = {
'import': ('.setting-import', 'Import from YouTube'),
'download_to_edit': ('.setting-download', 'Download to Edit'),
'disabled_download_to_edit': ('.setting-download.is-disabled', 'Download to Edit'),
......@@ -127,9 +127,9 @@ def i_see_button(_step, not_see, button_type):
button = button_type.strip()
if not_see.strip():
assert world.is_css_not_present(BUTTONS[button][0])
assert world.is_css_not_present(TRANSCRIPTS_BUTTONS[button][0])
else:
assert world.css_has_text(BUTTONS[button][0], BUTTONS[button][1])
assert world.css_has_text(TRANSCRIPTS_BUTTONS[button][0], TRANSCRIPTS_BUTTONS[button][1])
@step('I (.*)see (.*)button "([^"]*)" number (\d+)$')
......@@ -142,21 +142,21 @@ def i_see_button_with_custom_text(_step, not_see, button_type, custom_text, inde
index = int(index.strip()) - 1
if not_see.strip():
assert world.is_css_not_present(BUTTONS[button][0])
assert world.is_css_not_present(TRANSCRIPTS_BUTTONS[button][0])
else:
assert world.css_has_text(BUTTONS[button][0], BUTTONS[button][1].format(custom_text), index)
assert world.css_has_text(TRANSCRIPTS_BUTTONS[button][0], TRANSCRIPTS_BUTTONS[button][1].format(custom_text), index)
@step('I click button "([^"]*)"$')
def click_button(_step, button_type):
@step('I click transcript button "([^"]*)"$')
def click_button_transcripts_variant(_step, button_type):
world.wait(DELAY)
world.wait_for_ajax_complete()
button = button_type.strip()
world.css_click(BUTTONS[button][0])
world.css_click(TRANSCRIPTS_BUTTONS[button][0])
@step('I click button "([^"]*)" number (\d+)$')
@step('I click transcript button "([^"]*)" number (\d+)$')
def click_button_index(_step, button_type, index):
world.wait(DELAY)
world.wait_for_ajax_complete()
......@@ -164,7 +164,7 @@ def click_button_index(_step, button_type, index):
button = button_type.strip()
index = int(index.strip()) - 1
world.css_click(BUTTONS[button][0], index)
world.css_click(TRANSCRIPTS_BUTTONS[button][0], index)
@step('I remove "([^"]+)" transcripts id from store')
......
......@@ -83,10 +83,11 @@ Feature: CMS.Video Component
Given I have created a Video component
And Make sure captions are closed
And I edit the component
And I open tab "Advanced"
And I set value "12" to the field "Start Time"
And I set value "24" to the field "End Time"
And I save changes
And I click button "Play"
And I click video button "Play"
# The below line is a bit flaky. Numbers 73 and 73 were determined rather
# accidentally. They might change in the future as Video player gets CSS
......
......@@ -5,7 +5,7 @@ from xmodule.modulestore import Location
from contentstore.utils import get_modulestore
from selenium.webdriver.common.keys import Keys
BUTTONS = {
VIDEO_BUTTONS = {
'CC': '.hide-subtitles',
'volume': '.volume',
'Play': '.video_control.play',
......@@ -135,7 +135,7 @@ def set_captions_visibility_state(_step, captions_state):
@step('I hover over button "([^"]*)"$')
def hover_over_button(_step, button):
world.css_find(BUTTONS[button.strip()]).mouse_over()
world.css_find(VIDEO_BUTTONS[button.strip()]).mouse_over()
@step('Captions (?:are|become) "([^"]*)"$')
......@@ -178,31 +178,6 @@ def caption_line_has_class(_step, index, className):
world.css_has_class(SELECTOR, className.strip())
@step('I set value "([^"]*)" to the field "([^"]*)"$')
def set_value_transcripts_field(_step, value, field_name):
world.wait(DELAY)
world.wait_for_ajax_complete()
field_id = '#' + world.browser.find_by_xpath('//label[text()="%s"]' % field_name.strip())[0]['for']
world.css_fill(field_id, value.strip())
@step('I save changes$')
def save_changes(_step):
world.wait(DELAY)
world.wait_for_ajax_complete()
save_css = 'a.save-button'
world.css_click(save_css)
@step('I click button "([^"]*)"$')
def click_button(_step, button_type):
world.wait(DELAY)
world.wait_for_ajax_complete()
button = button_type.strip()
world.css_click(BUTTONS[button])
@step('I see a range on slider with styles "left" set to (.+) px and "width" set to (.+) px$')
def see_a_range_slider_with_proper_range(_step, left, width):
left = int(left.strip())
......@@ -215,3 +190,11 @@ def see_a_range_slider_with_proper_range(_step, left, width):
assert int(round(float(slider_range.value_of_css_property("left")[:-2]))) == left
assert int(round(float(slider_range.value_of_css_property("width")[:-2]))) == width
@step('I click video button "([^"]*)"$')
def click_button_video(_step, button_type):
world.wait(DELAY)
world.wait_for_ajax_complete()
button = button_type.strip()
world.css_click(VIDEO_BUTTONS[button])
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment