Skip to content

Commit

Permalink
removed check for empty inventory
Browse files Browse the repository at this point in the history
  • Loading branch information
Cars-n committed May 4, 2024
1 parent b1a903d commit e70b13d
Showing 1 changed file with 1 addition and 15 deletions.
16 changes: 1 addition & 15 deletions tests/selenium/seleniumTests.py
Original file line number Diff line number Diff line change
Expand Up @@ -169,21 +169,7 @@ def test_inventory():
time.sleep(4)

print("Testing player inventory")
print("Checking if player is empty on start")
empty_inventory = browser.execute_script('\
for (let j = 0; j < InventoryController.INVENTORY_HEIGHT; j++) {\
for (let i = 0; i < InventoryController.INVENTORY_WIDTH; i++) {\
if (inventory.inventory[j][i] != "") return false;\
}\
}\
return true;\
')
assert empty_inventory == True, "Player's inventory is not empty on start"
print("Creating flashlight item on player")
browser.execute_script('\
flashlight = new Item(player.x,player.y, "FlashLight", 2,1,8,20,flashlightImage);\
')
time.sleep(.1)
print("Checking if player started with flashlight")
has_item = browser.execute_script('return inventory.hasItem(flashlight)')
assert has_item == True, "Player did not pick up flashlight"
time.sleep(5)
Expand Down

0 comments on commit e70b13d

Please sign in to comment.