@@ -63,8 +63,7 @@ class DashEmulatorTestCase(DashBaseTestCase):
63 def test_open_already_opened_scope(self):
63 def test_open_already_opened_scope(self):
64 scope_id = self._get_current_scope_id()
64 scope_id = self._get_current_scope_id()
65 with mock.patch.object(self.dash, 'pointing_device') as mock_pointer:
65 with mock.patch.object(self.dash, 'pointing_device') as mock_pointer:
66− scope = self.dash.open_scope(self._get_scope_name_from_id(
66+ scope = self.dash.open_scope(scope_id)
69 self.assertFalse(mock_pointer.called)
68 self.assertFalse(mock_pointer.called)
70 self._assert_scope_is_opened(scope, scope_id)
69 self._assert_scope_is_opened(scope, scope_id)
@@ -85,7 +84,7 @@ class DashEmulatorTestCase(DashBaseTestCase):
85 self.dash.open_scope(leftmost_scope)
84 self.dash.open_scope(leftmost_scope)
87 scope_id = self._get_rightmost_scope_id()
86 scope_id = self._get_rightmost_scope_id()
88− scope = self.dash.open_scope(self._get_scope_name_from_id(scope_id))
87+ scope = self.dash.open_scope(scope_id)
89 self._assert_scope_is_opened(scope, scope_id)
88 self._assert_scope_is_opened(scope, scope_id)
91 def _get_leftmost_scope_id(self):
90 def _get_leftmost_scope_id(self):
@@ -101,10 +100,6 @@ class DashEmulatorTestCase(DashBaseTestCase):
101 'QQuickItem')[0]
100 'QQuickItem')[0]
102 return item.get_children_by_type('QQuickLoader')
101 return item.get_children_by_type('QQuickLoader')
104− def _get_scope_name_from_id(self, scope_id):
105− if scope_id.endswith('.scope'):
106− return scope_id[:-6]
108 def _get_rightmost_scope_id(self):
103 def _get_rightmost_scope_id(self):
109 scope_loaders = self._get_scope_loaders()
104 scope_loaders = self._get_scope_loaders()
110 rightmost_scope_loader = scope_loaders[0]
105 rightmost_scope_loader = scope_loaders[0]
@@ -114,23 +109,22 @@ class DashEmulatorTestCase(DashBaseTestCase):
114 return rightmost_scope_loader.scopeId
109 return rightmost_scope_loader.scopeId
116 def test_open_scope_to_the_left(self):
111 def test_open_scope_to_the_left(self):
117− rightmost_scope = self._get_scope_name_from_id(
118− self._get_rightmost_scope_id())
112+ rightmost_scope = self._get_rightmost_scope_id()
119 self.dash.open_scope(rightmost_scope)
113 self.dash.open_scope(rightmost_scope)
121 scope_id = self._get_leftmost_scope_id()
115 scope_id = self._get_leftmost_scope_id()
122− scope = self.dash.open_scope(self._get_scope_name_from_id(scope_id))
116+ scope = self.dash.open_scope(scope_id)
123 self._assert_scope_is_opened(scope, scope_id)
117 self._assert_scope_is_opened(scope, scope_id)
125 def test_open_generic_scope(self):
119 def test_open_generic_scope(self):
126− scope_id = 'home.scope'
120+ scope_id = 'scopes'
127− scope = self.dash.open_scope(self._get_scope_name_from_id(scope_id))
121+ scope = self.dash.open_scope(scope_id)
128 self._assert_scope_is_opened(scope, scope_id)
122 self._assert_scope_is_opened(scope, scope_id)
129 self.assertIsInstance(scope, dash_emulators.GenericScopeView)
123 self.assertIsInstance(scope, dash_emulators.GenericScopeView)
131 def test_open_applications_scope(self):
125 def test_open_applications_scope(self):
132− scope_id = 'applications.scope'
126+ scope_id = 'clickscope'
133− scope = self.dash.open_scope(self._get_scope_name_from_id(scope_id))
127+ scope = self.dash.open_scope(scope_id)
134 self._assert_scope_is_opened(scope, scope_id)
128 self._assert_scope_is_opened(scope, scope_id)
135 self.assertIsInstance(scope, dash_emulators.DashApps)
129 self.assertIsInstance(scope, dash_emulators.DashApps)