Repository: NPGW/npgw-ui-test
Pull request #628: Refactoring: Add SelectStatusComponent
Author: login: MalkoSV
Labels: name: Project
description: This doesn't seem right in all pages
name: Refactoring
description: функциональности не добавил / поведение не менял
Created: 2025-05-23T08:26:54Z | Merged: 2025-05-24T20:25:32Z



Diff:
diff --git a/src/test/java/xyz/npgw/test/page/TransactionsPage.java b/src/test/java/xyz/npgw/test/page/TransactionsPage.java
index 0522aa7888..30fe9b1cff 100644
--- a/src/test/java/xyz/npgw/test/page/TransactionsPage.java
+++ b/src/test/java/xyz/npgw/test/page/TransactionsPage.java
@@ -14,6 +14,7 @@
 import xyz.npgw.test.page.common.trait.DateRangePickerTrait;
 import xyz.npgw.test.page.common.trait.SelectBusinessUnitTrait;
 import xyz.npgw.test.page.common.trait.SelectCompanyTrait;
+import xyz.npgw.test.page.common.trait.SelectStatusTrait;
 import xyz.npgw.test.page.common.trait.TransactionsTableTrait;
 
 import java.io.IOException;
@@ -25,7 +26,8 @@
 public class TransactionsPage extends HeaderPage<TransactionsPage> implements TransactionsTableTrait,
         DateRangePickerTrait<TransactionsPage>,
         SelectCompanyTrait<TransactionsPage>,
-        SelectBusinessUnitTrait<TransactionsPage> {
+        SelectBusinessUnitTrait<TransactionsPage>,
+        SelectStatusTrait<TransactionsPage> {
 
     private final Locator rowsPerPageButton = getByRole(AriaRole.BUTTON, "Rows Per Page");
     private final Locator rowsPerPageOptions = getByRole(AriaRole.DIALOG);
@@ -34,16 +36,13 @@ public class TransactionsPage extends HeaderPage<TransactionsPage> implements Tr
     private final Locator paginationItemTwoActiveButton = getByRole(AriaRole.BUTTON, "pagination item 2 active");
     private final Locator businessUnitSelector = getByTextExact("Business unit").locator("../../..");
     private final Locator currencySelector = getByLabelExact("Currency");
-    private final Locator paymentMethodSelector = getByLabelExact("Payment method");
-    private final Locator statusSelector = getByLabelExact("Status");
-    private final Locator amountButton = getByRole(AriaRole.BUTTON, "Amount");
+    private final Locator cardTypeSelector = getByLabelExact("Card type");
+    private final Locator cardTypeValue = getByRole(AriaRole.BUTTON, "Card type");
     private final Locator resetFilterButton = getByTestId("ResetFilterButtonTransactionsPage");
     private final Locator refreshDataButton = locator("[data-icon='arrows-rotate']");
     private final Locator settingsButton = getByTestId("SettingsButtonTransactionsPage");
     private final Locator downloadButton = getByTestId("ExportToFileuttonTransactionsPage");
-    //TODO this is a strange one
-    private final Locator statusSelectorOptions = getByRole(AriaRole.LISTBOX).locator(getByRole(AriaRole.OPTION));
-    private final Locator activeOption = getByRole(AriaRole.LISTBOX).locator("[aria-selected='true']");
+    private final Locator amountButton = getByRole(AriaRole.BUTTON, "Amount");
     private final Locator amountFromField = getByLabelExact("From").locator("..");
     private final Locator amountToField = getByLabelExact("To").locator("..");
     private final Locator clearAmountFromButton = amountFromField.locator("//button[@aria-label='clear input']");
@@ -58,13 +57,12 @@ public class TransactionsPage extends HeaderPage<TransactionsPage> implements Tr
     private final Locator amountClearButton = getByTextExact("Clear");
     private final Locator amountAppliedClearButton = getByLabelExact("close chip");
     private final Locator amountErrorMessage = locator("[data-slot='error-message']");
-    private final Locator paymentMethodOptions = locator("ul[data-slot='listbox']").getByRole(AriaRole.OPTION);
+    private final Locator cardTypeOptions = locator("ul[data-slot='listbox']").getByRole(AriaRole.OPTION);
     private final Locator settingsVisibleColumns = getPage().getByRole(AriaRole.CHECKBOX);
     private final Locator amountEditButton = locator("svg[data-icon='pencil']");
     private final Locator downloadCsvOption = getByRole(AriaRole.MENUITEM, "CSV");
     private final Locator downloadExcelOption = getByRole(AriaRole.MENUITEM, "EXCEL");
     private final Locator downloadPdfOption = getByRole(AriaRole.MENUITEM, "PDF");
-    private final Locator paymentMethodButton = getByRole(AriaRole.BUTTON, "Payment method");
 
     public TransactionsPage(Page page) {
         super(page);
@@ -201,27 +199,15 @@ public TransactionsPage clickAmountAppliedClearButton() {
         return this;
     }
 
-    @Step("Click Status Selector")
-    public TransactionsPage clickStatusSelector() {
-        statusSelector.click();
-
-        return this;
-    }
-
-    public List<String> getStatusSelectorOptions() {
-
-        return statusSelectorOptions.all().stream().map(Locator::innerText).toList();
-    }
-
-    @Step("Click Payment Method Selector")
-    public TransactionsPage clickPaymentMethodSelector() {
-        paymentMethodSelector.click();
+    @Step("Click 'Card type' selector")
+    public TransactionsPage clickCardTypeSelector() {
+        cardTypeSelector.click();
 
         return this;
     }
 
-    public List<String> getPaymentMethodOptions() {
-        return paymentMethodOptions.all().stream().map(Locator::innerText).toList();
+    public List<String> getCardTypeOptions() {
+        return cardTypeOptions.all().stream().map(Locator::innerText).toList();
     }
 
     @Step("Click on the Settings button")
@@ -327,9 +313,9 @@ public TransactionsPage clickResetFilterButton() {
         return this;
     }
 
-    @Step("Select Payment method '{value}' from dropdown menu")
-    public TransactionsPage selectPaymentMethod(String value) {
-        paymentMethodSelector.click();
+    @Step("Select Card type '{value}' from dropdown menu")
+    public TransactionsPage selectCardType(String value) {
+        cardTypeSelector.click();
         getByRole(AriaRole.OPTION, value).click();
 
         return this;
@@ -346,11 +332,4 @@ public String getRequestData() {
         }, refreshDataButton::click);
         return data.get();
     }
-
-    public TransactionsPage selectStatus(String value) {
-        clickStatusSelector();
-        getByRole(AriaRole.OPTION, value).click();
-
-        return this;
-    }
 }
diff --git a/src/test/java/xyz/npgw/test/page/common/SelectStatusComponent.java b/src/test/java/xyz/npgw/test/page/common/SelectStatusComponent.java
new file mode 100644
index 0000000000..158e7d5a09
--- /dev/null
+++ b/src/test/java/xyz/npgw/test/page/common/SelectStatusComponent.java
@@ -0,0 +1,59 @@
+package xyz.npgw.test.page.common;
+
+import com.microsoft.playwright.Locator;
+import com.microsoft.playwright.Page;
+import com.microsoft.playwright.options.AriaRole;
+import com.microsoft.playwright.options.WaitForSelectorState;
+import io.qameta.allure.Step;
+import lombok.AccessLevel;
+import lombok.Getter;
+import xyz.npgw.test.page.base.BaseComponent;
+import xyz.npgw.test.page.base.HeaderPage;
+
+@Getter
+public class SelectStatusComponent<CurrentPageT extends HeaderPage<?>> extends BaseComponent {
+    @Getter(AccessLevel.NONE)
+    private final CurrentPageT currentPage;
+    private final Locator statusSelector = getByLabelExact("Status");
+    private final Locator statusValue = statusSelector.locator("[data-slot='value']");
+    private final Locator statusDropdown = locator("div[data-slot='listbox']");
+    private final Locator statusOptions = statusDropdown.getByRole(AriaRole.OPTION);
+
+    public SelectStatusComponent(Page page, CurrentPageT currentPage) {
+        super(page);
+        this.currentPage = currentPage;
+    }
+
+    @Step("Click status '{value}' in dropdown")
+    public CurrentPageT clickValue(String value) {
+        statusOptions
+                .getByText(value, new Locator.GetByTextOptions().setExact(true))
+                .click();
+
+        return currentPage;
+    }
+
+    @Step("Wait until Status dropdown gone")
+    public CurrentPageT waitUntilDropdownGone() {
+        statusDropdown.waitFor(new Locator.WaitForOptions().setState(WaitForSelectorState.HIDDEN));
+
+        return currentPage;
+    }
+
+    @Step("Click 'Status' Selector")
+    public CurrentPageT clickSelector() {
+        statusValue.click();
+
+        return currentPage;
+    }
+
+    @Step("Select status '{value}'")
+    public CurrentPageT select(String value) {
+        clickSelector();
+        clickValue(value);
+        waitUntilDropdownGone();
+
+        return currentPage;
+    }
+
+}
diff --git a/src/test/java/xyz/npgw/test/page/common/trait/SelectStatusTrait.java b/src/test/java/xyz/npgw/test/page/common/trait/SelectStatusTrait.java
new file mode 100644
index 0000000000..cd5e71c4ca
--- /dev/null
+++ b/src/test/java/xyz/npgw/test/page/common/trait/SelectStatusTrait.java
@@ -0,0 +1,14 @@
+package xyz.npgw.test.page.common.trait;
+
+import xyz.npgw.test.page.base.BaseTrait;
+import xyz.npgw.test.page.base.HeaderPage;
+import xyz.npgw.test.page.common.SelectStatusComponent;
+
+@SuppressWarnings("unchecked")
+public interface SelectStatusTrait<CurrentPageT extends HeaderPage<?>> extends BaseTrait {
+
+    default SelectStatusComponent<CurrentPageT> getSelectStatus() {
+        return new SelectStatusComponent<>(getPage(), (CurrentPageT) this);
+    }
+
+}
diff --git a/src/test/java/xyz/npgw/test/page/system/AcquirersPage.java b/src/test/java/xyz/npgw/test/page/system/AcquirersPage.java
index 30bbe19c40..0826cc6262 100644
--- a/src/test/java/xyz/npgw/test/page/system/AcquirersPage.java
+++ b/src/test/java/xyz/npgw/test/page/system/AcquirersPage.java
@@ -3,47 +3,29 @@
 import com.microsoft.playwright.Locator;
 import com.microsoft.playwright.Page;
 import com.microsoft.playwright.options.AriaRole;
-import com.microsoft.playwright.options.WaitForSelectorState;
 import io.qameta.allure.Step;
 import lombok.Getter;
 import xyz.npgw.test.page.common.trait.AcquirersTableTrait;
 import xyz.npgw.test.page.common.trait.AlertTrait;
 import xyz.npgw.test.page.common.trait.SelectAcquirerTrait;
+import xyz.npgw.test.page.common.trait.SelectStatusTrait;
 import xyz.npgw.test.page.dialog.acquirer.AddAcquirerDialog;
 
 @Getter
 public class AcquirersPage extends BaseSystemPage<AcquirersPage> implements AcquirersTableTrait,
         SelectAcquirerTrait<AcquirersPage>,
-        AlertTrait<AcquirersPage> {
+        AlertTrait<AcquirersPage>,
+        SelectStatusTrait<AcquirersPage> {
 
     private final Locator addAcquirerButton = getByTestId("AddAcquirerButton");
     private final Locator addAcquirerDialog = getByRole(AriaRole.DIALOG);
     private final Locator resetFilterButton = getByTestId("ResetFilterButtonAcquirersPage");
     private final Locator refreshDataButton = getByTestId("ApplyFilterButtonAcquirersPage");
-    private final Locator statusLabel = getByLabelExact("Status");
-    private final Locator statusValue = statusLabel.locator("span");
-    private final Locator statusDropdown = locator("div[data-slot='listbox']");
-    private final Locator statusOptions = statusDropdown.getByRole(AriaRole.OPTION);
 
     public AcquirersPage(Page page) {
         super(page);
     }
 
-    @Step("Click Status value")
-    public AcquirersPage clickStatusValue() {
-        statusValue.click();
-
-        return this;
-    }
-
-    @Step("Select Acquirer Status '{status}'")
-    public AcquirersPage selectAcquirerStatus(String status) {
-        statusOptions.getByText(status, new Locator.GetByTextOptions().setExact(true)).click();
-        statusDropdown.waitFor(new Locator.WaitForOptions().setState(WaitForSelectorState.HIDDEN));
-
-        return this;
-    }
-
     @Step("Click Add Acquirer")
     public AddAcquirerDialog clickAddAcquirer() {
         addAcquirerButton.click();
diff --git a/src/test/java/xyz/npgw/test/page/system/CompaniesAndBusinessUnitsPage.java b/src/test/java/xyz/npgw/test/page/system/CompaniesAndBusinessUnitsPage.java
index 296d7ad626..1456549262 100644
--- a/src/test/java/xyz/npgw/test/page/system/CompaniesAndBusinessUnitsPage.java
+++ b/src/test/java/xyz/npgw/test/page/system/CompaniesAndBusinessUnitsPage.java
@@ -9,6 +9,7 @@
 import xyz.npgw.test.page.common.trait.AlertTrait;
 import xyz.npgw.test.page.common.trait.BusinessUnitsTableTrait;
 import xyz.npgw.test.page.common.trait.SelectCompanyTrait;
+import xyz.npgw.test.page.common.trait.SelectStatusTrait;
 import xyz.npgw.test.page.dialog.company.AddCompanyDialog;
 import xyz.npgw.test.page.dialog.company.EditCompanyDialog;
 import xyz.npgw.test.page.dialog.merchant.AddBusinessUnitDialog;
@@ -17,7 +18,8 @@
 public class CompaniesAndBusinessUnitsPage extends BaseSystemPage<CompaniesAndBusinessUnitsPage> implements
         SelectCompanyTrait<CompaniesAndBusinessUnitsPage>,
         AlertTrait<CompaniesAndBusinessUnitsPage>,
-        BusinessUnitsTableTrait {
+        BusinessUnitsTableTrait,
+        SelectStatusTrait<CompaniesAndBusinessUnitsPage> {
 
     private final Locator addCompanyButton = locator("button[data-testid='AddCompanyButton']");
     private final Locator addBusinessUnitButton = getByTestId("ButtonAddMerchant");
diff --git a/src/test/java/xyz/npgw/test/page/system/TeamPage.java b/src/test/java/xyz/npgw/test/page/system/TeamPage.java
index 695a6d4e54..9b3e6bc63a 100644
--- a/src/test/java/xyz/npgw/test/page/system/TeamPage.java
+++ b/src/test/java/xyz/npgw/test/page/system/TeamPage.java
@@ -2,11 +2,11 @@
 
 import com.microsoft.playwright.Locator;
 import com.microsoft.playwright.Page;
-import com.microsoft.playwright.options.AriaRole;
 import io.qameta.allure.Step;
 import lombok.extern.log4j.Log4j2;
 import xyz.npgw.test.page.common.trait.AlertTrait;
 import xyz.npgw.test.page.common.trait.SelectCompanyTrait;
+import xyz.npgw.test.page.common.trait.SelectStatusTrait;
 import xyz.npgw.test.page.common.trait.UserTableTrait;
 import xyz.npgw.test.page.dialog.user.AddUserDialog;
 import xyz.npgw.test.page.dialog.user.EditUserDialog;
@@ -15,9 +15,8 @@
 public class TeamPage extends BaseSystemPage<TeamPage> implements
         UserTableTrait,
         SelectCompanyTrait<TeamPage>,
-        AlertTrait<TeamPage> {
-
-    private final Locator statusSelector = getByLabelExact("Status");
+        AlertTrait<TeamPage>,
+        SelectStatusTrait<TeamPage> {
 
     public TeamPage(Page page) {
         super(page);
@@ -47,25 +46,4 @@ public TeamPage clickRefreshDataButton() {
 
         return this;
     }
-
-    @Step("Click 'Status' Selector")
-    public TeamPage clickStatusSelector() {
-        statusSelector.click();
-
-        return this;
-    }
-
-    @Step("Select 'Active' status")
-    public TeamPage selectActiveStatus() {
-        getPage().getByRole(AriaRole.OPTION, new Page.GetByRoleOptions().setName("Active").setExact(true)).click();
-
-        return this;
-    }
-
-    @Step("Select 'Inactive' status")
-    public TeamPage selectInactiveStatus() {
-        getPage().getByRole(AriaRole.OPTION, new Page.GetByRoleOptions().setName("Inactive")).click();
-
-        return this;
-    }
 }
diff --git a/src/test/java/xyz/npgw/test/run/AcquirersPageTest.java b/src/test/java/xyz/npgw/test/run/AcquirersPageTest.java
index 879cb7e3c0..1eee058967 100644
--- a/src/test/java/xyz/npgw/test/run/AcquirersPageTest.java
+++ b/src/test/java/xyz/npgw/test/run/AcquirersPageTest.java
@@ -57,7 +57,7 @@ public void testVisibilityAcquirersListControlTab() {
                 .isVisible();
 
         Allure.step("Verify: Status label is visible");
-        assertThat(acquirersPage.getStatusLabel()).isVisible();
+        assertThat(acquirersPage.getSelectStatus().getStatusSelector()).isVisible();
 
         Allure.step("Verify: Reset Filter Button is visible");
         assertThat(acquirersPage.getResetFilterButton()).isVisible();
@@ -113,8 +113,8 @@ public void testOpenStatusDropdown() {
         Locator actualOptions = new DashboardPage(getPage())
                 .clickSystemAdministrationLink()
                 .getSystemMenu().clickAcquirersTab()
-                .clickStatusValue()
-                .getStatusOptions();
+                .getSelectStatus().clickSelector()
+                .getSelectStatus().getStatusOptions();
 
         Allure.step("Verify: The 'Status' dropdown toggles and contains options All, Active, Inactive.");
         assertThat(actualOptions).hasText(new String[]{"All", "Active", "Inactive"});
@@ -129,8 +129,7 @@ public void testFilterAcquirersByStatus(String status) {
         List<Locator> statuses = new DashboardPage(getPage())
                 .clickSystemAdministrationLink()
                 .getSystemMenu().clickAcquirersTab()
-                .clickStatusValue()
-                .selectAcquirerStatus(status)
+                .getSelectStatus().select(status)
                 .getTable().getCells("Status");
 
         Allure.step(String.format("Verify: The 'Acquirers' list shows only '%s' items after filtering.", status));
@@ -151,19 +150,15 @@ public void testRetainStatusWhenReSelectingSameOption() {
                 .clickSystemAdministrationLink()
                 .getSystemMenu().clickAcquirersTab();
 
-        Locator actualStatus = acquirersPage.getStatusValue();
+        Locator actualStatus = acquirersPage.getSelectStatus().getStatusValue();
 
         for (String status : expectedOptions) {
-            acquirersPage
-                    .clickStatusValue()
-                    .selectAcquirerStatus(status);
+            acquirersPage.getSelectStatus().select(status);
 
             Allure.step("Verify placeholder matches expected value: " + status);
             assertThat(actualStatus).hasText(status);
 
-            acquirersPage
-                    .clickStatusValue()
-                    .selectAcquirerStatus(status);
+            acquirersPage.getSelectStatus().select(status);
 
             Allure.step("Verify again placeholder matches expected value: " + status);
             assertThat(actualStatus).hasText(status);
diff --git a/src/test/java/xyz/npgw/test/run/TeamPageTest.java b/src/test/java/xyz/npgw/test/run/TeamPageTest.java
index ad6da37af1..4977d7205c 100644
--- a/src/test/java/xyz/npgw/test/run/TeamPageTest.java
+++ b/src/test/java/xyz/npgw/test/run/TeamPageTest.java
@@ -462,15 +462,13 @@ public void testStatusFilterDisplaysCorrectUsers() {
                 .clickSystemAdministrationLink()
                 .getSelectCompany().selectCompany(companyName)
                 .getTable().deactivateUser(companyAdmin)
-                .clickStatusSelector()
-                .selectActiveStatus();
+                .getSelectStatus().select("Active");
 
         Allure.step("Verify: All visible users are 'Active' after applying 'Active' filter");
         assertTrue(teamPage.getTable().getColumnValues(statusColumnName)
                 .stream().allMatch(value -> value.equals("Active")));
 
-        teamPage.clickStatusSelector()
-                .selectInactiveStatus();
+        teamPage.getSelectStatus().select("Inactive");
 
         Allure.step("Verify: All visible users are 'Inactive' after applying Inactive filter");
         assertTrue(teamPage.getTable().getColumnValues(statusColumnName)
diff --git a/src/test/java/xyz/npgw/test/run/TransactionsPageTest.java b/src/test/java/xyz/npgw/test/run/TransactionsPageTest.java
index 6cb55ce342..bf0b9f84b0 100644
--- a/src/test/java/xyz/npgw/test/run/TransactionsPageTest.java
+++ b/src/test/java/xyz/npgw/test/run/TransactionsPageTest.java
@@ -31,12 +31,12 @@ public class TransactionsPageTest extends BaseTest {
 
     private static final List<String> COLUMNS_HEADERS = List.of(
             "Creation Date",
-            "Merchant ID",
+            "Business unit ID",
             "NPGW Reference",
             "Merchant Reference",
             "Amount",
             "Currency",
-            "Payment Method",
+            "Card type",
             "Status");
 
     @Test
@@ -130,7 +130,6 @@ public void testPaginationNextButton() {
         assertThat(transactionsPage.getPaginationItemTwoActiveButton()).isVisible();
     }
 
-    @Ignore("FAU 23/05")
     @Test
     @TmsLink("181")
     @Epic("Transactions")
@@ -152,10 +151,10 @@ public void testTheVisibilityOfTheControlPanelElementsOnTheTransactionsPage() {
         assertThat(transactionsPage.getCurrencySelector()).isVisible();
 
         Allure.step("Verify: Payment method selector is visible");
-        assertThat(transactionsPage.getPaymentMethodSelector()).isVisible();
+        assertThat(transactionsPage.getCardTypeSelector()).isVisible();
 
         Allure.step("Verify: Status selector is visible");
-        assertThat(transactionsPage.getStatusSelector()).isVisible();
+        assertThat(transactionsPage.getSelectStatus().getStatusSelector()).isVisible();
 
         Allure.step("Verify: Amount button is visible");
         assertThat(transactionsPage.getAmountButton()).isVisible();
@@ -179,22 +178,26 @@ public void testTheVisibilityOfTheControlPanelElementsOnTheTransactionsPage() {
     @Feature("Status")
     @Description("Verify that user can see selector Status Options")
     public void testTheVisibilityOfTheStatusSelectorOptions() {
-        List<String> options = List.of("ALL",
+        String[] options = {
+                "ALL",
                 "INITIATED",
                 "PENDING",
                 "SUCCESS",
                 "FAILED",
                 "CANCELLED",
-                "EXPIRED");
+                "EXPIRED"
+        };
 
         TransactionsPage transactionsPage = new DashboardPage(getPage())
                 .clickTransactionsLink()
-                .clickStatusSelector();
+                .getSelectStatus().clickSelector();
 
         Allure.step("Verify: Selector Status Options are visible");
-        assertEquals(transactionsPage.getStatusSelectorOptions(), options);
+        assertThat(transactionsPage.getSelectStatus().getStatusOptions())
+                .hasText(options);
         Allure.step("Verify: Default selected option in status selector is 'ALL'");
-        assertThat(transactionsPage.getActiveOption()).containsText("ALL");
+        assertThat(transactionsPage.getSelectStatus().getStatusValue())
+                .containsText("ALL");
     }
 
     @Test
@@ -269,25 +272,25 @@ public void testErrorMessageByAmount() {
         assertThat(transactionsPage.getAmountErrorMessage()).hasText("\"From\" should be lesser than \"To");
     }
 
-    @Ignore("FAU 23/05")
     @Test
     @TmsLink("342")
     @Epic("Transactions")
     @Feature("Status")
     @Description("Verify that user can see Payment Method Options")
-    public void testTheVisibilityOfThePaymentMethodOptions() {
+    public void testTheVisibilityOfTheCardTypeOptions() {
         List<String> options = List.of("ALL",
                 "VISA",
                 "MASTERCARD");
 
         TransactionsPage transactionsPage = new DashboardPage(getPage())
                 .clickTransactionsLink()
-                .clickPaymentMethodSelector();
+                .clickCardTypeSelector();
 
         Allure.step("Verify: Payment Method Options are visible");
-        assertEquals(transactionsPage.getPaymentMethodOptions(), options);
+        assertEquals(transactionsPage.getCardTypeOptions(), options);
         Allure.step("Verify: Default selected option in Payment Method Options is 'ALL'");
-        assertThat(transactionsPage.getActiveOption()).containsText("ALL");
+        assertThat(transactionsPage.getSelectStatus().getStatusValue())
+                .containsText("ALL");
     }
 
     @Test
@@ -544,7 +547,7 @@ public void testRequestToServer() {
                 .getDateRangePicker().setDateRangeFields("01-05-2025", "07-05-2025")
                 .clickCurrencySelector()
                 .selectCurrency("USD")
-                .selectPaymentMethod("VISA")
+                .selectCardType("VISA")
                 .clickAmountButton()
                 .fillAmountFromField("500")
                 .fillAmountToField("10000")
@@ -589,12 +592,12 @@ public void testStatusRequestServer() {
                 .clickTransactionsLink()
                 .getSelectCompany().selectCompany(companyName)
                 .getSelectBusinessUnit().selectBusinessUnit(merchantTitle)
-                .selectStatus("SUCCESS");
+                .getSelectStatus().clickSelector()
+                .getSelectStatus().clickValue("SUCCESS")
+                .getSelectStatus().clickSelector();
 
         Allure.step("Verify: status is sent to the server");
         assertTrue(transactionsPage.getRequestData().contains("SUCCESS"));
-
-
     }
 
     @Ignore("23/05")
@@ -609,17 +612,16 @@ public void testResetPaymentMethod(String paymentMethod) {
                 .clickTransactionsLink();
 
         Allure.step("Verify: Filter displays 'ALL' by default");
-        assertThat(transactionsPage.getPaymentMethodButton()).containsText("ALL");
+        assertThat(transactionsPage.getCardTypeValue()).containsText("ALL");
 
-        transactionsPage.selectPaymentMethod(paymentMethod);
+        transactionsPage.selectCardType(paymentMethod);
 
         Allure.step("Verify: Filter displays the selected payment method");
-        assertThat(transactionsPage.getPaymentMethodButton()).containsText(paymentMethod);
+        assertThat(transactionsPage.getCardTypeValue()).containsText(paymentMethod);
 
         transactionsPage.clickResetFilterButton();
 
         Allure.step("Verify: Filter displays 'ALL' after applying 'Reset filter' button ");
-        assertThat(transactionsPage.getPaymentMethodButton()).containsText("ALL");
+        assertThat(transactionsPage.getCardTypeValue()).containsText("ALL");
     }
-
 }


Reviews:
user: login: aqaestuser
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-05-24T13:32:35Z
user: login: MalkoSV
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-05-24T19:52:56Z
user: login: aqaestuser
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-05-24T19:58:35Z
user: login: aqaestuser
body: стало лучше
state: APPROVED
author_association: CONTRIBUTOR
submitted_at: 2025-05-24T19:59:54Z

Review comments:
diff_hunk: @@ -594,7 +593,9 @@ public void testStatusRequestServer() {
                 .clickTransactionsLink()
                 .getSelectCompany().selectCompany(companyName)
                 .getSelectBusinessUnit().selectBusinessUnit(merchantTitle)
-                .getSelectStatus().selectStatus("SUCCESS");
+                .getSelectStatus().clickSelector()
path: src/test/java/xyz/npgw/test/run/TransactionsPageTest.java
user: login: aqaestuser
body: что это такое

created_at: 2025-05-24T13:32:35Z
author_association: CONTRIBUTOR
diff_hunk: @@ -594,7 +593,9 @@ public void testStatusRequestServer() {
                 .clickTransactionsLink()
                 .getSelectCompany().selectCompany(companyName)
                 .getSelectBusinessUnit().selectBusinessUnit(merchantTitle)
-                .getSelectStatus().selectStatus("SUCCESS");
+                .getSelectStatus().clickSelector()
path: src/test/java/xyz/npgw/test/run/TransactionsPageTest.java
user: login: MalkoSV
body: Согласен, вариант не очень.
Пришли новьіе мьісли - допилил.
created_at: 2025-05-24T19:52:56Z
author_association: CONTRIBUTOR
diff_hunk: @@ -611,17 +612,16 @@ public void testResetPaymentMethod(String paymentMethod) {
                 .clickTransactionsLink();
 
         Allure.step("Verify: Filter displays 'ALL' by default");
-        assertThat(transactionsPage.getPaymentMethodButton()).containsText("ALL");
+        assertThat(transactionsPage.getCardTypeButton()).containsText("ALL");
 
         transactionsPage.selectPaymentMethod(paymentMethod);
 
         Allure.step("Verify: Filter displays the selected payment method");
-        assertThat(transactionsPage.getPaymentMethodButton()).containsText(paymentMethod);
+        assertThat(transactionsPage.getCardTypeButton()).containsText(paymentMethod);
path: src/test/java/xyz/npgw/test/run/TransactionsPageTest.java
user: login: aqaestuser
body: похоже это все же совсем не button
created_at: 2025-05-24T19:58:35Z
author_association: CONTRIBUTOR

PR comments:
user: login: aqaestuser
created_at: 2025-05-23T09:53:36Z
body: имхо слишком много компонентов уже ... поставим на паузу?
author_association: CONTRIBUTOR
user: login: MalkoSV
created_at: 2025-05-23T10:03:40Z
body: > имхо слишком много компонентов уже ... поставим на паузу?

Да этот хотелось бьі еще, напрашивается. 
Он на 4-х страницах, и методьі с полями там повторяются.

А 11 или 12 компонент у нас будет - разница не принципиальная. 
И они же не все для каждой страницьі нужньі..
author_association: CONTRIBUTOR