test: lock journey lifecycle and static fallback
This commit is contained in:
@@ -200,7 +200,7 @@ describe('useMotionPreferences', () => {
|
||||
connection.saveData = true;
|
||||
connection.dispatchEvent(new Event('change'));
|
||||
await nextTick();
|
||||
expect(wrapper.vm.policy).toMatchObject({ reason: 'data-saver', allowSceneRequest: false });
|
||||
expect(wrapper.vm.policy).toMatchObject({ reason: 'saved-static', allowSceneRequest: false });
|
||||
|
||||
connection.saveData = false;
|
||||
connection.dispatchEvent(new Event('change'));
|
||||
@@ -209,6 +209,10 @@ describe('useMotionPreferences', () => {
|
||||
coarseQuery.dispatchEvent(new Event('change'));
|
||||
window.dispatchEvent(new Event('resize'));
|
||||
await nextTick();
|
||||
expect(wrapper.vm.policy).toMatchObject({ reason: 'saved-static', maximumTier: 'static' });
|
||||
|
||||
wrapper.vm.setMaximumQuality('high');
|
||||
await nextTick();
|
||||
expect(wrapper.vm.policy).toMatchObject({ reason: 'full', maximumTier: 'low' });
|
||||
|
||||
wrapper.unmount();
|
||||
|
||||
Reference in New Issue
Block a user