Repository: provectus/kafka-ui
Issue: [e2e] create screen facade class and refactor objects of page classes creation
Labels: type/enhancement
scope/QA
status/accepted

- need to create this class with created screen class objects
- inherit BaseTest from Facade
- refactor objects of page classes creation

Issue comments:

Pull request review comments:
several apiHelpers?
where's schemaForm?
fixed
added all forms 
we don't need to remove navigation steps from test. please return mainPage.goTo()
.goToSideMenu(CLUSTER_NAME, bla-bla
we don't need to remove navigation steps from test. please return mainPage.goTo()
.goToSideMenu(CLUSTER_NAME, bla-bla
we don't need to remove navigation steps from test. please return mainPage.goTo()
.goToSideMenu(CLUSTER_NAME, bla-bla
we don't need to remove navigation steps from test. please return mainPage.goTo()
.goToSideMenu(CLUSTER_NAME, bla-bla
Done 
Done 
Done 
Done 

Patch that resolved the issue:
diff --git a/kafka-ui-e2e-checks/src/main/java/com/provectus/kafka/ui/helpers/Helpers.java b/kafka-ui-e2e-checks/src/main/java/com/provectus/kafka/ui/helpers/Helpers.java
deleted file mode 100644
index cda55a0cb25..00000000000
--- a/kafka-ui-e2e-checks/src/main/java/com/provectus/kafka/ui/helpers/Helpers.java
+++ /dev/null
@@ -1,11 +0,0 @@
-package com.provectus.kafka.ui.helpers;
-
-
-
-public class Helpers {
-    public static final Helpers INSTANCE = new Helpers();
-
-    private Helpers(){}
-
-    public ApiHelper apiHelper = new ApiHelper();
-}
diff --git a/kafka-ui-e2e-checks/src/main/java/com/provectus/kafka/ui/pages/Pages.java b/kafka-ui-e2e-checks/src/main/java/com/provectus/kafka/ui/pages/Pages.java
deleted file mode 100644
index 79a7652dd4d..00000000000
--- a/kafka-ui-e2e-checks/src/main/java/com/provectus/kafka/ui/pages/Pages.java
+++ /dev/null
@@ -1,53 +0,0 @@
-package com.provectus.kafka.ui.pages;
-
-import com.provectus.kafka.ui.pages.connector.ConnectorsList;
-import com.provectus.kafka.ui.pages.connector.ConnectorsView;
-import com.provectus.kafka.ui.pages.schema.SchemaRegistryList;
-import com.provectus.kafka.ui.pages.topic.ProduceMessagePanel;
-import com.provectus.kafka.ui.pages.topic.TopicView;
-import com.provectus.kafka.ui.pages.topic.TopicsList;
-import io.qameta.allure.Step;
-
-public class Pages {
-
-    public static Pages INSTANCE = new Pages();
-
-    public MainPage mainPage = new MainPage();
-    public TopicsList topicsList = new TopicsList();
-    public TopicView topicView = new TopicView();
-    public ProduceMessagePanel produceMessagePanel = new ProduceMessagePanel();
-    public ConnectorsList connectorsList = new ConnectorsList();
-    public ConnectorsView connectorsView = new ConnectorsView();
-    public SchemaRegistryList schemaRegistry = new SchemaRegistryList();
-
-    @Step
-    public MainPage open() {
-        return openMainPage();
-    }
-
-    @Step
-    public MainPage openMainPage() {
-        return mainPage.goTo();
-    }
-
-    @Step
-    public TopicsList openTopicsList(String clusterName) {
-        return topicsList.goTo(clusterName);
-    }
-
-    @Step
-    public TopicView openTopicView(String clusterName, String topicName) {
-        return topicView.goTo(clusterName, topicName);
-    }
-
-    @Step
-    public ConnectorsList openConnectorsList(String clusterName) {
-        return connectorsList.goTo(clusterName);
-    }
-
-    @Step
-    public ConnectorsView openConnectorsView(String clusterName, String connectorName) {
-        return connectorsView.goTo(clusterName, connectorName);
-    }
-
-}
diff --git a/kafka-ui-e2e-checks/src/main/java/com/provectus/kafka/ui/pages/connector/ConnectorCreateView.java b/kafka-ui-e2e-checks/src/main/java/com/provectus/kafka/ui/pages/connector/ConnectorCreateView.java
index 16faa760581..296dff5b1f0 100644
--- a/kafka-ui-e2e-checks/src/main/java/com/provectus/kafka/ui/pages/connector/ConnectorCreateView.java
+++ b/kafka-ui-e2e-checks/src/main/java/com/provectus/kafka/ui/pages/connector/ConnectorCreateView.java
@@ -2,9 +2,7 @@
 
 import com.codeborne.selenide.Condition;
 import com.codeborne.selenide.SelenideElement;
-import com.provectus.kafka.ui.utilities.WaitUtils;
 import io.qameta.allure.Step;
-import lombok.experimental.ExtensionMethod;
 import org.openqa.selenium.By;
 
 import static com.codeborne.selenide.Selenide.$;
@@ -12,7 +10,6 @@
 import static com.provectus.kafka.ui.utilities.WebUtils.javaExecutorClick;
 import static com.provectus.kafka.ui.utilities.screenshots.Screenshooter.log;
 
-@ExtensionMethod(WaitUtils.class)
 public class ConnectorCreateView {
 
     SelenideElement nameField = $(By.xpath("//input[@name='name']"));
diff --git a/kafka-ui-e2e-checks/src/main/java/com/provectus/kafka/ui/pages/connector/ConnectorsView.java b/kafka-ui-e2e-checks/src/main/java/com/provectus/kafka/ui/pages/connector/ConnectorsView.java
index 48f05529e32..86c7f0dfdaa 100644
--- a/kafka-ui-e2e-checks/src/main/java/com/provectus/kafka/ui/pages/connector/ConnectorsView.java
+++ b/kafka-ui-e2e-checks/src/main/java/com/provectus/kafka/ui/pages/connector/ConnectorsView.java
@@ -4,9 +4,7 @@
 import com.codeborne.selenide.Selenide;
 import com.codeborne.selenide.SelenideElement;
 import com.provectus.kafka.ui.settings.Source;
-import com.provectus.kafka.ui.utilities.WaitUtils;
 import io.qameta.allure.Step;
-import lombok.experimental.ExtensionMethod;
 import org.openqa.selenium.By;
 import org.openqa.selenium.Keys;
 
@@ -14,7 +12,6 @@
 import static com.provectus.kafka.ui.utilities.WebUtils.javaExecutorClick;
 import static com.provectus.kafka.ui.utilities.screenshots.Screenshooter.log;
 
-@ExtensionMethod(WaitUtils.class)
 public class ConnectorsView {
     private static final String path = "/ui/clusters/%s/connects/first/connectors/%s";
     protected SelenideElement submitButton = $(By.xpath("//button[@type='submit']"));


Test patch:
diff --git a/kafka-ui-e2e-checks/src/test/java/com/provectus/kafka/ui/SmokeTests.java b/kafka-ui-e2e-checks/src/test/java/com/provectus/kafka/ui/SmokeTests.java
index ee2024d0e7d..c9c560c3edc 100644
--- a/kafka-ui-e2e-checks/src/test/java/com/provectus/kafka/ui/SmokeTests.java
+++ b/kafka-ui-e2e-checks/src/test/java/com/provectus/kafka/ui/SmokeTests.java
@@ -1,8 +1,8 @@
 package com.provectus.kafka.ui;
 
 import com.provectus.kafka.ui.base.BaseTest;
-import com.provectus.kafka.ui.utilities.qaseIoUtils.enums.Status;
 import com.provectus.kafka.ui.utilities.qaseIoUtils.annotations.AutomationStatus;
+import com.provectus.kafka.ui.utilities.qaseIoUtils.enums.Status;
 import io.qase.api.annotation.CaseId;
 import org.junit.jupiter.api.DisplayName;
 import org.junit.jupiter.api.Test;
@@ -14,7 +14,7 @@ public class SmokeTests extends BaseTest {
     @CaseId(198)
     @DisplayName("main page should load")
     void mainPageLoads() {
-        pages.open()
+        mainPage.goTo()
                 .waitUntilScreenReady();
         compareScreenshots("main");
     }
diff --git a/kafka-ui-e2e-checks/src/test/java/com/provectus/kafka/ui/base/BaseTest.java b/kafka-ui-e2e-checks/src/test/java/com/provectus/kafka/ui/base/BaseTest.java
index a69f3afc9dd..a864a36eb2c 100644
--- a/kafka-ui-e2e-checks/src/test/java/com/provectus/kafka/ui/base/BaseTest.java
+++ b/kafka-ui-e2e-checks/src/test/java/com/provectus/kafka/ui/base/BaseTest.java
@@ -1,8 +1,6 @@
 package com.provectus.kafka.ui.base;
 
 import com.codeborne.selenide.WebDriverRunner;
-import com.provectus.kafka.ui.helpers.Helpers;
-import com.provectus.kafka.ui.pages.Pages;
 import com.provectus.kafka.ui.utilities.qaseIoUtils.DisplayNameGenerator;
 import com.provectus.kafka.ui.utilities.qaseIoUtils.TestCaseGenerator;
 import com.provectus.kafka.ui.utilities.screenshots.Screenshooter;
@@ -30,13 +28,11 @@
 
 @Slf4j
 @DisplayNameGeneration(DisplayNameGenerator.class)
-public class BaseTest {
+public class BaseTest extends Facade {
 
   private static final String SELENIUM_IMAGE_NAME = "selenium/standalone-chrome:103.0";
   private static final String SELENIARM_STANDALONE_CHROMIUM = "seleniarm/standalone-chromium:103.0";
   protected static final String CLUSTER_NAME = "local";
-  protected Pages pages = Pages.INSTANCE;
-  protected Helpers helpers = Helpers.INSTANCE;
 
   private final Screenshooter screenshooter = new Screenshooter();
 
diff --git a/kafka-ui-e2e-checks/src/test/java/com/provectus/kafka/ui/base/Facade.java b/kafka-ui-e2e-checks/src/test/java/com/provectus/kafka/ui/base/Facade.java
new file mode 100644
index 00000000000..8e9b1f149ab
--- /dev/null
+++ b/kafka-ui-e2e-checks/src/test/java/com/provectus/kafka/ui/base/Facade.java
@@ -0,0 +1,31 @@
+package com.provectus.kafka.ui.base;
+
+import com.provectus.kafka.ui.helpers.ApiHelper;
+import com.provectus.kafka.ui.pages.MainPage;
+import com.provectus.kafka.ui.pages.connector.ConnectorCreateView;
+import com.provectus.kafka.ui.pages.connector.ConnectorsList;
+import com.provectus.kafka.ui.pages.connector.ConnectorsView;
+import com.provectus.kafka.ui.pages.schema.SchemaCreateView;
+import com.provectus.kafka.ui.pages.schema.SchemaEditView;
+import com.provectus.kafka.ui.pages.schema.SchemaRegistryList;
+import com.provectus.kafka.ui.pages.schema.SchemaView;
+import com.provectus.kafka.ui.pages.topic.ProduceMessagePanel;
+import com.provectus.kafka.ui.pages.topic.TopicCreateEditSettingsView;
+import com.provectus.kafka.ui.pages.topic.TopicView;
+import com.provectus.kafka.ui.pages.topic.TopicsList;
+
+public abstract class Facade {
+    protected MainPage mainPage = new MainPage();
+    protected ApiHelper apiHelper = new ApiHelper();
+    protected ConnectorCreateView connectorCreateView = new ConnectorCreateView();
+    protected ConnectorsList connectorsList = new ConnectorsList();
+    protected ConnectorsView connectorsView = new ConnectorsView();
+    protected SchemaCreateView schemaCreateView = new SchemaCreateView();
+    protected SchemaEditView schemaEditView = new SchemaEditView();
+    protected SchemaView schemaView = new SchemaView();
+    protected SchemaRegistryList schemaRegistryList = new SchemaRegistryList();
+    protected ProduceMessagePanel produceMessagePanel = new ProduceMessagePanel();
+    protected TopicCreateEditSettingsView topicCreateEditSettingsView = new TopicCreateEditSettingsView();
+    protected TopicsList topicsList = new TopicsList();
+    protected TopicView topicView = new TopicView();
+}
diff --git a/kafka-ui-e2e-checks/src/test/java/com/provectus/kafka/ui/tests/ConnectorsTests.java b/kafka-ui-e2e-checks/src/test/java/com/provectus/kafka/ui/tests/ConnectorsTests.java
index bc643fa5b3a..d99d08ffbd8 100644
--- a/kafka-ui-e2e-checks/src/test/java/com/provectus/kafka/ui/tests/ConnectorsTests.java
+++ b/kafka-ui-e2e-checks/src/test/java/com/provectus/kafka/ui/tests/ConnectorsTests.java
@@ -1,12 +1,11 @@
 package com.provectus.kafka.ui.tests;
 
 import com.provectus.kafka.ui.base.BaseTest;
-import com.provectus.kafka.ui.helpers.Helpers;
 import com.provectus.kafka.ui.models.Connector;
 import com.provectus.kafka.ui.models.Topic;
-import com.provectus.kafka.ui.utilities.qaseIoUtils.enums.Status;
 import com.provectus.kafka.ui.utilities.qaseIoUtils.annotations.AutomationStatus;
 import com.provectus.kafka.ui.utilities.qaseIoUtils.annotations.Suite;
+import com.provectus.kafka.ui.utilities.qaseIoUtils.enums.Status;
 import io.qase.api.annotation.CaseId;
 import org.junit.jupiter.api.*;
 
@@ -15,6 +14,7 @@
 
 import static com.provectus.kafka.ui.utilities.FileUtils.getResourceAsString;
 
+@TestInstance(TestInstance.Lifecycle.PER_CLASS)
 public class ConnectorsTests extends BaseTest {
     private static final long SUITE_ID = 10;
     private static final String SUITE_TITLE = "Kafka Connect";
@@ -40,14 +40,14 @@ public class ConnectorsTests extends BaseTest {
             .setConfig(getResourceAsString("config_for_create_connector_via_api.json"));
 
     @BeforeAll
-    public static void beforeAll() {
+    public void beforeAll() {
         TOPIC_LIST.addAll(List.of(TOPIC_FOR_CREATE, TOPIC_FOR_DELETE, TOPIC_FOR_UPDATE));
         TOPIC_LIST.forEach(topic -> {
-            Helpers.INSTANCE.apiHelper.createTopic(CLUSTER_NAME, topic.getName());
-            Helpers.INSTANCE.apiHelper.sendMessage(CLUSTER_NAME, topic);
+            apiHelper.createTopic(CLUSTER_NAME, topic.getName());
+            apiHelper.sendMessage(CLUSTER_NAME, topic);
         });
         CONNECTOR_LIST.addAll(List.of(CONNECTOR_FOR_DELETE, CONNECTOR_FOR_UPDATE));
-        CONNECTOR_LIST.forEach(connector -> Helpers.INSTANCE.apiHelper
+        CONNECTOR_LIST.forEach(connector -> apiHelper
                 .createConnector(CLUSTER_NAME, CONNECT_NAME, connector));
     }
 
@@ -60,14 +60,14 @@ public void createConnector() {
         Connector connectorForCreate = new Connector()
                 .setName("sink_postgres_activities_e2e_checks")
                 .setConfig(getResourceAsString("config_for_create_connector.json"));
-        pages.openConnectorsList(CLUSTER_NAME)
+        connectorsList.goTo(CLUSTER_NAME)
                 .waitUntilScreenReady()
                 .clickCreateConnectorButton()
                 .waitUntilScreenReady()
                 .setConnectorConfig(connectorForCreate.getName(), connectorForCreate.getConfig());
-        pages.openConnectorsList(CLUSTER_NAME)
+        connectorsList.goTo(CLUSTER_NAME)
                 .waitUntilScreenReady();
-        Assertions.assertTrue(pages.connectorsList.isConnectorVisible(connectorForCreate.getName()),"isConnectorVisible()");
+        Assertions.assertTrue(connectorsList.isConnectorVisible(connectorForCreate.getName()),"isConnectorVisible()");
         CONNECTOR_LIST.add(connectorForCreate);
     }
 
@@ -77,15 +77,14 @@ public void createConnector() {
     @CaseId(196)
     @Test
     public void updateConnector() {
-        pages.openConnectorsList(CLUSTER_NAME)
+        connectorsList.goTo(CLUSTER_NAME)
                 .waitUntilScreenReady()
                 .openConnector(CONNECTOR_FOR_UPDATE.getName());
-        pages.connectorsView
-                .waitUntilScreenReady()
+        connectorsView.waitUntilScreenReady()
                 .openConfigTab()
                 .setConfig(CONNECTOR_FOR_UPDATE.getConfig());
-        pages.openConnectorsList(CLUSTER_NAME);
-        Assertions.assertTrue(pages.connectorsList.isConnectorVisible(CONNECTOR_FOR_UPDATE.getName()),"isConnectorVisible()");
+        connectorsList.goTo(CLUSTER_NAME);
+        Assertions.assertTrue(connectorsList.isConnectorVisible(CONNECTOR_FOR_UPDATE.getName()),"isConnectorVisible()");
     }
 
     @DisplayName("should delete connector")
@@ -94,19 +93,19 @@ public void updateConnector() {
     @CaseId(195)
     @Test
     public void deleteConnector() {
-        pages.openConnectorsList(CLUSTER_NAME)
+        connectorsList.goTo(CLUSTER_NAME)
                 .waitUntilScreenReady()
                 .openConnector(CONNECTOR_FOR_DELETE.getName());
-        pages.connectorsView.clickDeleteButton();
-        pages.openConnectorsList(CLUSTER_NAME);
-        Assertions.assertFalse(pages.connectorsList.isConnectorVisible(CONNECTOR_FOR_DELETE.getName()),"isConnectorVisible()");
+        connectorsView.clickDeleteButton();
+        connectorsList.goTo(CLUSTER_NAME);
+        Assertions.assertFalse(connectorsList.isConnectorVisible(CONNECTOR_FOR_DELETE.getName()),"isConnectorVisible()");
         CONNECTOR_LIST.remove(CONNECTOR_FOR_DELETE);
     }
 
     @AfterAll
-    public static void afterAll() {
+    public void afterAll() {
         CONNECTOR_LIST.forEach(connector ->
-                Helpers.INSTANCE.apiHelper.deleteConnector(CLUSTER_NAME, CONNECT_NAME, connector.getName()));
-        TOPIC_LIST.forEach(topic -> Helpers.INSTANCE.apiHelper.deleteTopic(CLUSTER_NAME, topic.getName()));
+                apiHelper.deleteConnector(CLUSTER_NAME, CONNECT_NAME, connector.getName()));
+        TOPIC_LIST.forEach(topic -> apiHelper.deleteTopic(CLUSTER_NAME, topic.getName()));
     }
 }
diff --git a/kafka-ui-e2e-checks/src/test/java/com/provectus/kafka/ui/tests/SchemasTests.java b/kafka-ui-e2e-checks/src/test/java/com/provectus/kafka/ui/tests/SchemasTests.java
index 02588bcc100..563cc343cac 100644
--- a/kafka-ui-e2e-checks/src/test/java/com/provectus/kafka/ui/tests/SchemasTests.java
+++ b/kafka-ui-e2e-checks/src/test/java/com/provectus/kafka/ui/tests/SchemasTests.java
@@ -2,14 +2,12 @@
 
 import com.provectus.kafka.ui.api.model.CompatibilityLevel;
 import com.provectus.kafka.ui.base.BaseTest;
-import com.provectus.kafka.ui.helpers.Helpers;
 import com.provectus.kafka.ui.models.Schema;
 import com.provectus.kafka.ui.pages.MainPage;
-import com.provectus.kafka.ui.pages.schema.SchemaEditView;
 import com.provectus.kafka.ui.pages.schema.SchemaView;
-import com.provectus.kafka.ui.utilities.qaseIoUtils.enums.Status;
 import com.provectus.kafka.ui.utilities.qaseIoUtils.annotations.AutomationStatus;
 import com.provectus.kafka.ui.utilities.qaseIoUtils.annotations.Suite;
+import com.provectus.kafka.ui.utilities.qaseIoUtils.enums.Status;
 import io.qase.api.annotation.CaseId;
 import lombok.SneakyThrows;
 import org.junit.jupiter.api.*;
@@ -19,7 +17,7 @@
 
 import static com.provectus.kafka.ui.utilities.FileUtils.fileToString;
 
-
+@TestInstance(TestInstance.Lifecycle.PER_CLASS)
 @TestMethodOrder(MethodOrderer.OrderAnnotation.class)
 public class SchemasTests extends BaseTest {
     private static final long SUITE_ID = 11;
@@ -31,9 +29,9 @@ public class SchemasTests extends BaseTest {
 
     @BeforeAll
     @SneakyThrows
-    public static void beforeAll() {
+    public void beforeAll() {
         SCHEMA_LIST.addAll(List.of(AVRO_API, JSON_API, PROTOBUF_API));
-        SCHEMA_LIST.forEach(schema -> Helpers.INSTANCE.apiHelper.createSchema(CLUSTER_NAME, schema));
+        SCHEMA_LIST.forEach(schema -> apiHelper.createSchema(CLUSTER_NAME, schema));
     }
 
     @DisplayName("should create AVRO schema")
@@ -44,17 +42,17 @@ public static void beforeAll() {
     @Order(1)
     void createSchemaAvro() {
         Schema schemaAvro = Schema.createSchemaAvro();
-        pages.openMainPage()
+        mainPage.goTo()
                 .goToSideMenu(CLUSTER_NAME, MainPage.SideMenuOptions.SCHEMA_REGISTRY);
-        pages.schemaRegistry.clickCreateSchema()
+        schemaRegistryList.clickCreateSchema()
                 .setSubjectName(schemaAvro.getName())
                 .setSchemaField(fileToString(schemaAvro.getValuePath()))
                 .selectSchemaTypeFromDropdown(schemaAvro.getType())
                 .clickSubmit()
                 .waitUntilScreenReady();
-        pages.mainPage
+        mainPage.goTo()
                 .goToSideMenu(CLUSTER_NAME, MainPage.SideMenuOptions.SCHEMA_REGISTRY);
-        Assertions.assertTrue(pages.schemaRegistry.isSchemaVisible(schemaAvro.getName()),"isSchemaVisible()");
+        Assertions.assertTrue(schemaRegistryList.isSchemaVisible(schemaAvro.getName()),"isSchemaVisible()");
         SCHEMA_LIST.add(schemaAvro);
     }
 
@@ -66,13 +64,13 @@ void createSchemaAvro() {
     @Order(2)
     void updateSchemaAvro() {
         AVRO_API.setValuePath(System.getProperty("user.dir") + "/src/main/resources/testData/schema_avro_for_update.json");
-        pages.openMainPage()
+        mainPage.goTo()
                 .goToSideMenu(CLUSTER_NAME, MainPage.SideMenuOptions.SCHEMA_REGISTRY);
-        pages.schemaRegistry.openSchema(AVRO_API.getName())
+        schemaRegistryList.openSchema(AVRO_API.getName())
                 .waitUntilScreenReady()
                 .openEditSchema();
-        Assertions.assertTrue(new SchemaEditView().isSchemaDropDownDisabled(),"isSchemaDropDownDisabled()");
-        new SchemaEditView().selectCompatibilityLevelFromDropdown(CompatibilityLevel.CompatibilityEnum.NONE)
+        Assertions.assertTrue(schemaEditView.isSchemaDropDownDisabled(),"isSchemaDropDownDisabled()");
+        schemaEditView.selectCompatibilityLevelFromDropdown(CompatibilityLevel.CompatibilityEnum.NONE)
                 .setNewSchemaValue(fileToString(AVRO_API.getValuePath()))
                 .clickSubmit()
                 .waitUntilScreenReady();
@@ -86,12 +84,12 @@ void updateSchemaAvro() {
     @Test
     @Order(3)
     void deleteSchemaAvro() {
-        pages.openMainPage()
+        mainPage.goTo()
                 .goToSideMenu(CLUSTER_NAME, MainPage.SideMenuOptions.SCHEMA_REGISTRY);
-        pages.schemaRegistry.openSchema(AVRO_API.getName())
+        schemaRegistryList.openSchema(AVRO_API.getName())
                 .waitUntilScreenReady()
                 .removeSchema();
-        Assertions.assertFalse(pages.schemaRegistry.isSchemaVisible(AVRO_API.getName()),"isSchemaVisible()");
+        Assertions.assertFalse(schemaRegistryList.isSchemaVisible(AVRO_API.getName()),"isSchemaVisible()");
         SCHEMA_LIST.remove(AVRO_API);
     }
 
@@ -103,17 +101,16 @@ void deleteSchemaAvro() {
     @Order(4)
     void createSchemaJson() {
         Schema schemaJson = Schema.createSchemaJson();
-        pages.openMainPage()
+        mainPage.goTo()
                 .goToSideMenu(CLUSTER_NAME, MainPage.SideMenuOptions.SCHEMA_REGISTRY);
-        pages.schemaRegistry.clickCreateSchema()
+        schemaRegistryList.clickCreateSchema()
                 .setSubjectName(schemaJson.getName())
                 .setSchemaField(fileToString(schemaJson.getValuePath()))
                 .selectSchemaTypeFromDropdown(schemaJson.getType())
                 .clickSubmit()
                 .waitUntilScreenReady();
-        pages.mainPage
-                .goToSideMenu(CLUSTER_NAME, MainPage.SideMenuOptions.SCHEMA_REGISTRY);
-        Assertions.assertTrue(pages.schemaRegistry.isSchemaVisible(schemaJson.getName()),"isSchemaVisible()");
+        mainPage.goToSideMenu(CLUSTER_NAME, MainPage.SideMenuOptions.SCHEMA_REGISTRY);
+        Assertions.assertTrue(schemaRegistryList.isSchemaVisible(schemaJson.getName()),"isSchemaVisible()");
         SCHEMA_LIST.add(schemaJson);
     }
 
@@ -124,12 +121,12 @@ void createSchemaJson() {
     @Test
     @Order(5)
     void deleteSchemaJson() {
-        pages.openMainPage()
+        mainPage.goTo()
                 .goToSideMenu(CLUSTER_NAME, MainPage.SideMenuOptions.SCHEMA_REGISTRY);
-        pages.schemaRegistry.openSchema(JSON_API.getName())
+        schemaRegistryList.openSchema(JSON_API.getName())
                 .waitUntilScreenReady()
                 .removeSchema();
-        Assertions.assertFalse(pages.schemaRegistry.isSchemaVisible(JSON_API.getName()),"isSchemaVisible()");
+        Assertions.assertFalse(schemaRegistryList.isSchemaVisible(JSON_API.getName()),"isSchemaVisible()");
         SCHEMA_LIST.remove(JSON_API);
     }
 
@@ -141,17 +138,16 @@ void deleteSchemaJson() {
     @Order(6)
     void createSchemaProtobuf() {
         Schema schemaProtobuf = Schema.createSchemaProtobuf();
-        pages.openMainPage()
+        mainPage.goTo()
                 .goToSideMenu(CLUSTER_NAME, MainPage.SideMenuOptions.SCHEMA_REGISTRY);
-        pages.schemaRegistry.clickCreateSchema()
+        schemaRegistryList.clickCreateSchema()
                 .setSubjectName(schemaProtobuf.getName())
                 .setSchemaField(fileToString(schemaProtobuf.getValuePath()))
                 .selectSchemaTypeFromDropdown(schemaProtobuf.getType())
                 .clickSubmit()
                 .waitUntilScreenReady();
-        pages.mainPage
-                .goToSideMenu(CLUSTER_NAME, MainPage.SideMenuOptions.SCHEMA_REGISTRY);
-        Assertions.assertTrue(pages.schemaRegistry.isSchemaVisible(schemaProtobuf.getName()),"isSchemaVisible()");
+        mainPage.goToSideMenu(CLUSTER_NAME, MainPage.SideMenuOptions.SCHEMA_REGISTRY);
+        Assertions.assertTrue(schemaRegistryList.isSchemaVisible(schemaProtobuf.getName()),"isSchemaVisible()");
         SCHEMA_LIST.add(schemaProtobuf);
     }
 
@@ -162,17 +158,17 @@ void createSchemaProtobuf() {
     @Test
     @Order(7)
     void deleteSchemaProtobuf() {
-        pages.openMainPage()
+        mainPage.goTo()
                 .goToSideMenu(CLUSTER_NAME, MainPage.SideMenuOptions.SCHEMA_REGISTRY);
-        pages.schemaRegistry.openSchema(PROTOBUF_API.getName())
+        schemaRegistryList.openSchema(PROTOBUF_API.getName())
                 .waitUntilScreenReady()
                 .removeSchema();
-        Assertions.assertFalse(pages.schemaRegistry.isSchemaVisible(PROTOBUF_API.getName()),"isSchemaVisible()");
+        Assertions.assertFalse(schemaRegistryList.isSchemaVisible(PROTOBUF_API.getName()),"isSchemaVisible()");
         SCHEMA_LIST.remove(PROTOBUF_API);
     }
 
     @AfterAll
-    public static void afterAll() {
-        SCHEMA_LIST.forEach(schema -> Helpers.INSTANCE.apiHelper.deleteSchema(CLUSTER_NAME, schema.getName()));
+    public void afterAll() {
+        SCHEMA_LIST.forEach(schema -> apiHelper.deleteSchema(CLUSTER_NAME, schema.getName()));
     }
 }
diff --git a/kafka-ui-e2e-checks/src/test/java/com/provectus/kafka/ui/tests/TopicTests.java b/kafka-ui-e2e-checks/src/test/java/com/provectus/kafka/ui/tests/TopicTests.java
index 5c6b0b86c18..bc4f6d4b658 100644
--- a/kafka-ui-e2e-checks/src/test/java/com/provectus/kafka/ui/tests/TopicTests.java
+++ b/kafka-ui-e2e-checks/src/test/java/com/provectus/kafka/ui/tests/TopicTests.java
@@ -1,14 +1,12 @@
 package com.provectus.kafka.ui.tests;
 
 import com.provectus.kafka.ui.base.BaseTest;
-import com.provectus.kafka.ui.helpers.Helpers;
 import com.provectus.kafka.ui.models.Topic;
 import com.provectus.kafka.ui.pages.MainPage;
-import com.provectus.kafka.ui.pages.topic.TopicCreateEditSettingsView;
 import com.provectus.kafka.ui.pages.topic.TopicView;
-import com.provectus.kafka.ui.utilities.qaseIoUtils.enums.Status;
 import com.provectus.kafka.ui.utilities.qaseIoUtils.annotations.AutomationStatus;
 import com.provectus.kafka.ui.utilities.qaseIoUtils.annotations.Suite;
+import com.provectus.kafka.ui.utilities.qaseIoUtils.enums.Status;
 import io.qase.api.annotation.CaseId;
 import org.assertj.core.api.SoftAssertions;
 import org.junit.jupiter.api.*;
@@ -18,6 +16,7 @@
 
 import static com.provectus.kafka.ui.utilities.FileUtils.fileToString;
 
+@TestInstance(TestInstance.Lifecycle.PER_CLASS)
 public class TopicTests extends BaseTest {
     private static final long SUITE_ID = 2;
     private static final String SUITE_TITLE = "Topics";
@@ -33,9 +32,9 @@ public class TopicTests extends BaseTest {
     private static final List<Topic> TOPIC_LIST = new ArrayList<>();
 
     @BeforeAll
-    public static void beforeAll() {
+    public void beforeAll() {
         TOPIC_LIST.addAll(List.of(TOPIC_FOR_UPDATE, TOPIC_FOR_DELETE));
-        TOPIC_LIST.forEach(topic -> Helpers.INSTANCE.apiHelper.createTopic(CLUSTER_NAME, topic.getName()));
+        TOPIC_LIST.forEach(topic -> apiHelper.createTopic(CLUSTER_NAME, topic.getName()));
     }
 
     @DisplayName("should create a topic")
@@ -45,15 +44,15 @@ public static void beforeAll() {
     @Test
     public void createTopic() {
         Topic topicToCreate = new Topic().setName("new-topic");
-        pages.open()
+        mainPage.goTo()
                 .goToSideMenu(CLUSTER_NAME, MainPage.SideMenuOptions.TOPICS);
-        pages.topicsList.pressCreateNewTopic()
+        topicsList.pressCreateNewTopic()
                 .setTopicName(topicToCreate.getName())
                 .sendData()
                 .waitUntilScreenReady();
-        pages.open()
+        mainPage.goTo()
                 .goToSideMenu(CLUSTER_NAME, MainPage.SideMenuOptions.TOPICS);
-        Assertions.assertTrue(pages.topicsList.isTopicVisible(topicToCreate.getName()),"isTopicVisible");
+        Assertions.assertTrue(topicsList.isTopicVisible(topicToCreate.getName()),"isTopicVisible");
         TOPIC_LIST.add(topicToCreate);
     }
 
@@ -64,9 +63,9 @@ public void createTopic() {
     @CaseId(197)
     @Test
     public void updateTopic() {
-        pages.openTopicsList(CLUSTER_NAME)
+        topicsList.goTo(CLUSTER_NAME)
                 .waitUntilScreenReady();
-        pages.topicsList.openTopic(TOPIC_FOR_UPDATE.getName())
+        topicsList.openTopic(TOPIC_FOR_UPDATE.getName())
                 .waitUntilScreenReady()
                 .openEditSettings()
                 .selectCleanupPolicy(TOPIC_FOR_UPDATE.getCompactPolicyValue())
@@ -76,16 +75,16 @@ public void updateTopic() {
                 .setMaxMessageBytes(TOPIC_FOR_UPDATE.getMaxMessageBytes())
                 .sendData()
                 .waitUntilScreenReady();
-        pages.openTopicsList(CLUSTER_NAME)
+        topicsList.goTo(CLUSTER_NAME)
                 .waitUntilScreenReady();
-        pages.topicsList.openTopic(TOPIC_FOR_UPDATE.getName())
+        topicsList.openTopic(TOPIC_FOR_UPDATE.getName())
                 .waitUntilScreenReady()
                 .openEditSettings();
         SoftAssertions softly = new SoftAssertions();
-        softly.assertThat(new TopicCreateEditSettingsView().getCleanupPolicy()).as("Cleanup Policy").isEqualTo(TOPIC_FOR_UPDATE.getCompactPolicyValue());
-        softly.assertThat(new TopicCreateEditSettingsView().getTimeToRetain()).as("Time to retain").isEqualTo(TOPIC_FOR_UPDATE.getTimeToRetainData());
-        softly.assertThat(new TopicCreateEditSettingsView().getMaxSizeOnDisk()).as("Max size on disk").isEqualTo(TOPIC_FOR_UPDATE.getMaxSizeOnDisk());
-        softly.assertThat(new TopicCreateEditSettingsView().getMaxMessageBytes()).as("Max message bytes").isEqualTo(TOPIC_FOR_UPDATE.getMaxMessageBytes());
+        softly.assertThat(topicCreateEditSettingsView.getCleanupPolicy()).as("Cleanup Policy").isEqualTo(TOPIC_FOR_UPDATE.getCompactPolicyValue());
+        softly.assertThat(topicCreateEditSettingsView.getTimeToRetain()).as("Time to retain").isEqualTo(TOPIC_FOR_UPDATE.getTimeToRetainData());
+        softly.assertThat(topicCreateEditSettingsView.getMaxSizeOnDisk()).as("Max size on disk").isEqualTo(TOPIC_FOR_UPDATE.getMaxSizeOnDisk());
+        softly.assertThat(topicCreateEditSettingsView.getMaxMessageBytes()).as("Max message bytes").isEqualTo(TOPIC_FOR_UPDATE.getMaxMessageBytes());
         softly.assertAll();
     }
 
@@ -95,14 +94,14 @@ public void updateTopic() {
     @CaseId(207)
     @Test
     public void deleteTopic() {
-        pages.openTopicsList(CLUSTER_NAME)
+        topicsList.goTo(CLUSTER_NAME)
                 .waitUntilScreenReady()
                 .openTopic(TOPIC_FOR_DELETE.getName())
                 .waitUntilScreenReady()
                 .deleteTopic();
-        pages.openTopicsList(CLUSTER_NAME)
+        topicsList.goTo(CLUSTER_NAME)
                 .waitUntilScreenReady();
-        Assertions.assertFalse(pages.topicsList.isTopicVisible(TOPIC_FOR_DELETE.getName()),"isTopicVisible");
+        Assertions.assertFalse(topicsList.isTopicVisible(TOPIC_FOR_DELETE.getName()),"isTopicVisible");
         TOPIC_LIST.remove(TOPIC_FOR_DELETE);
     }
 
@@ -112,7 +111,7 @@ public void deleteTopic() {
     @CaseId(222)
     @Test
     void produceMessage() {
-        pages.openTopicsList(CLUSTER_NAME)
+        topicsList.goTo(CLUSTER_NAME)
                 .waitUntilScreenReady()
                 .openTopic(TOPIC_FOR_UPDATE.getName())
                 .waitUntilScreenReady()
@@ -122,13 +121,13 @@ void produceMessage() {
                 .setKeyField(TOPIC_FOR_UPDATE.getMessageKey())
                 .submitProduceMessage();
         SoftAssertions softly = new SoftAssertions();
-        softly.assertThat(pages.topicView.isKeyMessageVisible((TOPIC_FOR_UPDATE.getMessageKey()))).withFailMessage("isKeyMessageVisible()").isTrue();
-        softly.assertThat(pages.topicView.isContentMessageVisible((TOPIC_FOR_UPDATE.getMessageContent()).trim())).withFailMessage("isContentMessageVisible()").isTrue();
+        softly.assertThat(topicView.isKeyMessageVisible((TOPIC_FOR_UPDATE.getMessageKey()))).withFailMessage("isKeyMessageVisible()").isTrue();
+        softly.assertThat(topicView.isContentMessageVisible((TOPIC_FOR_UPDATE.getMessageContent()).trim())).withFailMessage("isContentMessageVisible()").isTrue();
         softly.assertAll();
     }
 
     @AfterAll
-    public static void afterAll() {
-        TOPIC_LIST.forEach(topic -> Helpers.INSTANCE.apiHelper.deleteTopic(CLUSTER_NAME, topic.getName()));
+    public void afterAll() {
+        TOPIC_LIST.forEach(topic -> apiHelper.deleteTopic(CLUSTER_NAME, topic.getName()));
     }
 }