@@ -76,28 +76,40 @@ def test_rsnu001_no_update(dashr):
7676 dashr .start_server (app )
7777 dashr .find_element ("#color-selector" ).click ()
7878 dashr .find_elements ("div.VirtualizedSelectOption" )[0 ].click ()
79- time .sleep (1 )
79+ dashr .wait_for_text_to_equal (
80+ "#message-box" ,
81+ "The hexadecimal representation of your last chosen color is #FF0000"
82+ )
8083 assert dashr .find_element ("#message-box" ).text == "The hexadecimal representation of your last chosen color is #FF0000"
8184 dashr .find_element ("#color-selector" ).click ()
8285 dashr .find_elements ("div.VirtualizedSelectOption" )[3 ].click ()
8386 time .sleep (1 )
8487 assert dashr .find_element ("#message-box" ).text == "The hexadecimal representation of your last chosen color is #FF0000"
8588 dashr .find_element ("#color-selector" ).click ()
8689 dashr .find_elements ("div.VirtualizedSelectOption" )[1 ].click ()
87- time .sleep (1 )
90+ dashr .wait_for_text_to_equal (
91+ "#message-box" ,
92+ "The hexadecimal representation of your last chosen color is #00FF00"
93+ )
8894 assert dashr .find_element ("#message-box" ).text == "The hexadecimal representation of your last chosen color is #00FF00"
8995 dashr .find_element ("#color-selector" ).click ()
9096 dashr .find_elements ("div.VirtualizedSelectOption" )[3 ].click ()
9197 time .sleep (1 )
9298 assert dashr .find_element ("#message-box" ).text == "The hexadecimal representation of your last chosen color is #00FF00"
9399 dashr .find_element ("#color-selector" ).click ()
94100 dashr .find_elements ("div.VirtualizedSelectOption" )[2 ].click ()
95- time .sleep (1 )
101+ dashr .wait_for_text_to_equal (
102+ "#message-box" ,
103+ "The hexadecimal representation of your last chosen color is #0000FF"
104+ )
96105 assert dashr .find_element ("#message-box" ).text == "The hexadecimal representation of your last chosen color is #0000FF"
97106 dashr .find_element ("#color-selector" ).click ()
98107 dashr .find_elements ("div.VirtualizedSelectOption" )[3 ].click ()
99108 time .sleep (1 )
100109 assert dashr .find_element ("#message-box" ).text == "The hexadecimal representation of your last chosen color is #0000FF"
101110 dashr .find_element ("#multi-selector" ).click ()
102- time .sleep (1 )
111+ dashr .wait_for_text_to_equal (
112+ "#message-box2" ,
113+ "Multiple color values: #FF0000, #00FF00, #0000FF returned!"
114+ )
103115 assert dashr .find_element ("#message-box2" ).text == "Multiple color values: #FF0000, #00FF00, #0000FF returned!"
0 commit comments