Best Python code snippet using playwright-python
generic_redirect_abilities.py
Source:generic_redirect_abilities.py
1# THIS FILE WAS AUTOMATICALLY GENERATED BY "generate_dicts_from_data_json.py" DO NOT CHANGE MANUALLY!2# ANY CHANGE WILL BE OVERWRITTEN3from ..ids.unit_typeid import UnitTypeId4from ..ids.ability_id import AbilityId5from ..ids.upgrade_id import UpgradeId6# from ..ids.buff_id import BuffId7# from ..ids.effect_id import EffectId8from typing import Dict, Set, Union9GENERIC_REDIRECT_ABILITIES: Dict[AbilityId, AbilityId] = {10 AbilityId.ARMORYRESEARCH_TERRANSHIPWEAPONSLEVEL1: AbilityId.RESEARCH_TERRANSHIPWEAPONS,11 AbilityId.ARMORYRESEARCH_TERRANSHIPWEAPONSLEVEL2: AbilityId.RESEARCH_TERRANSHIPWEAPONS,12 AbilityId.ARMORYRESEARCH_TERRANSHIPWEAPONSLEVEL3: AbilityId.RESEARCH_TERRANSHIPWEAPONS,13 AbilityId.ARMORYRESEARCH_TERRANVEHICLEANDSHIPPLATINGLEVEL1: AbilityId.RESEARCH_TERRANVEHICLEANDSHIPPLATING,14 AbilityId.ARMORYRESEARCH_TERRANVEHICLEANDSHIPPLATINGLEVEL2: AbilityId.RESEARCH_TERRANVEHICLEANDSHIPPLATING,15 AbilityId.ARMORYRESEARCH_TERRANVEHICLEANDSHIPPLATINGLEVEL3: AbilityId.RESEARCH_TERRANVEHICLEANDSHIPPLATING,16 AbilityId.ARMORYRESEARCH_TERRANVEHICLEWEAPONSLEVEL1: AbilityId.RESEARCH_TERRANVEHICLEWEAPONS,17 AbilityId.ARMORYRESEARCH_TERRANVEHICLEWEAPONSLEVEL2: AbilityId.RESEARCH_TERRANVEHICLEWEAPONS,18 AbilityId.ARMORYRESEARCH_TERRANVEHICLEWEAPONSLEVEL3: AbilityId.RESEARCH_TERRANVEHICLEWEAPONS,19 AbilityId.ATTACKPROTOSSBUILDING_ATTACKBUILDING: AbilityId.ATTACK,20 AbilityId.ATTACK_ATTACK: AbilityId.ATTACK,21 AbilityId.ATTACK_BATTLECRUISER: AbilityId.ATTACK,22 AbilityId.ATTACK_REDIRECT: AbilityId.ATTACK,23 AbilityId.BEHAVIOR_CLOAKOFF_BANSHEE: AbilityId.BEHAVIOR_CLOAKOFF,24 AbilityId.BEHAVIOR_CLOAKOFF_GHOST: AbilityId.BEHAVIOR_CLOAKOFF,25 AbilityId.BEHAVIOR_CLOAKON_BANSHEE: AbilityId.BEHAVIOR_CLOAKON,26 AbilityId.BEHAVIOR_CLOAKON_GHOST: AbilityId.BEHAVIOR_CLOAKON,27 AbilityId.BEHAVIOR_HOLDFIREOFF_GHOST: AbilityId.BEHAVIOR_HOLDFIREOFF,28 AbilityId.BEHAVIOR_HOLDFIREOFF_LURKER: AbilityId.BEHAVIOR_HOLDFIREOFF,29 AbilityId.BEHAVIOR_HOLDFIREON_GHOST: AbilityId.BEHAVIOR_HOLDFIREON,30 AbilityId.BEHAVIOR_HOLDFIREON_LURKER: AbilityId.BEHAVIOR_HOLDFIREON,31 AbilityId.BROODLORDQUEUE2_CANCEL: AbilityId.CANCEL_LAST,32 AbilityId.BROODLORDQUEUE2_CANCELSLOT: AbilityId.CANCEL_SLOT,33 AbilityId.BUILDINPROGRESSNYDUSCANAL_CANCEL: AbilityId.CANCEL,34 AbilityId.BUILDNYDUSCANAL_CANCEL: AbilityId.HALT,35 AbilityId.BUILD_CREEPTUMOR_QUEEN: AbilityId.BUILD_CREEPTUMOR,36 AbilityId.BUILD_CREEPTUMOR_TUMOR: AbilityId.BUILD_CREEPTUMOR,37 AbilityId.BUILD_REACTOR_BARRACKS: AbilityId.BUILD_REACTOR,38 AbilityId.BUILD_REACTOR_FACTORY: AbilityId.BUILD_REACTOR,39 AbilityId.BUILD_REACTOR_STARPORT: AbilityId.BUILD_REACTOR,40 AbilityId.BUILD_TECHLAB_BARRACKS: AbilityId.BUILD_TECHLAB,41 AbilityId.BUILD_TECHLAB_FACTORY: AbilityId.BUILD_TECHLAB,42 AbilityId.BUILD_TECHLAB_STARPORT: AbilityId.BUILD_TECHLAB,43 AbilityId.BURROWBANELINGDOWN_CANCEL: AbilityId.CANCEL,44 AbilityId.BURROWCREEPTUMORDOWN_BURROWDOWN: AbilityId.BURROWDOWN,45 AbilityId.BURROWDOWN_BANELING: AbilityId.BURROWDOWN,46 AbilityId.BURROWDOWN_DRONE: AbilityId.BURROWDOWN,47 AbilityId.BURROWDOWN_HYDRALISK: AbilityId.BURROWDOWN,48 AbilityId.BURROWDOWN_INFESTOR: AbilityId.BURROWDOWN,49 AbilityId.BURROWDOWN_INFESTORTERRAN: AbilityId.BURROWDOWN,50 AbilityId.BURROWDOWN_LURKER: AbilityId.BURROWDOWN,51 AbilityId.BURROWDOWN_QUEEN: AbilityId.BURROWDOWN,52 AbilityId.BURROWDOWN_RAVAGER: AbilityId.BURROWDOWN,53 AbilityId.BURROWDOWN_ROACH: AbilityId.BURROWDOWN,54 AbilityId.BURROWDOWN_SWARMHOST: AbilityId.BURROWDOWN,55 AbilityId.BURROWDOWN_ULTRALISK: AbilityId.BURROWDOWN,56 AbilityId.BURROWDOWN_WIDOWMINE: AbilityId.BURROWDOWN,57 AbilityId.BURROWDOWN_ZERGLING: AbilityId.BURROWDOWN,58 AbilityId.BURROWDRONEDOWN_CANCEL: AbilityId.CANCEL,59 AbilityId.BURROWHYDRALISKDOWN_CANCEL: AbilityId.CANCEL,60 AbilityId.BURROWINFESTORDOWN_CANCEL: AbilityId.CANCEL,61 AbilityId.BURROWLURKERMPDOWN_CANCEL: AbilityId.CANCEL,62 AbilityId.BURROWQUEENDOWN_CANCEL: AbilityId.CANCEL,63 AbilityId.BURROWRAVAGERDOWN_CANCEL: AbilityId.CANCEL,64 AbilityId.BURROWROACHDOWN_CANCEL: AbilityId.CANCEL,65 AbilityId.BURROWUP_BANELING: AbilityId.BURROWUP,66 AbilityId.BURROWUP_DRONE: AbilityId.BURROWUP,67 AbilityId.BURROWUP_HYDRALISK: AbilityId.BURROWUP,68 AbilityId.BURROWUP_INFESTOR: AbilityId.BURROWUP,69 AbilityId.BURROWUP_INFESTORTERRAN: AbilityId.BURROWUP,70 AbilityId.BURROWUP_LURKER: AbilityId.BURROWUP,71 AbilityId.BURROWUP_QUEEN: AbilityId.BURROWUP,72 AbilityId.BURROWUP_RAVAGER: AbilityId.BURROWUP,73 AbilityId.BURROWUP_ROACH: AbilityId.BURROWUP,74 AbilityId.BURROWUP_SWARMHOST: AbilityId.BURROWUP,75 AbilityId.BURROWUP_ULTRALISK: AbilityId.BURROWUP,76 AbilityId.BURROWUP_WIDOWMINE: AbilityId.BURROWUP,77 AbilityId.BURROWUP_ZERGLING: AbilityId.BURROWUP,78 AbilityId.BURROWZERGLINGDOWN_CANCEL: AbilityId.CANCEL,79 AbilityId.CANCELSLOT_ADDON: AbilityId.CANCEL_SLOT,80 AbilityId.CANCELSLOT_HANGARQUEUE5: AbilityId.CANCEL_SLOT,81 AbilityId.CANCELSLOT_QUEUE1: AbilityId.CANCEL_SLOT,82 AbilityId.CANCELSLOT_QUEUE5: AbilityId.CANCEL_SLOT,83 AbilityId.CANCELSLOT_QUEUECANCELTOSELECTION: AbilityId.CANCEL_SLOT,84 AbilityId.CANCELSLOT_QUEUEPASSIVE: AbilityId.CANCEL_SLOT,85 AbilityId.CANCELSLOT_QUEUEPASSIVECANCELTOSELECTION: AbilityId.CANCEL_SLOT,86 AbilityId.CANCEL_ADEPTPHASESHIFT: AbilityId.CANCEL,87 AbilityId.CANCEL_ADEPTSHADEPHASESHIFT: AbilityId.CANCEL,88 AbilityId.CANCEL_BARRACKSADDON: AbilityId.CANCEL,89 AbilityId.CANCEL_BUILDINPROGRESS: AbilityId.CANCEL,90 AbilityId.CANCEL_CREEPTUMOR: AbilityId.CANCEL,91 AbilityId.CANCEL_FACTORYADDON: AbilityId.CANCEL,92 AbilityId.CANCEL_GRAVITONBEAM: AbilityId.CANCEL,93 AbilityId.CANCEL_HANGARQUEUE5: AbilityId.CANCEL_LAST,94 AbilityId.CANCEL_LOCKON: AbilityId.CANCEL,95 AbilityId.CANCEL_MORPHBROODLORD: AbilityId.CANCEL,96 AbilityId.CANCEL_MORPHGREATERSPIRE: AbilityId.CANCEL,97 AbilityId.CANCEL_MORPHHIVE: AbilityId.CANCEL,98 AbilityId.CANCEL_MORPHLAIR: AbilityId.CANCEL,99 AbilityId.CANCEL_MORPHLURKER: AbilityId.CANCEL,100 AbilityId.CANCEL_MORPHMOTHERSHIP: AbilityId.CANCEL,101 AbilityId.CANCEL_MORPHORBITAL: AbilityId.CANCEL,102 AbilityId.CANCEL_MORPHOVERLORDTRANSPORT: AbilityId.CANCEL,103 AbilityId.CANCEL_MORPHOVERSEER: AbilityId.CANCEL,104 AbilityId.CANCEL_MORPHPLANETARYFORTRESS: AbilityId.CANCEL,105 AbilityId.CANCEL_MORPHRAVAGER: AbilityId.CANCEL,106 AbilityId.CANCEL_MORPHTHOREXPLOSIVEMODE: AbilityId.CANCEL,107 AbilityId.CANCEL_NEURALPARASITE: AbilityId.CANCEL,108 AbilityId.CANCEL_NUKE: AbilityId.CANCEL,109 AbilityId.CANCEL_QUEUE1: AbilityId.CANCEL_LAST,110 AbilityId.CANCEL_QUEUE5: AbilityId.CANCEL_LAST,111 AbilityId.CANCEL_QUEUEADDON: AbilityId.CANCEL_LAST,112 AbilityId.CANCEL_QUEUECANCELTOSELECTION: AbilityId.CANCEL_LAST,113 AbilityId.CANCEL_QUEUEPASIVE: AbilityId.CANCEL_LAST,114 AbilityId.CANCEL_QUEUEPASSIVECANCELTOSELECTION: AbilityId.CANCEL_LAST,115 AbilityId.CANCEL_SPINECRAWLERROOT: AbilityId.CANCEL,116 AbilityId.CANCEL_SPORECRAWLERROOT: AbilityId.CANCEL,117 AbilityId.CANCEL_STARPORTADDON: AbilityId.CANCEL,118 AbilityId.CANCEL_STASISTRAP: AbilityId.CANCEL,119 AbilityId.CANCEL_VOIDRAYPRISMATICALIGNMENT: AbilityId.CANCEL,120 AbilityId.CYBERNETICSCORERESEARCH_PROTOSSAIRARMORLEVEL1: AbilityId.RESEARCH_PROTOSSAIRARMOR,121 AbilityId.CYBERNETICSCORERESEARCH_PROTOSSAIRARMORLEVEL2: AbilityId.RESEARCH_PROTOSSAIRARMOR,122 AbilityId.CYBERNETICSCORERESEARCH_PROTOSSAIRARMORLEVEL3: AbilityId.RESEARCH_PROTOSSAIRARMOR,123 AbilityId.CYBERNETICSCORERESEARCH_PROTOSSAIRWEAPONSLEVEL1: AbilityId.RESEARCH_PROTOSSAIRWEAPONS,124 AbilityId.CYBERNETICSCORERESEARCH_PROTOSSAIRWEAPONSLEVEL2: AbilityId.RESEARCH_PROTOSSAIRWEAPONS,125 AbilityId.CYBERNETICSCORERESEARCH_PROTOSSAIRWEAPONSLEVEL3: AbilityId.RESEARCH_PROTOSSAIRWEAPONS,126 AbilityId.DEFILERMPBURROW_BURROWDOWN: AbilityId.BURROWDOWN,127 AbilityId.DEFILERMPBURROW_CANCEL: AbilityId.CANCEL,128 AbilityId.DEFILERMPUNBURROW_BURROWUP: AbilityId.BURROWUP,129 AbilityId.EFFECT_BLINK_STALKER: AbilityId.EFFECT_BLINK,130 AbilityId.EFFECT_MASSRECALL_MOTHERSHIPCORE: AbilityId.EFFECT_MASSRECALL,131 AbilityId.EFFECT_MASSRECALL_NEXUS: AbilityId.EFFECT_MASSRECALL,132 AbilityId.EFFECT_MASSRECALL_STRATEGICRECALL: AbilityId.EFFECT_MASSRECALL,133 AbilityId.EFFECT_REPAIR_MULE: AbilityId.EFFECT_REPAIR,134 AbilityId.EFFECT_REPAIR_REPAIRDRONE: AbilityId.EFFECT_REPAIR,135 AbilityId.EFFECT_REPAIR_SCV: AbilityId.EFFECT_REPAIR,136 AbilityId.EFFECT_SHADOWSTRIDE: AbilityId.EFFECT_BLINK,137 AbilityId.EFFECT_SPRAY_PROTOSS: AbilityId.EFFECT_SPRAY,138 AbilityId.EFFECT_SPRAY_TERRAN: AbilityId.EFFECT_SPRAY,139 AbilityId.EFFECT_SPRAY_ZERG: AbilityId.EFFECT_SPRAY,140 AbilityId.EFFECT_STIM_MARAUDER: AbilityId.EFFECT_STIM,141 AbilityId.EFFECT_STIM_MARAUDER_REDIRECT: AbilityId.EFFECT_STIM,142 AbilityId.EFFECT_STIM_MARINE: AbilityId.EFFECT_STIM,143 AbilityId.EFFECT_STIM_MARINE_REDIRECT: AbilityId.EFFECT_STIM,144 AbilityId.ENGINEERINGBAYRESEARCH_TERRANINFANTRYARMORLEVEL1: AbilityId.RESEARCH_TERRANINFANTRYARMOR,145 AbilityId.ENGINEERINGBAYRESEARCH_TERRANINFANTRYARMORLEVEL2: AbilityId.RESEARCH_TERRANINFANTRYARMOR,146 AbilityId.ENGINEERINGBAYRESEARCH_TERRANINFANTRYARMORLEVEL3: AbilityId.RESEARCH_TERRANINFANTRYARMOR,147 AbilityId.ENGINEERINGBAYRESEARCH_TERRANINFANTRYWEAPONSLEVEL1: AbilityId.RESEARCH_TERRANINFANTRYWEAPONS,148 AbilityId.ENGINEERINGBAYRESEARCH_TERRANINFANTRYWEAPONSLEVEL2: AbilityId.RESEARCH_TERRANINFANTRYWEAPONS,149 AbilityId.ENGINEERINGBAYRESEARCH_TERRANINFANTRYWEAPONSLEVEL3: AbilityId.RESEARCH_TERRANINFANTRYWEAPONS,150 AbilityId.FORCEFIELD_CANCEL: AbilityId.CANCEL,151 AbilityId.FORGERESEARCH_PROTOSSGROUNDARMORLEVEL1: AbilityId.RESEARCH_PROTOSSGROUNDARMOR,152 AbilityId.FORGERESEARCH_PROTOSSGROUNDARMORLEVEL2: AbilityId.RESEARCH_PROTOSSGROUNDARMOR,153 AbilityId.FORGERESEARCH_PROTOSSGROUNDARMORLEVEL3: AbilityId.RESEARCH_PROTOSSGROUNDARMOR,154 AbilityId.FORGERESEARCH_PROTOSSGROUNDWEAPONSLEVEL1: AbilityId.RESEARCH_PROTOSSGROUNDWEAPONS,155 AbilityId.FORGERESEARCH_PROTOSSGROUNDWEAPONSLEVEL2: AbilityId.RESEARCH_PROTOSSGROUNDWEAPONS,156 AbilityId.FORGERESEARCH_PROTOSSGROUNDWEAPONSLEVEL3: AbilityId.RESEARCH_PROTOSSGROUNDWEAPONS,157 AbilityId.FORGERESEARCH_PROTOSSSHIELDSLEVEL1: AbilityId.RESEARCH_PROTOSSSHIELDS,158 AbilityId.FORGERESEARCH_PROTOSSSHIELDSLEVEL2: AbilityId.RESEARCH_PROTOSSSHIELDS,159 AbilityId.FORGERESEARCH_PROTOSSSHIELDSLEVEL3: AbilityId.RESEARCH_PROTOSSSHIELDS,160 AbilityId.HALT_BUILDING: AbilityId.HALT,161 AbilityId.HALT_TERRANBUILD: AbilityId.HALT,162 AbilityId.HARVEST_GATHER_DRONE: AbilityId.HARVEST_GATHER,163 AbilityId.HARVEST_GATHER_MULE: AbilityId.HARVEST_GATHER,164 AbilityId.HARVEST_GATHER_PROBE: AbilityId.HARVEST_GATHER,165 AbilityId.HARVEST_GATHER_SCV: AbilityId.HARVEST_GATHER,166 AbilityId.HARVEST_RETURN_DRONE: AbilityId.HARVEST_RETURN,167 AbilityId.HARVEST_RETURN_MULE: AbilityId.HARVEST_RETURN,168 AbilityId.HARVEST_RETURN_PROBE: AbilityId.HARVEST_RETURN,169 AbilityId.HARVEST_RETURN_SCV: AbilityId.HARVEST_RETURN,170 AbilityId.HOLDPOSITION_BATTLECRUISER: AbilityId.HOLDPOSITION,171 AbilityId.HOLDPOSITION_HOLD: AbilityId.HOLDPOSITION,172 AbilityId.LAND_BARRACKS: AbilityId.LAND,173 AbilityId.LAND_COMMANDCENTER: AbilityId.LAND,174 AbilityId.LAND_FACTORY: AbilityId.LAND,175 AbilityId.LAND_ORBITALCOMMAND: AbilityId.LAND,176 AbilityId.LAND_STARPORT: AbilityId.LAND,177 AbilityId.LIFT_BARRACKS: AbilityId.LIFT,178 AbilityId.LIFT_COMMANDCENTER: AbilityId.LIFT,179 AbilityId.LIFT_FACTORY: AbilityId.LIFT,180 AbilityId.LIFT_ORBITALCOMMAND: AbilityId.LIFT,181 AbilityId.LIFT_STARPORT: AbilityId.LIFT,182 AbilityId.LOADALL_COMMANDCENTER: AbilityId.LOADALL,183 AbilityId.LOAD_BUNKER: AbilityId.LOAD,184 AbilityId.LOAD_MEDIVAC: AbilityId.LOAD,185 AbilityId.LOAD_NYDUSNETWORK: AbilityId.LOAD,186 AbilityId.LOAD_NYDUSWORM: AbilityId.LOAD,187 AbilityId.LOAD_OVERLORD: AbilityId.LOAD,188 AbilityId.LOAD_WARPPRISM: AbilityId.LOAD,189 AbilityId.MERGEABLE_CANCEL: AbilityId.CANCEL,190 AbilityId.MORPHBACKTOGATEWAY_CANCEL: AbilityId.CANCEL,191 AbilityId.MORPHTOCOLLAPSIBLEPURIFIERTOWERDEBRIS_CANCEL: AbilityId.CANCEL,192 AbilityId.MORPHTOCOLLAPSIBLEROCKTOWERDEBRISRAMPLEFTGREEN_CANCEL: AbilityId.CANCEL,193 AbilityId.MORPHTOCOLLAPSIBLEROCKTOWERDEBRISRAMPLEFT_CANCEL: AbilityId.CANCEL,194 AbilityId.MORPHTOCOLLAPSIBLEROCKTOWERDEBRISRAMPRIGHTGREEN_CANCEL: AbilityId.CANCEL,195 AbilityId.MORPHTOCOLLAPSIBLEROCKTOWERDEBRISRAMPRIGHT_CANCEL: AbilityId.CANCEL,196 AbilityId.MORPHTOCOLLAPSIBLEROCKTOWERDEBRIS_CANCEL: AbilityId.CANCEL,197 AbilityId.MORPHTOCOLLAPSIBLETERRANTOWERDEBRISRAMPLEFT_CANCEL: AbilityId.CANCEL,198 AbilityId.MORPHTOCOLLAPSIBLETERRANTOWERDEBRISRAMPRIGHT_CANCEL: AbilityId.CANCEL,199 AbilityId.MORPHTOCOLLAPSIBLETERRANTOWERDEBRIS_CANCEL: AbilityId.CANCEL,200 AbilityId.MORPHTODEVOURERMP_CANCEL: AbilityId.CANCEL,201 AbilityId.MORPHTOGUARDIANMP_CANCEL: AbilityId.CANCEL,202 AbilityId.MORPHTOSWARMHOSTBURROWEDMP_CANCEL: AbilityId.CANCEL,203 AbilityId.MOVE_BATTLECRUISER: AbilityId.MOVE,204 AbilityId.MOVE_MOVE: AbilityId.MOVE,205 AbilityId.PATROL_BATTLECRUISER: AbilityId.PATROL,206 AbilityId.PATROL_PATROL: AbilityId.PATROL,207 AbilityId.PHASINGMODE_CANCEL: AbilityId.CANCEL,208 AbilityId.PROTOSSBUILD_CANCEL: AbilityId.HALT,209 AbilityId.QUEENBUILD_CANCEL: AbilityId.HALT,210 AbilityId.RALLY_BUILDING: AbilityId.RALLY_UNITS,211 AbilityId.RALLY_COMMANDCENTER: AbilityId.RALLY_WORKERS,212 AbilityId.RALLY_HATCHERY_UNITS: AbilityId.RALLY_UNITS,213 AbilityId.RALLY_HATCHERY_WORKERS: AbilityId.RALLY_WORKERS,214 AbilityId.RALLY_MORPHING_UNIT: AbilityId.RALLY_UNITS,215 AbilityId.RALLY_NEXUS: AbilityId.RALLY_WORKERS,216 AbilityId.RESEARCH_ZERGFLYERARMORLEVEL1: AbilityId.RESEARCH_ZERGFLYERARMOR,217 AbilityId.RESEARCH_ZERGFLYERARMORLEVEL2: AbilityId.RESEARCH_ZERGFLYERARMOR,218 AbilityId.RESEARCH_ZERGFLYERARMORLEVEL3: AbilityId.RESEARCH_ZERGFLYERARMOR,219 AbilityId.RESEARCH_ZERGFLYERATTACKLEVEL1: AbilityId.RESEARCH_ZERGFLYERATTACK,220 AbilityId.RESEARCH_ZERGFLYERATTACKLEVEL2: AbilityId.RESEARCH_ZERGFLYERATTACK,221 AbilityId.RESEARCH_ZERGFLYERATTACKLEVEL3: AbilityId.RESEARCH_ZERGFLYERATTACK,222 AbilityId.RESEARCH_ZERGGROUNDARMORLEVEL1: AbilityId.RESEARCH_ZERGGROUNDARMOR,223 AbilityId.RESEARCH_ZERGGROUNDARMORLEVEL2: AbilityId.RESEARCH_ZERGGROUNDARMOR,224 AbilityId.RESEARCH_ZERGGROUNDARMORLEVEL3: AbilityId.RESEARCH_ZERGGROUNDARMOR,225 AbilityId.RESEARCH_ZERGMELEEWEAPONSLEVEL1: AbilityId.RESEARCH_ZERGMELEEWEAPONS,226 AbilityId.RESEARCH_ZERGMELEEWEAPONSLEVEL2: AbilityId.RESEARCH_ZERGMELEEWEAPONS,227 AbilityId.RESEARCH_ZERGMELEEWEAPONSLEVEL3: AbilityId.RESEARCH_ZERGMELEEWEAPONS,228 AbilityId.RESEARCH_ZERGMISSILEWEAPONSLEVEL1: AbilityId.RESEARCH_ZERGMISSILEWEAPONS,229 AbilityId.RESEARCH_ZERGMISSILEWEAPONSLEVEL2: AbilityId.RESEARCH_ZERGMISSILEWEAPONS,230 AbilityId.RESEARCH_ZERGMISSILEWEAPONSLEVEL3: AbilityId.RESEARCH_ZERGMISSILEWEAPONS,231 AbilityId.SCAN_MOVE: AbilityId.ATTACK,232 AbilityId.SPINECRAWLERROOT_SPINECRAWLERROOT: AbilityId.MORPH_ROOT,233 AbilityId.SPINECRAWLERUPROOT_CANCEL: AbilityId.CANCEL,234 AbilityId.SPINECRAWLERUPROOT_SPINECRAWLERUPROOT: AbilityId.MORPH_UPROOT,235 AbilityId.SPORECRAWLERROOT_SPORECRAWLERROOT: AbilityId.MORPH_ROOT,236 AbilityId.SPORECRAWLERUPROOT_CANCEL: AbilityId.CANCEL,237 AbilityId.SPORECRAWLERUPROOT_SPORECRAWLERUPROOT: AbilityId.MORPH_UPROOT,238 AbilityId.STOP_BATTLECRUISER: AbilityId.STOP,239 AbilityId.STOP_BUILDING: AbilityId.STOP,240 AbilityId.STOP_CHEER: AbilityId.STOP,241 AbilityId.STOP_DANCE: AbilityId.STOP,242 AbilityId.STOP_HOLDFIRESPECIAL: AbilityId.STOP,243 AbilityId.STOP_REDIRECT: AbilityId.STOP,244 AbilityId.STOP_STOP: AbilityId.STOP,245 AbilityId.TESTZERG_CANCEL: AbilityId.CANCEL,246 AbilityId.THORAPMODE_CANCEL: AbilityId.CANCEL,247 AbilityId.TRANSPORTMODE_CANCEL: AbilityId.CANCEL,248 AbilityId.UNLOADALLAT_MEDIVAC: AbilityId.UNLOADALLAT,249 AbilityId.UNLOADALLAT_OVERLORD: AbilityId.UNLOADALLAT,250 AbilityId.UNLOADALLAT_WARPPRISM: AbilityId.UNLOADALLAT,251 AbilityId.UNLOADALL_BUNKER: AbilityId.UNLOADALL,252 AbilityId.UNLOADALL_COMMANDCENTER: AbilityId.UNLOADALL,253 AbilityId.UNLOADALL_NYDASNETWORK: AbilityId.UNLOADALL,254 AbilityId.UNLOADALL_NYDUSWORM: AbilityId.UNLOADALL,255 AbilityId.UNLOADALL_WARPPRISM: AbilityId.UNLOADALL,256 AbilityId.UNLOADUNIT_BUNKER: AbilityId.UNLOADUNIT,257 AbilityId.UNLOADUNIT_COMMANDCENTER: AbilityId.UNLOADUNIT,258 AbilityId.UNLOADUNIT_MEDIVAC: AbilityId.UNLOADUNIT,259 AbilityId.UNLOADUNIT_NYDASNETWORK: AbilityId.UNLOADUNIT,260 AbilityId.UNLOADUNIT_OVERLORD: AbilityId.UNLOADUNIT,261 AbilityId.UNLOADUNIT_WARPPRISM: AbilityId.UNLOADUNIT,262 AbilityId.UPGRADETOWARPGATE_CANCEL: AbilityId.CANCEL,263 AbilityId.WARPABLE_CANCEL: AbilityId.CANCEL,264 AbilityId.WIDOWMINEBURROW_CANCEL: AbilityId.CANCEL,265 AbilityId.ZERGBUILD_CANCEL: AbilityId.HALT,...
test_move_cancel_propagation.py
Source:test_move_cancel_propagation.py
...54 self.assertTrue(purchase_order, 'No purchase order created.')55 # Check status of Purchase Order56 self.assertEqual(purchase_order.state, 'draft', "Purchase order should be in 'draft' state.")57 # Cancel Purchase order.58 purchase_order.button_cancel()59 # Check the status of picking after canceling po.60 self.assertNotEqual(self.picking_out.state, 'cancel')61 def test_02_cancel_confirm_purchase_order_one_steps(self):62 """ Check the picking and moves status related purchase order, When canceling purchase order63 after confirming.64 Ex.65 1) Set one steps of receiption and delivery on the warehouse.66 2) Create Delivery order with mto move and confirm the order, related RFQ should be generated.67 3) Cancel 'confirmed' purchase order, should cancel releted < Receiption >68 but it should not cancel < Delivery > order.69 """70 self.warehouse.write({'delivery_steps': 'ship_only', 'reception_steps': 'one_step'})71 self.picking_out.write({'location_id': self.warehouse.out_type_id.default_location_src_id.id})72 self.move.write({'location_id': self.warehouse.out_type_id.default_location_src_id.id})73 self.picking_out.action_confirm()74 # Find PO related to picking.75 purchase_order = self.env['purchase.order'].search([('partner_id', '=', self.customer.id)])76 # Po should be create related picking.77 self.assertTrue(purchase_order, 'No purchase order created.')78 # Check status of Purchase Order79 self.assertEqual(purchase_order.state, 'draft', "Purchase order should be in 'draft' state.")80 purchase_order .button_confirm()81 picking_in = purchase_order.picking_ids.filtered(lambda r: r.picking_type_id == self.warehouse.in_type_id)82 # Cancel Purchase order.83 purchase_order .button_cancel()84 # Check the status of picking after canceling po.85 self.assertEquals(picking_in.state, 'cancel')86 self.assertNotEqual(self.picking_out.state, 'cancel')87 def test_03_cancel_draft_purchase_order_two_steps(self):88 """ Check the picking and moves status related PO, When canceling purchase order89 in 'draft' state.90 Ex.91 1) Set two steps of receiption and delivery on the warehouse.92 2) Create Delivery order with mto move and confirm the order, related RFQ should be generated.93 3) Cancel 'draft' purchase order should cancel < Input to Stock>94 but it should not cancel < PICK, Delivery >95 """96 self.warehouse.write({'delivery_steps': 'pick_ship', 'reception_steps': 'two_steps'})97 self.picking_out.write({'location_id': self.warehouse.out_type_id.default_location_src_id.id})98 self.move.write({'location_id': self.warehouse.out_type_id.default_location_src_id.id})99 self.picking_out.action_confirm()100 # Find purchase order related to picking.101 purchase_order = self.env['purchase.order'].search([('partner_id', '=', self.customer.id)])102 # Purchase order should be created for picking.103 self.assertTrue(purchase_order, 'No purchase order created.')104 picking_ids = self.env['stock.picking'].search([('group_id', '=', self.group.id)])105 internal = picking_ids.filtered(lambda r: r.picking_type_id == self.warehouse.int_type_id and r.group_id.id == self.group.id)106 pick = picking_ids.filtered(lambda r: r.picking_type_id == self.warehouse.pick_type_id and r.group_id.id == self.group.id)107 # Check status of Purchase Order108 self.assertEqual(purchase_order.state, 'draft', "Purchase order should be in 'draft' state.")109 # Cancel Purchase order.110 purchase_order.button_cancel()111 # Check the status of picking after canceling po.112 for res in internal:113 self.assertEqual(res.state, 'cancel')114 self.assertNotEqual(pick.state, 'cancel')115 self.assertNotEqual(self.picking_out.state, 'cancel')116 def test_04_cancel_confirm_purchase_order_two_steps(self):117 """ Check the picking and moves status related PO, When canceling purchase order118 Ex.119 1) Set 2 steps of receiption and delivery on the warehouse.120 2) Create Delivery order with mto move and confirm the order, related RFQ should be generated.121 3) Cancel 'comfirm' purchase order should cancel releted < Receiption Picking IN, INT>122 not < PICK, SHIP >123 """124 self.warehouse.write({'delivery_steps': 'pick_ship', 'reception_steps': 'two_steps'})125 self.picking_out.write({'location_id': self.warehouse.out_type_id.default_location_src_id.id})126 self.move.write({'location_id': self.warehouse.out_type_id.default_location_src_id.id})127 self.picking_out.action_confirm()128 # Find PO related to picking.129 purchase_order = self.env['purchase.order'].search([('partner_id', '=', self.customer.id)])130 # Po should be create related picking.131 self.assertTrue(purchase_order, 'purchase order is created.')132 picking_ids = self.env['stock.picking'].search([('group_id', '=', self.group.id)])133 internal = picking_ids.filtered(lambda r: r.picking_type_id == self.warehouse.int_type_id)134 pick = picking_ids.filtered(lambda r: r.picking_type_id == self.warehouse.pick_type_id)135 # Check status of Purchase Order136 self.assertEqual(purchase_order.state, 'draft', "Purchase order should be in 'draft' state.")137 purchase_order.button_confirm()138 picking_in = purchase_order.picking_ids.filtered(lambda r: r.picking_type_id == self.warehouse.in_type_id)139 # Cancel Purchase order.140 purchase_order.button_cancel()141 # Check the status of picking after canceling po.142 self.assertEqual(picking_in.state, 'cancel')143 for res in internal:144 self.assertEqual(res.state, 'cancel')145 self.assertNotEqual(pick.state, 'cancel')146 self.assertNotEqual(self.picking_out.state, 'cancel')147 def test_05_cancel_draft_purchase_order_three_steps(self):148 """ Check the picking and moves status related PO, When canceling purchase order149 Ex.150 1) Set 3 steps of receiption and delivery on the warehouse.151 2) Create Delivery order with mto move and confirm the order, related RFQ should be generated.152 3) Cancel 'draft' purchase order should cancel releted < Receiption Picking IN>153 not < PICK, PACK, SHIP >154 """155 self.warehouse.write({'delivery_steps': 'pick_pack_ship', 'reception_steps': 'three_steps'})156 self.picking_out.write({'location_id': self.warehouse.out_type_id.default_location_src_id.id})157 self.move.write({'location_id': self.warehouse.out_type_id.default_location_src_id.id})158 self.picking_out.action_confirm()159 # Find PO related to picking.160 purchase_order = self.env['purchase.order'].search([('partner_id', '=', self.customer.id)])161 # Po should be create related picking.162 self.assertTrue(purchase_order, 'No purchase order created.')163 picking_ids = self.env['stock.picking'].search([('group_id', '=', self.group.id)])164 internal = picking_ids.filtered(lambda r: r.picking_type_id == self.warehouse.int_type_id)165 pick = picking_ids.filtered(lambda r: r.picking_type_id == self.warehouse.pick_type_id)166 pack = picking_ids.filtered(lambda r: r.picking_type_id == self.warehouse.pack_type_id)167 # Check status of Purchase Order168 self.assertEqual(purchase_order.state, 'draft', "Purchase order should be in 'draft' state.")169 # Cancel Purchase order.170 purchase_order.button_cancel()171 # Check the status of picking after canceling po.172 for res in internal:173 self.assertEqual(res.state, 'cancel')174 self.assertNotEqual(pick.state, 'cancel')175 self.assertNotEqual(pack.state, 'cancel')176 self.assertNotEqual(self.picking_out.state, 'cancel')177 def test_06_cancel_confirm_purchase_order_three_steps(self):178 """ Check the picking and moves status related PO, When canceling purchase order179 Ex.180 1) Set 3 steps of receiption and delivery on the warehouse.181 2) Create Delivery order with mto move and confirm the order, related RFQ should be generated.182 3) Cancel 'comfirm' purchase order should cancel releted < Receiption Picking IN, INT>183 not < PICK, PACK, SHIP >184 """185 self.warehouse.write({'delivery_steps': 'pick_pack_ship', 'reception_steps': 'three_steps'})186 self.picking_out.write({'location_id': self.warehouse.out_type_id.default_location_src_id.id})187 self.move.write({'location_id': self.warehouse.out_type_id.default_location_src_id.id})188 self.picking_out.action_confirm()189 # Find PO related to picking.190 purchase_order = self.env['purchase.order'].search([('partner_id', '=', self.customer.id)])191 # Po should be create related picking.192 self.assertTrue(purchase_order, 'No purchase order created.')193 picking_ids = self.env['stock.picking'].search([('group_id', '=', self.group.id)])194 internal = picking_ids.filtered(lambda r: r.picking_type_id == self.warehouse.int_type_id)195 pick = picking_ids.filtered(lambda r: r.picking_type_id == self.warehouse.pick_type_id)196 pack = picking_ids.filtered(lambda r: r.picking_type_id == self.warehouse.pack_type_id)197 # Check status of Purchase Order198 self.assertEqual(purchase_order.state, 'draft', "Purchase order should be in 'draft' state.")199 purchase_order.button_confirm()200 picking_in = purchase_order.picking_ids.filtered(lambda r: r.picking_type_id == self.warehouse.in_type_id)201 # Cancel Purchase order.202 purchase_order.button_cancel()203 # Check the status of picking after canceling po.204 self.assertEqual(picking_in.state, 'cancel')205 for res in internal:206 self.assertEqual(res.state, 'cancel')207 self.assertNotEqual(pick.state, 'cancel')208 self.assertNotEqual(pack.state, 'cancel')209 self.assertNotEqual(self.picking_out.state, 'cancel')210 def test_cancel_move_lines_operation(self):211 """Check for done and cancelled moves. Ensure that the RFQ cancellation212 will not impact the delivery state if it's already cancelled.213 """214 stock_location = self.env['ir.model.data'].xmlid_to_object('stock.stock_location_stock')215 customer_location = self.env['ir.model.data'].xmlid_to_object('stock.stock_location_customers')216 picking_type_out = self.env['ir.model.data'].xmlid_to_object('stock.picking_type_out')217 partner = self.env['res.partner'].create({218 'name': 'Steve'219 })220 seller = self.env['product.supplierinfo'].create({221 'name': partner.id,222 'price': 10.0,223 })224 product_car = self.env['product.product'].create({225 'name': 'Car',226 'type': 'product',227 'route_ids': [(4, self.ref('stock.route_warehouse0_mto')), (4, self.ref('purchase_stock.route_warehouse0_buy'))],228 'seller_ids': [(6, 0, [seller.id])],229 'categ_id': self.env.ref('product.product_category_all').id,230 })231 customer_picking = self.env['stock.picking'].create({232 'location_id': stock_location.id,233 'location_dest_id': customer_location.id,234 'partner_id': partner.id,235 'picking_type_id': picking_type_out.id,236 })237 customer_move = self.env['stock.move'].create({238 'name': 'move out',239 'location_id': stock_location.id,240 'location_dest_id': customer_location.id,241 'product_id': product_car.id,242 'product_uom': product_car.uom_id.id,243 'product_uom_qty': 10.0,244 'procure_method': 'make_to_order',245 'picking_id': customer_picking.id,246 })247 customer_move._action_confirm()248 purchase_order = self.env['purchase.order'].search([('partner_id', '=', partner.id)])249 customer_move._action_cancel()250 self.assertEqual(customer_move.state, 'cancel', 'Move should be cancelled')251 purchase_order.button_cancel()...
test_cancel_mo.py
Source:test_cancel_mo.py
...11 """12 # Create MO13 manufacturing_order = self.generate_mo()[0]14 # Do nothing, cancel it15 manufacturing_order.action_cancel()16 # Check the MO and its moves are cancelled17 self.assertEqual(manufacturing_order.state, 'cancel', "MO should be in cancel state.")18 self.assertEqual(manufacturing_order.move_raw_ids[0].state, 'cancel',19 "Cancelled MO raw moves must be cancelled as well.")20 self.assertEqual(manufacturing_order.move_raw_ids[1].state, 'cancel',21 "Cancelled MO raw moves must be cancelled as well.")22 self.assertEqual(manufacturing_order.move_finished_ids.state, 'cancel',23 "Cancelled MO finished move must be cancelled as well.")24 def test_cancel_mo_without_routing_2(self):25 """ Cancel a Manufacturing Order with no routing but some productions.26 """27 # Create MO28 manufacturing_order = self.generate_mo()[0]29 # Produce some quantity30 produce_form = Form(self.env['mrp.product.produce'].with_context(active_id=manufacturing_order.id))31 produce_form.qty_producing = 232 produce = produce_form.save()33 produce.do_produce()34 # Cancel it35 manufacturing_order.action_cancel()36 # Check it's cancelled37 self.assertEqual(manufacturing_order.state, 'cancel', "MO should be in cancel state.")38 self.assertEqual(manufacturing_order.move_raw_ids[0].state, 'cancel',39 "Cancelled MO raw moves must be cancelled as well.")40 self.assertEqual(manufacturing_order.move_raw_ids[1].state, 'cancel',41 "Cancelled MO raw moves must be cancelled as well.")42 self.assertEqual(manufacturing_order.move_finished_ids.state, 'cancel',43 "Cancelled MO finished move must be cancelled as well.")44 def test_cancel_mo_without_routing_3(self):45 """ Cancel a Manufacturing Order with no routing but some productions46 after post inventory.47 """48 # Create MO49 manufacturing_order = self.generate_mo()[0]50 # Produce some quantity (not all to avoid to done the MO when post inventory)51 produce_form = Form(self.env['mrp.product.produce'].with_context(active_id=manufacturing_order.id))52 produce_form.qty_producing = 253 produce = produce_form.save()54 produce.do_produce()55 # Post Inventory56 manufacturing_order.post_inventory()57 # Cancel the MO58 manufacturing_order.action_cancel()59 # Check MO is marked as done and its SML are done or cancelled60 self.assertEqual(manufacturing_order.state, 'done', "MO should be in done state.")61 self.assertEqual(manufacturing_order.move_raw_ids[0].state, 'done',62 "Due to 'post_inventory', some move raw must stay in done state")63 self.assertEqual(manufacturing_order.move_raw_ids[1].state, 'done',64 "Due to 'post_inventory', some move raw must stay in done state")65 self.assertEqual(manufacturing_order.move_raw_ids[2].state, 'cancel',66 "The other move raw are cancelled like their MO.")67 self.assertEqual(manufacturing_order.move_raw_ids[3].state, 'cancel',68 "The other move raw are cancelled like their MO.")69 self.assertEqual(manufacturing_order.move_finished_ids[0].state, 'done',70 "Due to 'post_inventory', a move finished must stay in done state")71 self.assertEqual(manufacturing_order.move_finished_ids[1].state, 'cancel',72 "The other move finished is cancelled like its MO.")73 def test_cancel_mo_with_routing(self):74 """ Cancel a Manufacturing Order with routing (so generate a Work Order)75 and produce some quantities. When cancelled, the MO must be marked as76 done and the WO must be cancelled.77 """78 # Create MO79 mo_data = self.generate_mo()80 manufacturing_order = mo_data[0]81 bom = mo_data[1]82 bom.routing_id = self.routing_183 manufacturing_order.button_plan()84 workorder = manufacturing_order.workorder_ids85 # Produce some quantity86 workorder.button_start()87 workorder.qty_producing = 288 workorder._apply_update_workorder_lines()89 workorder.record_production()90 # Post Inventory91 manufacturing_order.post_inventory()92 # Cancel it93 manufacturing_order.action_cancel()94 # Check MO is done, WO is cancelled and its SML are done or cancelled95 self.assertEqual(manufacturing_order.state, 'done', "MO should be in done state.")96 self.assertEqual(workorder.state, 'cancel', "WO should be cancelled.")97 self.assertEqual(manufacturing_order.move_raw_ids[0].state, 'done',98 "Due to 'post_inventory', some move raw must stay in done state")99 self.assertEqual(manufacturing_order.move_raw_ids[1].state, 'done',100 "Due to 'post_inventory', some move raw must stay in done state")101 self.assertEqual(manufacturing_order.move_raw_ids[2].state, 'cancel',102 "The other move raw are cancelled like their MO.")103 self.assertEqual(manufacturing_order.move_raw_ids[3].state, 'cancel',104 "The other move raw are cancelled like their MO.")105 self.assertEqual(manufacturing_order.move_finished_ids[0].state, 'done',106 "Due to 'post_inventory', a move finished must stay in done state")107 self.assertEqual(manufacturing_order.move_finished_ids[1].state, 'cancel',...
cancel_check.py
Source:cancel_check.py
...23class acount_payment(models.Model):24 _inherit = "account.payment"25 _description = "Account Payment Check"26 pdf_viewer = fields.Binary(string="Export Pdf")27 def print_checks_cancel(self):28 if self.void_status == False:29 raise UserError(_("Please Write The Check Void Reason"))30 else:31 checks_number = self.check_number_show32 banks_name = self.bank_account_name.name33 banks_acount_no = self.bank_account_no.acc_number34 amount_check = float(self.amount)35 checks_print_date = self.print_show_date36 checks_recive_date = self.receive_check_date37 checks_cancel_reason = self.all_void_status_reason38 checks_type = self.check_type39 checks_payment_type = self.check_status40 partner_name = self.partner_id.name41 memo = self.communication42 43 payments = self.env['cancel.check'].browse(self.env.context.get('active_ids', []))44 payments.create({'cancel_check_no': checks_number, 'cancel_check_bank_name': banks_name, 'cancel_check_acc_no': banks_acount_no, 45 'cancel_check_amount': amount_check, 'cancel_check_print_date': checks_print_date, 'cancel_check_recv_date': checks_recive_date,46 'cancel_check_reason': checks_cancel_reason, 'cancel_check_type': checks_type, 'cancel_check_payment_type': checks_payment_type, 47 'cancel_check_part_name': partner_name, 'payment_memo_number': memo,})48 for payment in payments:49 payment.check_amount = "check_amount_word"50 return self.write({'state': 'posted', 'void_status': False})51 52 def receive_checks_cancel(self):53 if self.receive_void_status == False:54 raise UserError(_("Please Write The Check Void Reason"))55 else:56 checks_number = self.check_number_show57 banks_name = self.bank_account_name.name58 banks_acount_no = self.bank_account_no.acc_number59 amount_check = float(self.amount)60 checks_print_date = self.print_show_date61 checks_recive_date = self.receive_check_date62 checks_cancel_reason = self.all_void_status_reason63 checks_type = self.check_type64 checks_payment_type = self.check_status65 partner_name = self.partner_id.name66 memo = self.communication...
LambdaTest’s Playwright tutorial will give you a broader idea about the Playwright automation framework, its unique features, and use cases with examples to exceed your understanding of Playwright testing. This tutorial will give A to Z guidance, from installing the Playwright framework to some best practices and advanced concepts.
Get 100 minutes of automation test minutes FREE!!