|
11 | 11 | import dash
|
12 | 12 | import time
|
13 | 13 |
|
14 |
| -from dash.dependencies import Input, Output |
| 14 | +from dash.dependencies import Input, Output, State |
15 | 15 | from dash.exceptions import PreventUpdate
|
16 | 16 | from .IntegrationTests import IntegrationTests
|
17 | 17 | from .utils import assert_clean_console, invincible, wait_for
|
@@ -61,8 +61,7 @@ def update_output(value):
|
61 | 61 |
|
62 | 62 | input1.send_keys('hello world')
|
63 | 63 |
|
64 |
| - output1 = lambda: self.wait_for_element_by_id('output-1') |
65 |
| - wait_for(lambda: output1().text == 'hello world') |
| 64 | + output1 = self.wait_for_text_to_equal('#output-1', 'hello world') |
66 | 65 | self.percy_snapshot(name='simple-callback-2')
|
67 | 66 |
|
68 | 67 | self.assertEqual(
|
@@ -106,17 +105,15 @@ def update_text(data):
|
106 | 105 | return data
|
107 | 106 |
|
108 | 107 | self.startServer(app)
|
109 |
| - output1 = self.wait_for_element_by_id('output-1') |
110 |
| - wait_for(lambda: output1.text == 'initial value') |
| 108 | + output1 = self.wait_for_text_to_equal('#output-1', 'initial value') |
111 | 109 | self.percy_snapshot(name='wildcard-callback-1')
|
112 | 110 |
|
113 | 111 | input1 = self.wait_for_element_by_id('input')
|
114 | 112 | input1.clear()
|
115 | 113 |
|
116 | 114 | input1.send_keys('hello world')
|
117 | 115 |
|
118 |
| - output1 = lambda: self.wait_for_element_by_id('output-1') |
119 |
| - wait_for(lambda: output1().text == 'hello world') |
| 116 | + output1 = self.wait_for_text_to_equal('#output-1', 'hello world') |
120 | 117 | self.percy_snapshot(name='wildcard-callback-2')
|
121 | 118 |
|
122 | 119 | self.assertEqual(
|
|
0 commit comments