Skip to content

Commit

Permalink
more linting errors
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrei Căutișanu committed Jan 9, 2025
1 parent 315273e commit ca1d745
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 10 deletions.
22 changes: 12 additions & 10 deletions tests_end_to_end/page_objects/FeedbackDefinitionsPage.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from playwright.sync_api import Page, expect
from typing import Literal
from typing import Literal, Optional


class FeedbackDefinitionsPage:
Expand Down Expand Up @@ -62,11 +62,13 @@ def create_new_feedback(
self,
feedback_name: str,
feedback_type: Literal["categorical", "numerical"],
categories: dict = None,
min: int = None,
max: int = None,
categories: Optional[dict] = None,
min: Optional[int] = None,
max: Optional[int] = None,
):
self.page.get_by_role("button", name="Create new feedback definition").first.click()
self.page.get_by_role(
"button", name="Create new feedback definition"
).first.click()
self.page.get_by_placeholder("Feedback definition name").fill(feedback_name)
self.page.get_by_role("combobox").click()
self.page.get_by_label(feedback_type.capitalize()).click()
Expand Down Expand Up @@ -99,11 +101,11 @@ def delete_feedback_by_name(self, feedback_name: str):
def edit_feedback_by_name(
self,
feedback_name: str,
new_name: str = None,
feedback_type: Literal["categorical", "numerical"] = None,
categories: dict = None,
min: int = None,
max: int = None,
new_name: str = "",
feedback_type: Optional[Literal["categorical", "numerical"]] = None,
categories: Optional[dict] = None,
min: Optional[int] = None,
max: Optional[int] = None,
):
self.search_feedback_by_name(feedback_name=feedback_name)
self.page.get_by_role("row", name=feedback_name).first.get_by_role(
Expand Down
1 change: 1 addition & 0 deletions tests_end_to_end/tests/Feedbacks/test_feedbacks_crud.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ def test_feedback_edit(
num_new_name
)
match = re.search(r"Min: (\d+), Max: (\d+)", numerical_ui_values)
assert match is not None, "Improper formatting of min-max values"
min_value = match.group(1)
max_value = match.group(2)
assert int(min_value) == new_min
Expand Down

0 comments on commit ca1d745

Please sign in to comment.