Live location sharing - handle geolocation errors (#8179)
* display live share warning only when geolocation is happening Signed-off-by: Kerry Archibald <kerrya@element.io> * kill beacons when geolocation is unavailable or permissions denied Signed-off-by: Kerry Archibald <kerrya@element.io> * polish and comments Signed-off-by: Kerry Archibald <kerrya@element.io>
This commit is contained in:
parent
2520d81784
commit
d2b97e251e
12 changed files with 287 additions and 60 deletions
|
@ -49,9 +49,9 @@ describe('<LeftPanelLiveShareWarning />', () => {
|
|||
expect(component.html()).toBe(null);
|
||||
});
|
||||
|
||||
describe('when user has live beacons', () => {
|
||||
describe('when user has live location monitor', () => {
|
||||
beforeEach(() => {
|
||||
mocked(OwnBeaconStore.instance).hasLiveBeacons.mockReturnValue(true);
|
||||
mocked(OwnBeaconStore.instance).isMonitoringLiveLocation = true;
|
||||
});
|
||||
it('renders correctly when not minimized', () => {
|
||||
const component = getComponent();
|
||||
|
@ -68,8 +68,8 @@ describe('<LeftPanelLiveShareWarning />', () => {
|
|||
// started out rendered
|
||||
expect(component.html()).toBeTruthy();
|
||||
|
||||
mocked(OwnBeaconStore.instance).hasLiveBeacons.mockReturnValue(false);
|
||||
OwnBeaconStore.instance.emit(OwnBeaconStoreEvent.LivenessChange, false);
|
||||
mocked(OwnBeaconStore.instance).isMonitoringLiveLocation = false;
|
||||
OwnBeaconStore.instance.emit(OwnBeaconStoreEvent.MonitoringLivePosition);
|
||||
|
||||
await flushPromises();
|
||||
component.setProps({});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue