Loading...
Searching...
No Matches
lomiri.indicators.tests.test_action_latency.TestServerValueUpdate Class Reference

## Public Member Functions

| test_switch_reaches_server_value (self)
| test_slider_reaches_server_value (self)

## Static Public Attributes

list | time_scenarios

## Detailed Description

    Test that an action causes the server to update

Definition at line 54 of file test_action_latency.py.

## Member Function Documentation

## test_slider_reaches_server_value()

lomiri.indicators.tests.test_action_latency.TestServerValueUpdate.test_slider_reaches_server_value | ( |  | self | ) |

Definition at line 80 of file test_action_latency.py.

def test_slider_reaches_server_value(self):
slider = self.indicator_page.get_slider()
slider_menu = self.indicator_page.get_slider_menu()
old_value = slider.value
slider.slide_left()
final_value = slider.value
self.assertThat(
slider_menu.serverValue,
Eventually(NotEquals(old_value), timeout=20)
)
self.assertThat(
slider_menu.serverValue,
Eventually(Equals(final_value), timeout=20)
)

## test_switch_reaches_server_value()

lomiri.indicators.tests.test_action_latency.TestServerValueUpdate.test_switch_reaches_server_value | ( |  | self | ) |

Definition at line 68 of file test_action_latency.py.

def test_switch_reaches_server_value(self):
switch = self.indicator_page.get_switcher()
switch_menu = self.indicator_page.get_switch_menu()
switch.change_state()
final_value = switch.checked
self.assertThat(
switch_menu.serverChecked,
Eventually(Equals(final_value), timeout=20)
)

## Member Data Documentation

## time_scenarios

list lomiri.indicators.tests.test_action_latency.TestServerValueUpdate.time_scenarios

static

Initial value:
= [
('Low', {'action_delay': 0}),
('Medium', {'action_delay': 2500}),
('High', {'action_delay': 8000}),
]

Definition at line 58 of file test_action_latency.py.

The documentation for this class was generated from the following file:

- tests/autopilot/lomiri/indicators/tests/test_action_latency.py