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

## Public Member Functions

| test_switch_reverts_on_late_response (self)
| test_slider_reverts_on_late_response (self)

## Static Public Attributes

int | action_delay = -1

## Detailed Description

    Test that an action which does not respond in time will revert
    to original value if not actioned in time.

    See https://bugs.launchpad.net/lomiri/+source/lomiri/+bug/1390136 .

Definition at line 188 of file test_action_latency.py.

## Member Function Documentation

## test_slider_reverts_on_late_response()

lomiri.indicators.tests.test_action_latency.TestClientRevertsToServerValue.test_slider_reverts_on_late_response | ( |  | self | ) |

Definition at line 218 of file test_action_latency.py.

def test_slider_reverts_on_late_response(self):
slider = self.indicator_page.get_slider()
slider_menu = self.indicator_page.get_slider_menu()
original_value = slider.value
slider.slide_left()
# slider should revert to original value after 5 seconds
# (30 seconds in real usage)
self.assertThat(
slider.value,
Eventually(Equals(original_value), timeout=20)
)
# make sure we've got the server value set.
self.assertThat(
slider.value,
Equals(slider_menu.serverValue)
)

## test_switch_reverts_on_late_response()

lomiri.indicators.tests.test_action_latency.TestClientRevertsToServerValue.test_switch_reverts_on_late_response | ( |  | self | ) |

Definition at line 197 of file test_action_latency.py.

def test_switch_reverts_on_late_response(self):
switch = self.indicator_page.get_switcher()
switch_menu = self.indicator_page.get_switch_menu()
original_value = switch.checked
switch.change_state()
# switch should revert to original value after 5 seconds
# (30 seconds in real usage)
self.assertThat(
switch.checked,
Eventually(Equals(original_value), timeout=20)
)
# make sure we've got the server value set.
self.assertThat(
switch.checked,
Equals(switch_menu.serverChecked)
)

## Member Data Documentation

## action_delay

int lomiri.indicators.tests.test_action_latency.TestClientRevertsToServerValue.action_delay = -1

static

Definition at line 195 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