Skip to content

Commit ffc6443

Browse files
committed
Sleep after clearing input (faster tests?)
1 parent f3d7825 commit ffc6443

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

tests/test_integration.py

+8-6
Original file line numberDiff line numberDiff line change
@@ -52,16 +52,16 @@ def update_output(value):
5252

5353
self.startServer(app)
5454

55-
output1 = self.wait_for_element_by_id('output-1')
56-
wait_for(lambda: output1.text == 'initial value')
55+
self.wait_for_text_to_equal('#output-1', 'initial value')
5756
self.percy_snapshot(name='simple-callback-1')
5857

5958
input1 = self.wait_for_element_by_id('input')
6059
input1.clear()
60+
time.sleep(1)
6161

6262
input1.send_keys('hello world')
6363

64-
output1 = self.wait_for_text_to_equal('#output-1', 'hello world')
64+
self.wait_for_text_to_equal('#output-1', 'hello world')
6565
self.percy_snapshot(name='simple-callback-2')
6666

6767
self.assertEqual(
@@ -105,15 +105,16 @@ def update_text(data):
105105
return data
106106

107107
self.startServer(app)
108-
output1 = self.wait_for_text_to_equal('#output-1', 'initial value')
108+
self.wait_for_text_to_equal('#output-1', 'initial value')
109109
self.percy_snapshot(name='wildcard-callback-1')
110110

111-
input1 = self.wait_for_element_by_id('input')
111+
input1 = self.wait_for_element_by_css_selector('#input')
112112
input1.clear()
113+
time.sleep(1)
113114

114115
input1.send_keys('hello world')
115116

116-
output1 = self.wait_for_text_to_equal('#output-1', 'hello world')
117+
self.wait_for_text_to_equal('#output-1', 'hello world')
117118
self.percy_snapshot(name='wildcard-callback-2')
118119

119120
self.assertEqual(
@@ -157,6 +158,7 @@ def callback2(value):
157158

158159
input_ = self.wait_for_element_by_id('input')
159160
input_.clear()
161+
time.sleep(1)
160162
input_.send_keys('x')
161163
output1 = self.wait_for_element_by_id('output1')
162164
output2 = self.wait_for_element_by_id('output2')

0 commit comments

Comments
 (0)