def test_create_tag_multi_over(self): """ Tests that multiple tags can be created in bulk edit, but no more than 13 """ expected_tags_01 = [ ['Tag01'], ['Tag01'], ['Tag01', 'AAA', 'BBB', 'CCC'], ] expected_tags_02 = [ [ 'Tag01', '00', '01', '02', '03', '04', '05', '06', '07', '08', '09', '10', '11' ], [ 'Tag01', '00', '01', '02', '03', '04', '05', '06', '07', '08', '09', '10', '11' ], [ 'Tag01', 'AAA', 'BBB', 'CCC', '00', '01', '02', '03', '04', '05', '06', '07', '08' ], ] select_listings_to_edit(self.driver) d = self.driver bp = BulkPage(d) # deselect 2, 3 bp.click_on_listings( ['Second something 1235 (2)', 'Third something LG-512a (3)']) # append AAA BBB CCC tags to the 1st listing send_keys(bp.operation_input(), 'AAA,BBB ,CCC') click(bp.operation_apply()) apply_class = bp.operation_apply().get_attribute('class') assert 'inactive' in apply_class.split(' ') tag_names = bp.tag_names() assert tag_names == expected_tags_01 # select 2, 3 again bp.click_on_listings( ['Second something 1235 (2)', 'Third something LG-512a (3)']) send_keys( bp.operation_input(), '00, 01, 02, 03, 04, 05, 06, 07, 08, 09, 10, 11, 12, 13, 14, 15') click(bp.operation_apply()) apply_class = bp.operation_apply().get_attribute('class') assert 'inactive' in apply_class.split(' ') tag_names = bp.tag_names() assert tag_names == expected_tags_02
def test_create_material_multi_over(self): """ Tests that multiple materials can be created in bulk edit, but no more than 13 """ expected_materials_01 = [ ['cotton'], ['cotton'], ['wool', 'AAA', 'BBB', 'CCC'], ] expected_materials_02 = [ [ 'cotton', '00', '01', '02', '03', '04', '05', '06', '07', '08', '09', '10', '11' ], [ 'cotton', '00', '01', '02', '03', '04', '05', '06', '07', '08', '09', '10', '11' ], [ 'wool', 'AAA', 'BBB', 'CCC', '00', '01', '02', '03', '04', '05', '06', '07', '08' ], ] select_listings_to_edit(self.driver) d = self.driver bp = BulkPage(d) # deselect 2, 3 bp.click_on_listings( ['Second something 1235 (2)', 'Third something LG-512a (3)']) # append AAA BBB CCC materials to the 1st listing send_keys(bp.operation_input(), 'AAA,BBB ,CCC') click(bp.operation_apply()) material_names = bp.material_names() assert material_names == expected_materials_01 # append 00, 01, 02... to all listings bp.click_on_listings( ['Second something 1235 (2)', 'Third something LG-512a (3)']) send_keys( bp.operation_input(), '00, 01, 02, 03, 04, 05, 06, 07, 08, 09, 10, 11, 12, 13, 14, 15') click(bp.operation_apply()) material_names = bp.material_names() assert material_names == expected_materials_02