コード例 #1
0
    def test_drag_a_file_to_drop_zone(self):
        """Scenario: Drag a single file to drop zone.

        When I drag a file to the drop zone 
        Then the file is added to the list 
        """
        mvc = MVCGui()
        datadir, testfiles = data.test_data(many=False)
        mvc.drag_and_drop_files(datadir, testfiles)
        item = testfiles[0]
        assert mvc.verify_file_in_list(item) 
コード例 #2
0
    def test_drag_and_drop_multiple_files(self):
        """Scenario: Drag multiple files.

        When I drag several files to the drop zone 
        Then the files are added to the list
        """
        mvc = MVCGui()
        datadir, testfiles = data.test_data(many=True)
        mvc.drag_and_drop_files(datadir, testfiles)
        for t in testfiles:
            assert mvc.verify_file_in_list(t) 
コード例 #3
0
    def test_drag_more_files_to_drop_zone(self):
        """Scenario: Drag additional files to the existing list.

        Given I have files in the list
        When I drag a new file to the drop zone
        Then the new file is added to the list
        """
        mvc = MVCGui()
        datadir, testfiles = data.test_data(many=True)
        mvc.browse_for_files(datadir, testfiles)
        moredatadir, moretestfiles = data.test_data(many=False, new=True)
        item = testfiles[0]
        mvc.drag_and_drop_files(moredatadir, item)
        assert mvc.verify_file_in_list(item) 
コード例 #4
0
    def test_drag_more_file_while_converting(self):
        """Scenario: Drag additional files to the existing list with conversions in progress.

        Given I have files in the list
            And I start conversion
        When I drag a new file to the drop zone 
        Then the new file is added to the list and is converted
        """

        mvc = MVCGui()
        datadir, testfiles = data.test_data(many=True)
        mvc.browse_for_files(datadir, testfiles)
        mvc.choose_device_conversion("iPad")
        mvc.start_conversion()

        moredatadir, moretestfiles = data.test_data(many=False, new=True)
        item = testfiles[0]
        mvc.drag_and_drop_files(moredatadir, item)
        assert mvc.verify_file_in_list(item)
        assert mvc.verify_completed(item, 60)