def test_remove_subset_triggers_selection_changed(self):
     layer = self.add_layer()
     grp = self.collect.new_subset_group()
     mock = MagicMock()
     self.select_layers(grp)
     self.widget.ui.layerTree.selection_changed.connect(mock)
     QTest.mouseClick(self.widget.ui.layerRemoveButton, Qt.LeftButton)
     assert mock.call_count > 0
Beispiel #2
0
 def test_remove_subset_triggers_selection_changed(self):
     layer = self.add_layer()
     grp = self.collect.new_subset_group()
     mock = MagicMock()
     self.select_layers(grp)
     self.widget.layerTree.selection_changed.connect(mock)
     QTest.mouseClick(self.widget.layerRemoveButton, Qt.LeftButton)
     assert mock.call_count > 0
Beispiel #3
0
    def test_drag_drop(self):
        QTest.mousePress(self.w1, Qt.LeftButton)
        QTest.mouseMove(self.w2)
        QTest.mouseRelease(self.w2, Qt.LeftButton)

        assert self.w2.last_mime == self.m1
 def test_empty_removal_does_nothing(self):
     """ Make sure widgets are only removed when selected """
     layer = self.add_layer()
     self.widget.ui.layerTree.clearSelection()
     QTest.mouseClick(self.widget.ui.layerRemoveButton, Qt.LeftButton)
     assert self.layer_present(layer)
 def remove_layer(self, layer):
     """ Remove a layer via the widget remove button """
     self.select_layers(layer)
     QTest.mouseClick(self.widget.ui.layerRemoveButton, Qt.LeftButton)
Beispiel #6
0
 def remove_layer(self, layer):
     """ Remove a layer via the widget remove button """
     self.select_layers(layer)
     QTest.mousePress(self.widget.layerRemoveButton, Qt.LeftButton)
     QTest.mouseRelease(self.widget.layerRemoveButton, Qt.LeftButton)
Beispiel #7
0
 def test_empty_removal_does_nothing(self):
     """ Make sure widgets are only removed when selected """
     layer = self.add_layer()
     self.widget.layerTree.clearSelection()
     QTest.mouseClick(self.widget.layerRemoveButton, Qt.LeftButton)
     assert self.layer_present(layer)
Beispiel #8
0
 def remove_layer(self, layer):
     """ Remove a layer via the widget remove button """
     self.select_layers(layer)
     QTest.mouseClick(self.widget.layerRemoveButton, Qt.LeftButton)