Skip to content

Commit

Permalink
fix linter
Browse files Browse the repository at this point in the history
  • Loading branch information
bashangbasir committed Jan 9, 2024
1 parent 67e3cb2 commit 8966b3d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
1 change: 0 additions & 1 deletion pylenium/performance.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,6 @@ def measure(self, mark) -> float:
js = 'return performance.measure("Measure", "{}");'.format(mark)
measured = self._wait().until(lambda driver: driver.execute_script(js), "PerformanceMeasure not generated yet")
return PerformanceMeasure(**measured).duration


class PerformanceMeasure(BaseModel):
"""The PerformanceMeasure Representation.
Expand Down
4 changes: 2 additions & 2 deletions tests/test_flows.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ def test_add_to_cart_xpath(self, sauce: Pylenium):
sauce.getx("//a[@class='shopping_cart_link']").click()
assert sauce.findx("//*[@class='cart_item']").should().have_length(6)

def test_add_to_cart_xpath(self, sauce: Pylenium):
"""Add 6 different items to the cart. There should be 6 items in the cart."""
def test_add_to_cart_xpath_duration(self, sauce: Pylenium):
"""Add 6 different items to the cart. There should be 6 items in the cart. Duration should be less than 2000ms"""
sauce.performance.mark("Adding item in cart")
for button in sauce.findx("//*[contains(@id, 'add-to-cart')]"):
button.click()
Expand Down

0 comments on commit 8966b3d

Please sign in to comment.