|
|
|
@ -18,18 +18,18 @@ def test_ob_setup( webapp, webdriver ): |
|
|
|
|
select_tab( "ob1" ) |
|
|
|
|
textarea1 = find_child( "textarea[name='OB_SETUP_1']" ) |
|
|
|
|
textarea1.clear() |
|
|
|
|
textarea1.send_keys( "setup here." ) |
|
|
|
|
textarea1.send_keys( "setup <i>here</i>." ) |
|
|
|
|
btn1 = find_child( "input[type='button'][data-id='ob_setup_1']" ) |
|
|
|
|
select_tab( "ob2" ) |
|
|
|
|
textarea2 = find_child( "textarea[name='OB_SETUP_2']" ) |
|
|
|
|
textarea2.clear() |
|
|
|
|
textarea2.send_keys( "setup there." ) |
|
|
|
|
textarea2.send_keys( "setup <b>there</b>." ) |
|
|
|
|
btn2 = find_child( "input[type='button'][data-id='ob_setup_2']" ) |
|
|
|
|
btn2.click() |
|
|
|
|
assert get_clipboard() == "[setup there.] (col=[OBCOL:russian/OBCOL2:russian])" |
|
|
|
|
assert get_clipboard() == "[setup <b>there</b>.] (col=[OBCOL:russian/OBCOL2:russian])" |
|
|
|
|
select_tab( "ob1" ) |
|
|
|
|
btn1.click() |
|
|
|
|
assert get_clipboard() == "[setup here.] (col=[OBCOL:german/OBCOL2:german])" |
|
|
|
|
assert get_clipboard() == "[setup <i>here</i>.] (col=[OBCOL:german/OBCOL2:german])" |
|
|
|
|
|
|
|
|
|
# change the player nationalities and generate the OB SETUP snippets again |
|
|
|
|
select_tab( "scenario" ) |
|
|
|
@ -43,22 +43,22 @@ def test_ob_setup( webapp, webdriver ): |
|
|
|
|
sel.select_by_value( "french" ) |
|
|
|
|
select_tab( "ob1" ) |
|
|
|
|
btn1.click() |
|
|
|
|
assert get_clipboard() == "[setup here.] (col=[OBCOL:british/OBCOL2:british])" |
|
|
|
|
assert get_clipboard() == "[setup <i>here</i>.] (col=[OBCOL:british/OBCOL2:british])" |
|
|
|
|
select_tab( "ob2" ) |
|
|
|
|
btn2.click() |
|
|
|
|
assert get_clipboard() == "[setup there.] (col=[OBCOL:french/OBCOL2:french])" |
|
|
|
|
assert get_clipboard() == "[setup <b>there</b>.] (col=[OBCOL:french/OBCOL2:french])" |
|
|
|
|
|
|
|
|
|
# set the snippet widths and generate the snippets again |
|
|
|
|
select_tab( "ob1" ) |
|
|
|
|
elem = find_child( "input[name='OB_SETUP_WIDTH_1']" ) |
|
|
|
|
elem.send_keys( "100px" ) |
|
|
|
|
btn1.click() |
|
|
|
|
assert get_clipboard() == "[setup here.] (col=[OBCOL:british/OBCOL2:british]) (width=[100px])" |
|
|
|
|
assert get_clipboard() == "[setup <i>here</i>.] (col=[OBCOL:british/OBCOL2:british]) (width=[100px])" |
|
|
|
|
select_tab( "ob2" ) |
|
|
|
|
elem = find_child( "input[name='OB_SETUP_WIDTH_2']" ) |
|
|
|
|
elem.send_keys( "200px" ) |
|
|
|
|
btn2.click() |
|
|
|
|
assert get_clipboard() == "[setup there.] (col=[OBCOL:french/OBCOL2:french]) (width=[200px])" |
|
|
|
|
assert get_clipboard() == "[setup <b>there</b>.] (col=[OBCOL:french/OBCOL2:french]) (width=[200px])" |
|
|
|
|
|
|
|
|
|
# --------------------------------------------------------------------- |
|
|
|
|
|
|
|
|
|