Przeglądaj źródła

Fix e2e tests (#1543)

* Fix tests. Change folders structure

* Activate tests

* Update selenoid.yaml, broesers.json. Add pull of selenoid browser image.

* Change method of pulling chrome image

* Fix browsers.json and return the pulling of browser image

* Update pom.

* Update pom

* Fix pom

* Fix java version in pom

* Migrate to selenium containers

* Return selenoid container. Fix using of BASE_URL

* Delete video recording for Selenoid container

* expose kafka-ui port

Signed-off-by: Roman Zabaluev <rzabaluev@provectus.com>

* Fix tests run

* Delete comment from workflow file

* Stop using containers and migrate to WDM.

* Delete comments. Update dependencies.

* Comment using of  TestConfiguration.BASE_URL.replace("localhost", "host.docker.internal");

* Retern changes

* Clean code

* Update e2e-checks.yaml

* Update e2e-checks.yaml

* Fix skip test parameter in tests project

* Delete host.docker.internal in base tests

* Return previous usage of testcontainers

* Delete base url configuration

* Revert versions in pom.xml

* Return some values

* Small fixes for stabilize tests

* Trying to fix tests running on github

* Update base test

* Fix selenide url

Signed-off-by: Roman Zabaluev <rzabaluev@provectus.com>

* Fix selenide url

Signed-off-by: Roman Zabaluev <rzabaluev@provectus.com>

* test stuff

Signed-off-by: Roman Zabaluev <rzabaluev@provectus.com>

* added extra-hosts host.docker.internal:host-gateway

* added extra-hosts host.docker.internal:host-gateway

* added extra-hosts host.docker.internal:host-gateway

* added command --add-host

* separate driver container

* small refactoring, change selenoid to BrowserWebDriverContainer

* changed in BaseTest port from 8678 to 8080

* changed tests with xpath and added additional actions (click javascrip, click with action)

* added issue to allure reporting

* provided fix for connectors tests

* deleted afterAll annotation

* fixed tests with ConnectorsTests

* fixed tests with Topics

* removed commented action with click

* Revert unnecessary changes

* Fix workflow

* added @Disabled for test- update topic dui to issue https://github.com/provectus/kafka-ui/issues/1500

* removed dependency, testconteiners version

Co-authored-by: Roman Zabaluev <rzabaluev@provectus.com>
Co-authored-by: kshpilchyna <kshpilchyna@provectus.com>
sbritprovectus 3 lat temu
rodzic
commit
e5f2df86dd
33 zmienionych plików z 882 dodań i 551 usunięć
  1. 3 3
      .github/workflows/e2e-checks.yaml
  2. 1 1
      documentation/compose/kafka-ui-connectors.yaml
  3. 6 1
      kafka-ui-e2e-checks/README.md
  4. 8 2
      kafka-ui-e2e-checks/docker/selenoid.yaml
  5. 19 6
      kafka-ui-e2e-checks/pom.xml
  6. BIN
      kafka-ui-e2e-checks/screenshots/main.png
  7. 5 5
      kafka-ui-e2e-checks/selenoid/config/browsers.json
  8. 17 16
      kafka-ui-e2e-checks/src/main/resources/config_for_create_connector.json
  9. 5 16
      kafka-ui-e2e-checks/src/main/resources/config_for_create_connector_via_api.json
  10. 17 16
      kafka-ui-e2e-checks/src/main/resources/config_for_update_connector.json
  11. 1 1
      kafka-ui-e2e-checks/src/main/resources/delete_connector_config.json
  12. 0 5
      kafka-ui-e2e-checks/src/test/java/com/provectus/kafka/ui/SmokeTests.java
  13. 80 80
      kafka-ui-e2e-checks/src/test/java/com/provectus/kafka/ui/base/BaseTest.java
  14. 2 9
      kafka-ui-e2e-checks/src/test/java/com/provectus/kafka/ui/base/TestConfiguration.java
  15. 46 17
      kafka-ui-e2e-checks/src/test/java/com/provectus/kafka/ui/helpers/ApiHelper.java
  16. 0 36
      kafka-ui-e2e-checks/src/test/java/com/provectus/kafka/ui/pages/ConnectorCreateView.java
  17. 0 25
      kafka-ui-e2e-checks/src/test/java/com/provectus/kafka/ui/pages/ConnectorUpdateView.java
  18. 0 41
      kafka-ui-e2e-checks/src/test/java/com/provectus/kafka/ui/pages/ConnectorsView.java
  19. 53 38
      kafka-ui-e2e-checks/src/test/java/com/provectus/kafka/ui/pages/MainPage.java
  20. 5 0
      kafka-ui-e2e-checks/src/test/java/com/provectus/kafka/ui/pages/Pages.java
  21. 0 111
      kafka-ui-e2e-checks/src/test/java/com/provectus/kafka/ui/pages/TopicView.java
  22. 0 47
      kafka-ui-e2e-checks/src/test/java/com/provectus/kafka/ui/pages/TopicsList.java
  23. 42 0
      kafka-ui-e2e-checks/src/test/java/com/provectus/kafka/ui/pages/connector/ConnectorCreateView.java
  24. 47 0
      kafka-ui-e2e-checks/src/test/java/com/provectus/kafka/ui/pages/connector/ConnectorUpdateView.java
  25. 16 16
      kafka-ui-e2e-checks/src/test/java/com/provectus/kafka/ui/pages/connector/ConnectorsList.java
  26. 43 0
      kafka-ui-e2e-checks/src/test/java/com/provectus/kafka/ui/pages/connector/ConnectorsView.java
  27. 224 0
      kafka-ui-e2e-checks/src/test/java/com/provectus/kafka/ui/pages/topic/TopicCreateEditSettingsView.java
  28. 72 0
      kafka-ui-e2e-checks/src/test/java/com/provectus/kafka/ui/pages/topic/TopicView.java
  29. 64 0
      kafka-ui-e2e-checks/src/test/java/com/provectus/kafka/ui/pages/topic/TopicsList.java
  30. 45 28
      kafka-ui-e2e-checks/src/test/java/com/provectus/kafka/ui/tests/ConnectorsTests.java
  31. 37 30
      kafka-ui-e2e-checks/src/test/java/com/provectus/kafka/ui/tests/TopicTests.java
  32. 23 0
      kafka-ui-e2e-checks/src/test/java/com/provectus/kafka/ui/utils/BrowserUtils.java
  33. 1 1
      pom.xml

+ 3 - 3
.github/workflows/e2e-checks.yaml

@@ -27,9 +27,9 @@ jobs:
         run: |
           cat "./kafka-ui-e2e-checks/.env.ci" >> "./kafka-ui-e2e-checks/.env"
       - name: pull docker
-        id: pull_selenoid
+        id: pull_chrome
         run: |
-          docker pull selenoid/vnc:chrome_86.0
+          docker pull selenium/standalone-chrome
       - name: Set up JDK 1.13
         uses: actions/setup-java@v1
         with:
@@ -38,7 +38,7 @@ jobs:
         id: build_app
         run: |
           mvn versions:set -DnewVersion=${{ github.event.pull_request.head.sha }}
-          mvn clean package -DskipTests ${{ github.event.inputs.extraMavenOptions }}
+          mvn clean package -Dmaven.test.skip=true ${{ github.event.inputs.extraMavenOptions }}
       - name: compose app
         id: compose_app
         # use the following command until #819 will be fixed

+ 1 - 1
documentation/compose/kafka-ui-connectors.yaml

@@ -1,5 +1,5 @@
 ---
-version: '2'
+version: '3.5'
 services:
 
   kafka-ui:

+ 6 - 1
kafka-ui-e2e-checks/README.md

@@ -55,7 +55,12 @@ docker-compose -f kafka-ui.yaml up -d
 cd kafka-ui-e2e-checks/docker
 docker-compose -f selenoid.yaml up -d
 ```
-3. Run checks 
+3. Compile `kafka-ui-contract` project
+```
+cd <projectRoot>/kafka-ui-contract
+mvn clean compile
+```
+4. Run checks 
 ```
 cd kafka-ui-e2e-checks
 mvn test

+ 8 - 2
kafka-ui-e2e-checks/docker/selenoid.yaml

@@ -3,7 +3,7 @@ version: '3'
 services:
   selenoid:
     network_mode: bridge
-    image: aerokube/selenoid:1.10.3
+    image: aerokube/selenoid:1.10.7
     volumes:
       - "../selenoid/config:/etc/selenoid"
       - "/var/run/docker.sock:/var/run/docker.sock"
@@ -22,4 +22,10 @@ services:
       - selenoid
     ports:
       - "8081:8080"
-    command: [ "--selenoid-uri", "http://selenoid:4444" ]
+    command: [ "--selenoid-uri", "http://localhost:4444" ]
+
+  selenoid-chrome:
+    network_mode: bridge
+    image: selenoid/vnc:chrome_96.0
+    extra_hosts:
+      - "host.docker.internal:host-gateway"

+ 19 - 6
kafka-ui-e2e-checks/pom.xml

@@ -14,18 +14,18 @@
         <kafka-ui-contract>${project.version}</kafka-ui-contract>
         <junit.version>5.8.2</junit.version>
         <aspectj.version>1.9.8</aspectj.version>
-        <allure.version>2.17.1</allure.version>
+        <allure.version>2.17.2</allure.version>
         <json-smart.version>1.3.3</json-smart.version>
-        <testcontainers.version>1.15.2</testcontainers.version>
-        <selenide.version>5.16.2</selenide.version>
+        <testcontainers.version>1.16.3</testcontainers.version>
+        <selenide.version>6.3.0</selenide.version>
         <assertj.version>3.17.1</assertj.version>
         <google.auto-service.version>1.0-rc7</google.auto-service.version>
         <hamcrest.version>2.2</hamcrest.version>
         <slf4j.version>1.7.32</slf4j.version>
-        <testcontainers.junit-jupiter.version>1.15.1</testcontainers.junit-jupiter.version>
-        <allure.java-commons.version>2.13.6</allure.java-commons.version>
+        <testcontainers.junit-jupiter.version>1.16.3</testcontainers.junit-jupiter.version>
+        <allure.java-commons.version>2.17.2</allure.java-commons.version>
         <dotenv.version>2.2.0</dotenv.version>
-        <junit.platform-launcher.version>1.6.2</junit.platform-launcher.version>
+        <junit.platform-launcher.version>1.8.2</junit.platform-launcher.version>
         <allure.maven-plugin.version>2.6</allure.maven-plugin.version>
         <ashot.version>1.5.4</ashot.version>
         <allure.screendiff-plugin.version>2.17.2</allure.screendiff-plugin.version>
@@ -236,6 +236,12 @@
             <version>${kafka-ui-contract}</version>
             <scope>test</scope>
         </dependency>
+        <dependency>
+            <groupId>org.testcontainers</groupId>
+            <artifactId>selenium</artifactId>
+            <version>${testcontainers.version}</version>
+            <scope>test</scope>
+        </dependency>
     </dependencies>
 
     <profiles>
@@ -275,6 +281,13 @@
                         <artifactId>maven-surefire-plugin</artifactId>
                         <version>${maven.surefire-plugin.version}</version>
                         <configuration>
+                            <testFailureIgnore>false</testFailureIgnore>
+                            <systemProperties>
+                                <property>
+                                    <name>junit.jupiter.extensions.autodetection.enabled</name>
+                                    <value>true</value>
+                                </property>
+                            </systemProperties>
                             <argLine>
                                 -javaagent:"${settings.localRepository}/org/aspectj/aspectjweaver/${aspectj.version}/aspectjweaver-${aspectj.version}.jar"
                             </argLine>

BIN
kafka-ui-e2e-checks/screenshots/main.png


+ 5 - 5
kafka-ui-e2e-checks/selenoid/config/browsers.json

@@ -1,11 +1,11 @@
 {
   "chrome": {
-    "default": "86.0",
+    "default": "96.0",
     "versions": {
-      "86.0": {
-        "hosts": ["host.docker.internal:172.17.0.1"],
-        "image": "selenoid/vnc:chrome_86.0",
-        "port": "4444"
+      "96.0": {
+        "image": "selenoid/vnc_chrome:96.0",
+        "port": "4444",
+        "path": "/"
       }
     }
   }

+ 17 - 16
kafka-ui-e2e-checks/src/main/resources/config_for_create_connector.json

@@ -1,17 +1,18 @@
 {
-"connector.class": "io.confluent.connect.jdbc.JdbcSinkConnector",
-"connection.url": "jdbc:postgresql://postgres-db:5432/test",
-"connection.user": "dev_user",
-"connection.password": "12345",
-"topics": "topic_for_connector",
-"table.name.format": "sink_activities_e2e_test_connector_creating",
-"key.converter": "org.apache.kafka.connect.storage.StringConverter",
-"key.converter.schema.registry.url": "http://schemaregistry0:8085",
-"value.converter": "org.apache.kafka.connect.json.JsonConverter",
-"value.converter.schema.registry.url": "http://schemaregistry0:8085",
-"auto.create": "true",
-"pk.mode": "record_value",
-"pk.fields": "id",
-"insert.mode": "upsert",
-"errors.log.enable": "true",
-"errors.log.include.messages": "true"
+  "connector.class": "io.confluent.connect.jdbc.JdbcSinkConnector",
+  "connection.url": "jdbc:postgresql://postgres-db:5432/test",
+  "connection.user": "dev_user",
+  "connection.password": "12345",
+  "topics": "topic_for_connector",
+  "table.name.format": "sink_activities_e2e_test_connector_creating",
+  "key.converter": "org.apache.kafka.connect.storage.StringConverter",
+  "key.converter.schema.registry.url": "http://schemaregistry0:8085",
+  "value.converter": "org.apache.kafka.connect.json.JsonConverter",
+  "value.converter.schema.registry.url": "http://schemaregistry0:8085",
+  "auto.create": "true",
+  "pk.mode": "record_value",
+  "pk.fields": "id",
+  "insert.mode": "upsert",
+  "errors.log.enable": "true",
+  "errors.log.include.messages": "true"
+}

+ 5 - 16
kafka-ui-e2e-checks/src/main/resources/config_for_create_connector_via_api.json

@@ -1,18 +1,7 @@
 {
-"connector.class": "io.confluent.connect.jdbc.JdbcSinkConnector",
-"connection.url": "jdbc:postgresql://postgres-db:5432/test",
-"connection.user": "dev_user",
-"connection.password": "12345",
-"topics": "topic_for_connector",
-"table.name.format": "sink_activities_e2e_test_connector_updating",
-"key.converter": "org.apache.kafka.connect.storage.StringConverter",
-"key.converter.schema.registry.url": "http://schemaregistry0:8085",
-"value.converter": "org.apache.kafka.connect.json.JsonConverter",
-"value.converter.schema.registry.url": "http://schemaregistry0:8085",
-"auto.create": "true",
-"pk.mode": "record_value",
-"pk.fields": "id",
-"insert.mode": "upsert",
-"errors.log.enable": "true",
-"errors.log.include.messages": "true"
+  "connector.class": "io.confluent.connect.jdbc.JdbcSinkConnector",
+  "connection.url": "jdbc:postgresql://postgres-db:5432/test",
+  "connection.user": "dev_user",
+  "connection.password": "12345",
+  "topics": "topic_for_connector"
 }

+ 17 - 16
kafka-ui-e2e-checks/src/main/resources/config_for_update_connector.json

@@ -1,17 +1,18 @@
 {
-"connector.class": "io.confluent.connect.jdbc.JdbcSinkConnector",
-"connection.url": "jdbc:postgresql://postgres-db:5432/test",
-"connection.user": "dev_user",
-"connection.password": "12345",
-"topics": "topic_for_update_connector",
-"table.name.format": "sink_activities_e2e_test_connector_updating",
-"key.converter": "org.apache.kafka.connect.storage.StringConverter",
-"key.converter.schema.registry.url": "http://schemaregistry0:8085",
-"value.converter": "org.apache.kafka.connect.json.JsonConverter",
-"value.converter.schema.registry.url": "http://schemaregistry0:8085",
-"auto.create": "true",
-"pk.mode": "record_value",
-"pk.fields": "id",
-"insert.mode": "upsert",
-"errors.log.enable": "true",
-"errors.log.include.messages": "true"
+  "connector.class": "io.confluent.connect.jdbc.JdbcSinkConnector",
+  "connection.url": "jdbc:postgresql://postgres-db:5432/test",
+  "connection.user": "dev_user",
+  "connection.password": "12345",
+  "topics": "topic_for_update_connector",
+  "table.name.format": "sink_activities_e2e_test_connector_updating",
+  "key.converter": "org.apache.kafka.connect.storage.StringConverter",
+  "key.converter.schema.registry.url": "http://schemaregistry0:8085",
+  "value.converter": "org.apache.kafka.connect.json.JsonConverter",
+  "value.converter.schema.registry.url": "http://schemaregistry0:8085",
+  "auto.create": "true",
+  "pk.mode": "record_value",
+  "pk.fields": "id",
+  "insert.mode": "upsert",
+  "errors.log.enable": "true",
+  "errors.log.include.messages": "true"
+}

+ 1 - 1
kafka-ui-e2e-checks/src/main/resources/delete_connector_config.json

@@ -9,7 +9,7 @@
   "key.converter.schema.registry.url": "http://schemaregistry0:8085",
   "value.converter": "org.apache.kafka.connect.json.JsonConverter",
   "value.converter.schema.registry.url": "http://schemaregistry0:8085",
-  "auto.create": "true",
+  "auto.create": "false",
   "pk.mode": "record_value",
   "pk.fields": "id",
   "insert.mode": "upsert",

+ 0 - 5
kafka-ui-e2e-checks/src/test/java/com/provectus/kafka/ui/SmokeTests.java

@@ -1,19 +1,14 @@
 package com.provectus.kafka.ui;
 
 import com.provectus.kafka.ui.base.BaseTest;
-import io.qameta.allure.Issue;
 import lombok.SneakyThrows;
-import org.junit.Ignore;
-import org.junit.jupiter.api.Disabled;
 import org.junit.jupiter.api.DisplayName;
 import org.junit.jupiter.api.Test;
 
-@Disabled // TODO #1480
 public class SmokeTests extends BaseTest {
     @Test
     @SneakyThrows
     @DisplayName("main page should load")
-    @Issue("380")
     void mainPageLoads() {
         pages.open()
                 .isOnPage();

+ 80 - 80
kafka-ui-e2e-checks/src/test/java/com/provectus/kafka/ui/base/BaseTest.java

@@ -1,118 +1,118 @@
 package com.provectus.kafka.ui.base;
 
 import com.codeborne.selenide.Configuration;
+import com.codeborne.selenide.WebDriverRunner;
 import com.codeborne.selenide.logevents.SelenideLogger;
 import com.provectus.kafka.ui.helpers.Helpers;
 import com.provectus.kafka.ui.pages.Pages;
 import com.provectus.kafka.ui.screenshots.Screenshooter;
 import com.provectus.kafka.ui.steps.Steps;
 import io.github.cdimascio.dotenv.Dotenv;
+import io.qameta.allure.Allure;
 import io.qameta.allure.selenide.AllureSelenide;
 import lombok.SneakyThrows;
 import lombok.extern.slf4j.Slf4j;
 import org.apache.commons.io.FileUtils;
-import org.junit.jupiter.api.AfterAll;
+import org.junit.jupiter.api.AfterEach;
+import org.junit.jupiter.api.BeforeAll;
 import org.junit.jupiter.api.DisplayNameGeneration;
-import org.openqa.selenium.remote.DesiredCapabilities;
-import org.testcontainers.containers.BindMode;
-import org.testcontainers.containers.GenericContainer;
-import org.testcontainers.utility.DockerImageName;
+import org.openqa.selenium.OutputType;
+import org.openqa.selenium.TakesScreenshot;
+import org.openqa.selenium.chrome.ChromeOptions;
+import org.openqa.selenium.remote.RemoteWebDriver;
+import org.testcontainers.Testcontainers;
+import org.testcontainers.containers.BrowserWebDriverContainer;
+import org.testcontainers.containers.wait.strategy.Wait;
 
+import java.io.ByteArrayInputStream;
 import java.io.File;
 import java.io.IOException;
+import java.time.Duration;
 import java.util.Arrays;
 
 @Slf4j
 @DisplayNameGeneration(CamelCaseToSpacedDisplayNameGenerator.class)
 public class BaseTest {
 
-  protected Steps steps = Steps.INSTANCE;
-  protected Pages pages = Pages.INSTANCE;
-  protected Helpers helpers = Helpers.INSTANCE;
+    protected Steps steps = Steps.INSTANCE;
+    protected Pages pages = Pages.INSTANCE;
+    protected Helpers helpers = Helpers.INSTANCE;
 
-  private Screenshooter screenshooter = new Screenshooter();
+    private Screenshooter screenshooter = new Screenshooter();
 
-  public void compareScreenshots(String name) {
-    screenshooter.compareScreenshots(name);
-  }
+    public static BrowserWebDriverContainer<?> webDriverContainer =
+            new BrowserWebDriverContainer<>()
+                    .withCapabilities(new ChromeOptions()
+                            .addArguments("--no-sandbox")
+                            .addArguments("--disable-dev-shm-usage"))
+                    .waitingFor(Wait.defaultWaitStrategy().withStartupTimeout(Duration.ofSeconds(90)));
 
-  public void compareScreenshots(String name, Boolean shouldUpdateScreenshots) {
-    screenshooter.compareScreenshots(name, shouldUpdateScreenshots);
-  }
+    public void compareScreenshots(String name) {
+        screenshooter.compareScreenshots(name);
+    }
 
-  public static GenericContainer selenoid =
-      new GenericContainer(DockerImageName.parse("aerokube/selenoid:latest-release"))
-          .withExposedPorts(4444)
-          .withFileSystemBind("selenoid/config/", "/etc/selenoid", BindMode.READ_WRITE)
-          .withFileSystemBind("/var/run/docker.sock", "/var/run/docker.sock", BindMode.READ_WRITE)
-          .withFileSystemBind("selenoid/video", "/opt/selenoid/video", BindMode.READ_WRITE)
-          .withFileSystemBind("selenoid/logs", "/opt/selenoid/logs", BindMode.READ_WRITE)
-          .withEnv("OVERRIDE_VIDEO_OUTPUT_DIR", "/opt/selenoid/video")
-          .withCommand(
-              "-conf", "/etc/selenoid/browsers.json", "-log-output-dir", "/opt/selenoid/logs");
+    public void compareScreenshots(String name, Boolean shouldUpdateScreenshots) {
+        screenshooter.compareScreenshots(name, shouldUpdateScreenshots);
+    }
 
-  static {
-    if (!new File("./.env").exists()) {
-      try {
-        FileUtils.copyFile(new File(".env.example"), new File(".env"));
-      } catch (IOException e) {
-        log.error("couldn't copy .env.example to .env. Please add .env");
-        e.printStackTrace();
-      }
+    @BeforeAll
+    public static void start() {
+        Testcontainers.exposeHostPorts(8080);
+        webDriverContainer.start();
+        webDriverContainer.isRunning();
+        RemoteWebDriver remoteWebDriver = webDriverContainer.getWebDriver();
+        WebDriverRunner.setWebDriver(remoteWebDriver);
     }
-    Dotenv.load().entries().forEach(env -> System.setProperty(env.getKey(), env.getValue()));
-    if (TestConfiguration.CLEAR_REPORTS_DIR) {
-      clearReports();
+
+    static {
+        if (!new File("./.env").exists()) {
+            try {
+                FileUtils.copyFile(new File(".env.example"), new File(".env"));
+            } catch (IOException e) {
+                log.error("couldn't copy .env.example to .env. Please add .env");
+                e.printStackTrace();
+            }
+        }
+        Dotenv.load().entries().forEach(env -> System.setProperty(env.getKey(), env.getValue()));
+        if (TestConfiguration.CLEAR_REPORTS_DIR) {
+            clearReports();
+        }
+        setup();
     }
-    setupSelenoid();
-  }
 
-  @AfterAll
-  public static void afterAll() {
-//    closeWebDriver();
-//    selenoid.close();
-  }
 
-  @SneakyThrows
-  private static void setupSelenoid() {
-    String remote = TestConfiguration.SELENOID_URL;
-    if (TestConfiguration.SHOULD_START_SELENOID) {
-      selenoid.start();
-      remote =
-          "http://%s:%s/wd/hub"
-              .formatted(selenoid.getContainerIpAddress(), selenoid.getMappedPort(4444));
+    @AfterEach
+    public void afterMethod() {
+        webDriverContainer.getWebDriver().manage().deleteAllCookies();
+        Allure.addAttachment("Screenshot",
+                new ByteArrayInputStream(((TakesScreenshot) webDriverContainer.getWebDriver()).getScreenshotAs(OutputType.BYTES)));
     }
 
-    Configuration.reportsFolder = TestConfiguration.REPORTS_FOLDER;
-    if (!TestConfiguration.USE_LOCAL_BROWSER) {
-      Configuration.remote = remote;
-      TestConfiguration.BASE_URL =
-          TestConfiguration.BASE_URL.replace("localhost", "host.docker.internal");
-    }
-    Configuration.screenshots = TestConfiguration.SCREENSHOTS;
-    Configuration.savePageSource = TestConfiguration.SAVE_PAGE_SOURCE;
-    Configuration.reopenBrowserOnFail = TestConfiguration.REOPEN_BROWSER_ON_FAIL;
-    Configuration.browser = TestConfiguration.BROWSER;
-    Configuration.baseUrl = TestConfiguration.BASE_URL;
-    Configuration.browserSize = TestConfiguration.BROWSER_SIZE;
-    var capabilities = new DesiredCapabilities();
-//    DesiredCapabilities capabilities = DesiredCapabilities.chrome();
-    capabilities.setCapability("enableVNC", TestConfiguration.ENABLE_VNC);
-    Configuration.browserCapabilities = capabilities;
+    @SneakyThrows
+    private static void setup() {
 
-    SelenideLogger.addListener("allure", new AllureSelenide().savePageSource(false));
-  }
+        Configuration.reportsFolder = TestConfiguration.REPORTS_FOLDER;
+        Configuration.screenshots = TestConfiguration.SCREENSHOTS;
+        Configuration.savePageSource = TestConfiguration.SAVE_PAGE_SOURCE;
+        Configuration.reopenBrowserOnFail = TestConfiguration.REOPEN_BROWSER_ON_FAIL;
+        Configuration.browser = TestConfiguration.BROWSER;
+        Configuration.baseUrl = TestConfiguration.BASE_WEB_URL;
+        Configuration.timeout = 10000;
+        Configuration.browserSize = TestConfiguration.BROWSER_SIZE;
+        SelenideLogger.addListener("allure", new AllureSelenide().savePageSource(false));
+    }
 
-  public static void clearReports() {
-    log.info("Clearing reports dir [%s]...".formatted(TestConfiguration.REPORTS_FOLDER));
-    File allureResults = new File(TestConfiguration.REPORTS_FOLDER);
-    if (allureResults.isDirectory()) {
-      File[] list = allureResults.listFiles();
-      if (list != null)
-        Arrays.stream(list)
-            .sequential()
-            .filter(e -> !e.getName().equals("categories.json"))
-            .forEach(File::delete);
+    public static void clearReports() {
+        log.info("Clearing reports dir [%s]...".formatted(TestConfiguration.REPORTS_FOLDER));
+        File allureResults = new File(TestConfiguration.REPORTS_FOLDER);
+        if (allureResults.isDirectory()) {
+            File[] list = allureResults.listFiles();
+            if (list != null) {
+                Arrays.stream(list)
+                        .sequential()
+                        .filter(e -> !e.getName().equals("categories.json"))
+                        .forEach(File::delete);
+            }
+        }
     }
-  }
 }

+ 2 - 9
kafka-ui-e2e-checks/src/test/java/com/provectus/kafka/ui/base/TestConfiguration.java

@@ -3,17 +3,10 @@ package com.provectus.kafka.ui.base;
 public class TestConfiguration {
   public static boolean CLEAR_REPORTS_DIR =
       Boolean.parseBoolean(System.getProperty("CLEAR_REPORTS_DIR", "true"));
-
-  public static boolean SHOULD_START_SELENOID =
-      Boolean.parseBoolean(System.getProperty("SHOULD_START_SELENOID", "false"));
-
-  public static String BASE_URL = System.getProperty("BASE_URL", "http://localhost:8080/");
-
+  public static String BASE_API_URL = System.getProperty("BASE_URL", "http://localhost:8080");
+  public static String BASE_WEB_URL = System.getProperty("BASE_DOCKER_URL", "http://host.testcontainers.internal:8080");
   public static boolean USE_LOCAL_BROWSER =
       Boolean.parseBoolean(System.getProperty("USE_LOCAL_BROWSER", "true"));
-
-  public static String SELENOID_URL =
-      System.getProperty("SELENOID_URL", "http://localhost:4444/wd/hub");
   public static String REPORTS_FOLDER = System.getProperty("REPORTS_FOLDER", "allure-results");
   public static Boolean SCREENSHOTS =
       Boolean.parseBoolean(System.getProperty("SCREENSHOTS", "false"));

+ 46 - 17
kafka-ui-e2e-checks/src/test/java/com/provectus/kafka/ui/helpers/ApiHelper.java

@@ -1,54 +1,71 @@
 package com.provectus.kafka.ui.helpers;
 
-import com.provectus.kafka.ui.api.api.KafkaConnectApi;
-import com.provectus.kafka.ui.api.api.MessagesApi;
 import com.fasterxml.jackson.databind.ObjectMapper;
+import com.google.gson.Gson;
 import com.provectus.kafka.ui.api.ApiClient;
+import com.provectus.kafka.ui.api.api.KafkaConnectApi;
+import com.provectus.kafka.ui.api.api.MessagesApi;
 import com.provectus.kafka.ui.api.api.TopicsApi;
 import com.provectus.kafka.ui.api.model.CreateTopicMessage;
+import com.provectus.kafka.ui.api.model.ErrorResponse;
 import com.provectus.kafka.ui.api.model.NewConnector;
 import com.provectus.kafka.ui.api.model.TopicCreation;
+import com.provectus.kafka.ui.base.TestConfiguration;
 import lombok.SneakyThrows;
+import lombok.extern.slf4j.Slf4j;
 import org.springframework.web.reactive.function.client.WebClientResponseException;
 
 import java.util.HashMap;
 import java.util.Map;
 
+import static com.codeborne.selenide.Selenide.sleep;
+
+
+@Slf4j
 public class ApiHelper {
+
     int partitions = 1;
     int replicationFactor = 1;
     String newTopic = "new-topic";
-    String baseURL = "http://localhost:8080/";
+    String baseURL = TestConfiguration.BASE_API_URL;
+
 
     @SneakyThrows
     private TopicsApi topicApi() {
-        ApiClient defaultClient = new ApiClient();
-        defaultClient.setBasePath(baseURL);
-        TopicsApi topicsApi = new TopicsApi(defaultClient);
-        return topicsApi;
+        return new TopicsApi(new ApiClient().setBasePath(baseURL));
     }
 
-    @SneakyThrows
+
     public void createTopic(String clusterName, String topicName) {
         TopicCreation topic = new TopicCreation();
         topic.setName(topicName);
         topic.setPartitions(partitions);
         topic.setReplicationFactor(replicationFactor);
-        topicApi().createTopic(clusterName,topic).block();
+        deleteTopic(clusterName, topicName);
+        sleep(2000);
+        try {
+            topicApi().createTopic(clusterName, topic).block();
+        } catch (WebClientResponseException ex) {
+            ex.printStackTrace();
+        }
     }
 
-    @SneakyThrows
+
     public void deleteTopic(String clusterName, String topicName) {
         try {
             topicApi().deleteTopic(clusterName, topicName).block();
         } catch (WebClientResponseException ex) {
-            if (ex.getRawStatusCode() != 404)  // except already deleted
+            ErrorResponse errorResponse = new Gson().fromJson(ex.getResponseBodyAsString(), ErrorResponse.class);
+            if (errorResponse.getMessage().startsWith("This server does not host this")) {
+                log.info("This server does not host this " + topicName);
+            } else {
                 throw ex;
+            }
         }
     }
 
     @SneakyThrows
-    private KafkaConnectApi connectorApi(){
+    private KafkaConnectApi connectorApi() {
         ApiClient defaultClient = new ApiClient();
         defaultClient.setBasePath(baseURL);
         KafkaConnectApi connectorsApi = new KafkaConnectApi(defaultClient);
@@ -59,9 +76,7 @@ public class ApiHelper {
     public void deleteConnector(String clusterName, String connectName, String connectorName) {
         try {
             connectorApi().deleteConnector(clusterName, connectName, connectorName).block();
-        } catch (WebClientResponseException ex) {
-            if (ex.getRawStatusCode() != 404)
-                throw ex;
+        } catch (WebClientResponseException ignore) {
         }
     }
 
@@ -71,9 +86,17 @@ public class ApiHelper {
         connector.setName(connectorName);
         Map<String, Object> configMap = new ObjectMapper().readValue(configJson, HashMap.class);
         connector.setConfig(configMap);
+        try {
+            connectorApi().deleteConnector(clusterName, connectName, connectorName).block();
+        } catch (WebClientResponseException ignored){
+        }
         connectorApi().createConnector(clusterName, connectName, connector).block();
     }
 
+    public String getFirstConnectName(String clusterName) {
+        return connectorApi().getConnects(clusterName).blockFirst().getName();
+    }
+
     @SneakyThrows
     private MessagesApi messageApi() {
         ApiClient defaultClient = new ApiClient();
@@ -83,10 +106,16 @@ public class ApiHelper {
     }
 
     @SneakyThrows
-    public void sendMessage(String clusterName, String topicName, String messageContentJson, String messageKey){
+    public void sendMessage(String clusterName, String topicName, String messageContentJson,
+            String messageKey) {
         CreateTopicMessage createMessage = new CreateTopicMessage();
+        createMessage.partition(0);
         createMessage.setContent(messageContentJson);
         createMessage.setKey(messageKey);
-        messageApi().sendTopicMessages(clusterName, topicName, createMessage).block();
+        try {
+            messageApi().sendTopicMessages(clusterName, topicName, createMessage).block();
+        } catch (WebClientResponseException ex) {
+            ex.getRawStatusCode();
+        }
     }
 }

+ 0 - 36
kafka-ui-e2e-checks/src/test/java/com/provectus/kafka/ui/pages/ConnectorCreateView.java

@@ -1,36 +0,0 @@
-package com.provectus.kafka.ui.pages;
-
-import com.codeborne.selenide.Condition;
-import com.provectus.kafka.ui.extensions.WaitUtils;
-import io.qameta.allure.Step;
-import lombok.experimental.ExtensionMethod;
-import org.openqa.selenium.By;
-import org.openqa.selenium.Keys;
-
-import static com.codeborne.selenide.Selenide.$;
-import static com.provectus.kafka.ui.screenshots.Screenshooter.log;
-import static java.lang.Thread.sleep;
-
-@ExtensionMethod(WaitUtils.class)
-public class ConnectorCreateView {
-    private static final String path = "ui/clusters/secondLocal/connectors/create_new";
-
-    @Step
-    public ConnectorsView setConnectorConfig(String connectName, String configJson) throws InterruptedException {
-        $(By.xpath("//input[@name='name']")).sendKeys(connectName);
-        $(".ace_text-input").sendKeys(Keys.BACK_SPACE);
-        $(".ace_text-input").sendKeys(Keys.BACK_SPACE);
-        $(".ace_text-input").sendKeys(String.valueOf(configJson.toCharArray()));
-        $(By.xpath("//input[@name='name']")).click();
-        $(By.xpath("//input[@type='submit']")).click();
-        sleep(2000);
-        log.info("Connector config is submitted");
-        return new ConnectorsView();
-    }
-
-    @Step
-    public ConnectorCreateView isOnConnectorCreatePage() {
-        $(By.xpath("//input[@name='name']")).shouldBe(Condition.visible);
-        return this;
-    }
-}

+ 0 - 25
kafka-ui-e2e-checks/src/test/java/com/provectus/kafka/ui/pages/ConnectorUpdateView.java

@@ -1,25 +0,0 @@
-package com.provectus.kafka.ui.pages;
-
-import io.qameta.allure.Step;
-import org.openqa.selenium.By;
-import org.openqa.selenium.Keys;
-
-import static com.codeborne.selenide.Selenide.$;
-import static org.openqa.selenium.Keys.*;
-
-public class ConnectorUpdateView {
-    @Step
-    public ConnectorUpdateView updateConnectorConfig(String configJson) {
-        String os = System.getProperty("os.name");
-        Keys CMD = os.equalsIgnoreCase("Mac OS X") ? COMMAND : CONTROL;
-
-        $(".ace_text-input").sendKeys(CMD, "a");
-        $(".ace_text-input").sendKeys(Keys.BACK_SPACE);
-        $(".ace_text-input").sendKeys(String.valueOf(configJson.toCharArray()));
-        $(".ace_text-input").sendKeys(CMD, "a");
-        $(".ace_text-input").sendKeys(SHIFT, TAB);
-        $("div.ace_content").click();
-        $(By.xpath("//input[@type='submit']")).click();
-        return this;
-    }
-}

+ 0 - 41
kafka-ui-e2e-checks/src/test/java/com/provectus/kafka/ui/pages/ConnectorsView.java

@@ -1,41 +0,0 @@
-package com.provectus.kafka.ui.pages;
-
-import com.codeborne.selenide.Condition;
-import com.codeborne.selenide.Selenide;
-import com.provectus.kafka.ui.base.TestConfiguration;
-import com.provectus.kafka.ui.extensions.WaitUtils;
-import io.qameta.allure.Step;
-import lombok.experimental.ExtensionMethod;
-import org.openqa.selenium.By;
-
-import static com.codeborne.selenide.Selenide.$;
-
-@ExtensionMethod(WaitUtils.class)
-public class ConnectorsView {
-    private static final String path = "ui/clusters/%s/connects/first/connectors/%s";
-
-    @Step
-    public ConnectorsView goTo(String cluster, String connector) {
-        Selenide.open(TestConfiguration.BASE_URL + path.formatted(cluster, connector));
-        return this;
-    }
-
-    @Step
-    public ConnectorUpdateView openEditConfig() {
-        $(By.xpath("//a/span[text()='Edit config']")).click();
-        return new ConnectorUpdateView();
-    }
-
-    @Step
-    public void clickDeleteButton() {
-        $(By.xpath("//span[text()='Delete']")).click();
-        $(By.xpath("//button[text()='Confirm']")).click();
-    }
-
-    @Step
-    public void connectorIsVisibleOnOverview() {
-        $(By.xpath("//a[text() ='Tasks']")).click();
-        $(By.xpath("//a[text() ='Config']")).click();
-        $(By.xpath("//span[text()='Edit config']")).waitUntil(Condition.visible, 100);
-    }
-}

+ 53 - 38
kafka-ui-e2e-checks/src/test/java/com/provectus/kafka/ui/pages/MainPage.java

@@ -2,54 +2,69 @@ package com.provectus.kafka.ui.pages;
 
 import com.codeborne.selenide.Condition;
 import com.codeborne.selenide.Selenide;
+import com.codeborne.selenide.SelenideElement;
 import com.provectus.kafka.ui.base.TestConfiguration;
 import com.provectus.kafka.ui.extensions.WaitUtils;
+import com.provectus.kafka.ui.pages.topic.TopicsList;
 import io.qameta.allure.Step;
 import lombok.SneakyThrows;
 import lombok.experimental.ExtensionMethod;
 import org.openqa.selenium.By;
 
-import static com.codeborne.selenide.Selenide.*;
+import static com.codeborne.selenide.Selenide.$;
+import static com.codeborne.selenide.Selenide.$x;
 
 @ExtensionMethod({WaitUtils.class})
 public class MainPage {
 
-  private static final String path = "";
-
-  @Step
-  public MainPage goTo(){
-    Selenide.open(TestConfiguration.BASE_URL+path);
-    return this;
-  }
-  @Step
-  public MainPage isOnPage() {
-    $(By.xpath("//*[contains(text(),'Loading')]")).shouldBe(Condition.disappear);
-    $(By.xpath("//h5[text()='Clusters']")).shouldBe(Condition.visible);
-    return this;
-  }
-
-  @SneakyThrows
-  public void topicIsVisible(String topicName) {
-    By.xpath("//div[contains(@class,'section')]//table//a[text()='%s']".formatted(topicName)).refreshUntil(Condition.visible);
-  }
-
-  public enum SideMenuOptions {
-    BROKERS("Brokers"),
-    TOPICS("Topics"),
-    CONSUMERS("Consumers"),
-    SCHEMA_REGISTRY("Schema registry");
-
-    String value;
-
-    SideMenuOptions(String value) {
-      this.value = value;
+    private static final String path = "/";
+
+    @Step
+    public MainPage goTo() {
+        Selenide.open(TestConfiguration.BASE_WEB_URL + path);
+        return this;
+    }
+
+    @Step
+    public MainPage isOnPage() {
+        $(By.xpath("//*[contains(text(),'Loading')]")).shouldBe(Condition.disappear);
+        $("input[name=switchRoundedDefault]").parent().$("span").shouldBe(Condition.visible);
+        return this;
+    }
+
+    @SneakyThrows
+    public void topicIsVisible(String topicName) {
+        new TopicsList().isTopicVisible(topicName);
+    }
+
+    public void topicIsNotVisible(String topicName){
+        new TopicsList().isTopicNotVisible(topicName);
+    }
+
+
+    public enum SideMenuOptions {
+        BROKERS("Brokers"),
+        TOPICS("Topics"),
+        CONSUMERS("Consumers"),
+        SCHEMA_REGISTRY("Schema registry");
+
+        String value;
+
+        SideMenuOptions(String value) {
+            this.value = value;
+        }
+    }
+
+    @Step
+    public MainPage goToSideMenu(String clusterName, SideMenuOptions option) {
+        SelenideElement clusterElement = $x(String.format("//aside/ul/li[contains(.,'%s')]", clusterName)).shouldBe(Condition.visible);
+        if (clusterElement.parent().$$x(".//ul").size() == 0) {
+            clusterElement.click();
+        }
+        clusterElement
+                .parent()
+                .$x(String.format(".//ul/li[contains(.,'%s')]", option.value))
+                .click();
+        return this;
     }
-  }
-
-  @Step
-  public MainPage goToSideMenu(String clusterName, SideMenuOptions option) {
-    $(By.xpath("//aside//*[a[text()='%s']]//a[text()='%s']".formatted(clusterName, option.value)))
-        .click();
-    return this;
-  }
 }

+ 5 - 0
kafka-ui-e2e-checks/src/test/java/com/provectus/kafka/ui/pages/Pages.java

@@ -1,5 +1,10 @@
 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.topic.TopicView;
+import com.provectus.kafka.ui.pages.topic.TopicsList;
+
 public class Pages {
 
     public static Pages INSTANCE = new Pages();

+ 0 - 111
kafka-ui-e2e-checks/src/test/java/com/provectus/kafka/ui/pages/TopicView.java

@@ -1,111 +0,0 @@
-package com.provectus.kafka.ui.pages;
-
-import com.codeborne.selenide.Condition;
-import com.codeborne.selenide.Selenide;
-import com.codeborne.selenide.SelenideElement;
-import com.provectus.kafka.ui.base.TestConfiguration;
-import com.provectus.kafka.ui.extensions.WaitUtils;
-import io.qameta.allure.Step;
-import lombok.SneakyThrows;
-import lombok.experimental.ExtensionMethod;
-import org.junit.jupiter.api.Assertions;
-import org.openqa.selenium.By;
-
-import static com.codeborne.selenide.Selenide.*;
-
-@ExtensionMethod({WaitUtils.class})
-public class TopicView {
-    private static final String path = "ui/clusters/%s/topics/%s";
-    private final SelenideElement cleanupPolicy = $(By.name("cleanupPolicy"));
-    private final SelenideElement timeToRetain = $(By.id("timeToRetain"));
-    private final SelenideElement maxSizeOnDisk = $(By.name("retentionBytes"));
-    private final SelenideElement maxMessageBytes = $(By.name("maxMessageBytes"));
-
-    @Step
-    public TopicView goTo(String cluster,String topic){
-        Selenide.open(TestConfiguration.BASE_URL+path.formatted(cluster,topic));
-        return this;
-    }
-
-    @Step
-    public TopicsList isOnTopicViewPage() {
-        $(By.xpath("//*[contains(text(),'Loading')]")).shouldBe(Condition.disappear);
-        $(By.xpath("//a[text()='All Topics']")).shouldBe(Condition.visible);
-        return new TopicsList();
-    }
-
-    @Step
-    public TopicsList isOnTopicListPage() {
-        $(By.xpath("//*[contains(text(),'Loading')]")).shouldBe(Condition.disappear);
-        $(By.xpath("//span[text()='All Topics']")).shouldBe(Condition.visible);
-        return new TopicsList();
-    }
-
-    @SneakyThrows
-    public TopicView openEditSettings() {
-        $(By.xpath("//a[@class=\"button\" and text()='Edit settings']")).click();
-        return this;
-    }
-
-    @SneakyThrows
-    public TopicView clickDeleteTopicButton() {
-        By.xpath("//*[text()='Delete Topic']").refreshUntil(Condition.visible);
-        $(By.xpath("//*[text()='Delete Topic']")).click();
-        $(By.xpath("//*[text()='Confirm']")).click();
-        return this;
-    }
-
-    @SneakyThrows
-    public TopicView changeCleanupPolicy(String cleanupPolicyValue) {
-        cleanupPolicy.click();
-        $(By.xpath("//select/option[@value = '%s']".formatted(cleanupPolicyValue))).click();
-        return this;
-    }
-
-    @SneakyThrows
-    public TopicView changeTimeToRetainValue(String timeToRetainValue) {
-        timeToRetain.clear();
-        timeToRetain.sendKeys(String.valueOf(timeToRetainValue));
-        return this;
-    }
-
-    @SneakyThrows
-    public TopicView changeMaxSizeOnDisk(String maxSizeOnDiskValue) {
-        maxSizeOnDisk.click();
-        $(By.xpath("//select/option[text() = '%s']".formatted(maxSizeOnDiskValue))).click();
-        return this;
-    }
-
-    @SneakyThrows
-    public TopicView changeMaxMessageBytes(String maxMessageBytesValue) {
-        maxMessageBytes.clear();
-        maxMessageBytes.sendKeys(String.valueOf(maxMessageBytesValue));
-        return this;
-    }
-
-    @SneakyThrows
-    public TopicView submitSettingChanges() {
-        $(By.xpath("//input[@type='submit']")).click();
-        return this;
-    }
-
-    public TopicView cleanupPolicyIs(String value) {
-        cleanupPolicy.waitForSelectedValue(value);
-        return this;
-    }
-
-    public TopicView timeToRetainIs(String time) {
-        Assertions.assertEquals(time, timeToRetain.getValue());
-        return this;
-    }
-
-    public TopicView maxSizeOnDiskIs(String size) {
-        Assertions.assertEquals(size, maxSizeOnDisk.getSelectedText());
-        return this;
-    }
-
-    public TopicView maxMessageBytesIs(String bytes) {
-        Assertions.assertEquals(bytes, maxMessageBytes.getValue());
-        return this;
-    }
-}

+ 0 - 47
kafka-ui-e2e-checks/src/test/java/com/provectus/kafka/ui/pages/TopicsList.java

@@ -1,47 +0,0 @@
-package com.provectus.kafka.ui.pages;
-
-import com.codeborne.selenide.Condition;
-import com.codeborne.selenide.Selenide;
-import com.provectus.kafka.ui.base.TestConfiguration;
-import com.provectus.kafka.ui.extensions.WaitUtils;
-import io.qameta.allure.Step;
-import lombok.SneakyThrows;
-import lombok.experimental.ExtensionMethod;
-import org.openqa.selenium.By;
-
-import static com.codeborne.selenide.Selenide.$;
-
-@ExtensionMethod(WaitUtils.class)
-public class TopicsList {
-    private static final String path = "ui/clusters/%s/topics";
-
-    @Step
-    public TopicsList goTo(String cluster) {
-        Selenide.open(TestConfiguration.BASE_URL+path.formatted(cluster));
-        return this;
-    }
-
-    @Step
-    public TopicsList isOnPage() {
-        $(By.xpath("//*[contains(text(),'Loading')]")).shouldBe(Condition.disappear);
-        $(By.xpath("//span[text()='All Topics']")).shouldBe(Condition.visible);
-        return this;
-    }
-
-    @SneakyThrows
-    public TopicsList openTopic(String topicName) {
-        By.xpath("//div[contains(@class,'section')]//table//a[text()='%s']"
-                .formatted(topicName)).refreshUntil(Condition.visible);
-        $(By.xpath("//div[contains(@class,'section')]//table//a[text()='%s']".formatted(topicName)))
-                .click();
-        return this;
-    }
-
-    @SneakyThrows
-    public TopicsList isNotVisible(String topicName) {
-        By.xpath("//div[contains(@class,'section')]//table").refreshUntil(Condition.visible);
-        $(By.xpath("//a[text()='%s']".formatted(topicName))).shouldNotBe(Condition.visible);
-        return this;
-    }
-
-}

+ 42 - 0
kafka-ui-e2e-checks/src/test/java/com/provectus/kafka/ui/pages/connector/ConnectorCreateView.java

@@ -0,0 +1,42 @@
+package com.provectus.kafka.ui.pages.connector;
+
+import com.codeborne.selenide.Condition;
+import com.codeborne.selenide.SelenideElement;
+import com.provectus.kafka.ui.extensions.WaitUtils;
+import com.provectus.kafka.ui.utils.BrowserUtils;
+import io.qameta.allure.Step;
+import lombok.experimental.ExtensionMethod;
+import org.openqa.selenium.By;
+
+import static com.codeborne.selenide.Selenide.$;
+import static com.provectus.kafka.ui.screenshots.Screenshooter.log;
+import static java.lang.Thread.sleep;
+
+@ExtensionMethod(WaitUtils.class)
+public class ConnectorCreateView {
+
+    SelenideElement nameField = $(By.xpath("//input[@name='name']"));
+    SelenideElement contentTextArea = $(".ace_text-input");
+    SelenideElement submitButton = $(By.xpath("//button[@type='submit']"));
+
+    private static final String path = "/ui/clusters/secondLocal/connectors/create_new";
+
+    @Step("Set connector config JSON")
+    public ConnectorsView setConnectorConfig(String connectName, String configJson) throws InterruptedException {
+        nameField.setValue(connectName);
+        $("#config").click();
+        contentTextArea.setValue("");
+        contentTextArea.setValue(String.valueOf(configJson.toCharArray()));
+        nameField.click();
+        BrowserUtils.javaExecutorClick(submitButton);
+        sleep(4000);
+        log.info("Connector config is submitted");
+        return new ConnectorsView();
+    }
+
+    @Step("Verify that page 'Create Connector' opened")
+    public ConnectorCreateView isOnConnectorCreatePage() {
+        nameField.shouldBe(Condition.visible);
+        return this;
+    }
+}

+ 47 - 0
kafka-ui-e2e-checks/src/test/java/com/provectus/kafka/ui/pages/connector/ConnectorUpdateView.java

@@ -0,0 +1,47 @@
+package com.provectus.kafka.ui.pages.connector;
+
+import com.codeborne.selenide.Condition;
+import com.codeborne.selenide.SelenideElement;
+import com.provectus.kafka.ui.utils.BrowserUtils;
+import io.qameta.allure.Step;
+import org.openqa.selenium.By;
+
+import static com.codeborne.selenide.Selectors.byLinkText;
+import static com.codeborne.selenide.Selenide.*;
+import static com.provectus.kafka.ui.screenshots.Screenshooter.log;
+
+public class ConnectorUpdateView {
+    SelenideElement submitButton = $(By.xpath("//button[@type='submit']"));
+    SelenideElement contentTextArea = $("[wrap]");
+
+
+    @Step("Update connector from new JSON")
+    public ConnectorUpdateView updateConnectorConfig(String configJson) {
+        BrowserUtils.javaExecutorClick($("#config"));
+        String str = configJson.replace("\r\n", "");
+        executeJavaScript(
+                "function clearAndNot(){" +
+                        "var editor = ace.edit('config');" +
+                        "editor.setValue(\"\");" +
+                        "editor.setValue('" + str + "');}" +
+                        "clearAndNot();");
+        $("#config").click();
+        submitButton.click();
+        $(byLinkText("Edit Config")).shouldBe(Condition.visible);
+        sleep(3000);
+        return this;
+    }
+
+    @Step("Set connector config JSON")
+    public ConnectorsView updConnectorConfig(String configJson) throws InterruptedException {
+        contentTextArea.doubleClick();
+        contentTextArea.setValue("");
+        contentTextArea.setValue(String.valueOf(configJson.toCharArray()));
+        $("#config").click();
+        submitButton.shouldBe(Condition.enabled);
+        BrowserUtils.javaExecutorClick(submitButton);
+        sleep(4000);
+        log.info("Connector config is submitted");
+        return new ConnectorsView();
+    }
+}

+ 16 - 16
kafka-ui-e2e-checks/src/test/java/com/provectus/kafka/ui/pages/ConnectorsList.java → kafka-ui-e2e-checks/src/test/java/com/provectus/kafka/ui/pages/connector/ConnectorsList.java

@@ -1,57 +1,57 @@
-package com.provectus.kafka.ui.pages;
+package com.provectus.kafka.ui.pages.connector;
 
 import com.codeborne.selenide.Condition;
 import com.codeborne.selenide.Selenide;
 import com.provectus.kafka.ui.base.TestConfiguration;
 import com.provectus.kafka.ui.extensions.WaitUtils;
+import com.provectus.kafka.ui.utils.BrowserUtils;
 import io.qameta.allure.Step;
 import lombok.SneakyThrows;
 import lombok.experimental.ExtensionMethod;
 import org.openqa.selenium.By;
 
-import static com.codeborne.selenide.Selenide.$;
+import static com.codeborne.selenide.Selenide.*;
 
 @ExtensionMethod(WaitUtils.class)
 public class ConnectorsList {
-    private static final String path = "ui/clusters/%s/connectors";
 
-    @Step
+    private static final String path = "/ui/clusters/%s/connectors";
+
+    @Step("Open URL to {cluster}")
     public ConnectorsList goTo(String cluster) {
-        Selenide.open(TestConfiguration.BASE_URL+path.formatted(cluster));
+        Selenide.open(TestConfiguration.BASE_WEB_URL + String.format(path, cluster));
         return this;
     }
 
     @Step
     public ConnectorsList isOnPage() {
-        $(By.xpath("//*[contains(text(),'Loading')]")).shouldBe(Condition.disappear);
-        $(By.xpath("//span[text()='All Connectors']")).shouldBe(Condition.visible);
+        $(By.xpath("//h1[text()='Connectors']")).shouldBe(Condition.visible);
         return this;
     }
 
-    @Step
+    @Step("Click on button 'Create Connector'")
     public ConnectorCreateView clickCreateConnectorButton() {
-        $(By.xpath("//a[text()='Create Connector']")).click();
+        BrowserUtils.javaExecutorClick($x("//button[text()='Create Connector']"));
         return new ConnectorCreateView();
     }
 
     @SneakyThrows
     public ConnectorsList openConnector(String connectorName) {
-        $(By.xpath("//*/tr/td[1]/a[text()='%s']".formatted(connectorName)))
-                .click();
+        $(By.linkText(connectorName)).click();
         return this;
     }
 
     @SneakyThrows
     public ConnectorsList isNotVisible(String connectorName) {
-        By.xpath("//div[contains(@class,'section')]//table").refreshUntil(Condition.visible);
-        $(By.xpath("//a[text()='%s']".formatted(connectorName))).shouldNotBe(Condition.visible);
+        $(By.xpath("//table")).shouldBe(Condition.visible);
+        $x("//tbody//td[1]//a[text()='" + connectorName + "']").shouldBe(Condition.not(Condition.visible));
         return this;
     }
 
-    @Step
+    @Step("Verify that connector {connectorName} is visible in the list")
     public ConnectorsList connectorIsVisibleInList(String connectorName, String topicName) {
-        By.xpath("//a[text() = '%s']".formatted(connectorName)).refreshUntil(Condition.visible);
-        By.xpath("//a[text() = '%s']".formatted(topicName)).refreshUntil(Condition.visible);
+        $x("//table//a[@href='/ui/clusters/local/connects/first/connectors/" + connectorName +"']").shouldBe(Condition.visible);
+       $$(By.linkText(topicName));
         return this;
     }
 

+ 43 - 0
kafka-ui-e2e-checks/src/test/java/com/provectus/kafka/ui/pages/connector/ConnectorsView.java

@@ -0,0 +1,43 @@
+package com.provectus.kafka.ui.pages.connector;
+
+import com.codeborne.selenide.Condition;
+import com.codeborne.selenide.Selenide;
+import com.provectus.kafka.ui.base.TestConfiguration;
+import com.provectus.kafka.ui.extensions.WaitUtils;
+import com.provectus.kafka.ui.utils.BrowserUtils;
+import io.qameta.allure.Step;
+import lombok.experimental.ExtensionMethod;
+import org.openqa.selenium.By;
+
+import static com.codeborne.selenide.Selenide.$;
+import static com.codeborne.selenide.Selenide.$x;
+
+@ExtensionMethod(WaitUtils.class)
+public class ConnectorsView {
+    private static final String path = "/ui/clusters/%s/connects/first/connectors/%s";
+
+    @Step
+    public ConnectorsView goTo(String cluster, String connector) {
+        Selenide.open(TestConfiguration.BASE_WEB_URL + path.format(cluster, connector));
+        return this;
+    }
+
+    @Step("Open 'Edit Config' of connector")
+    public ConnectorUpdateView openEditConfig() {
+        BrowserUtils.javaExecutorClick($x("//button[@type='button']/span[.='Edit Config']"));
+        return new ConnectorUpdateView();
+    }
+
+    @Step("Click 'Delete' button")
+    public void clickDeleteButton() {
+        BrowserUtils.javaExecutorClick($x("//span[text()='Delete']"));
+        $(By.xpath("//button[text()='Submit']")).shouldBe(Condition.visible).click();
+    }
+
+    @Step
+    public void connectorIsVisibleOnOverview() {
+        $(By.xpath("//a[text() ='Tasks']")).shouldBe(Condition.visible);
+        $(By.xpath("//a[text() ='Config']")).shouldBe(Condition.visible);
+        $(By.xpath("//a[text() ='Overview']")).shouldBe(Condition.visible);
+    }
+}

+ 224 - 0
kafka-ui-e2e-checks/src/test/java/com/provectus/kafka/ui/pages/topic/TopicCreateEditSettingsView.java

@@ -0,0 +1,224 @@
+package com.provectus.kafka.ui.pages.topic;
+
+import static com.codeborne.selenide.Selenide.$;
+import static com.codeborne.selenide.Selenide.$$;
+import static com.codeborne.selenide.Selenide.$x;
+import static org.assertj.core.api.Assertions.assertThat;
+
+import com.codeborne.selenide.*;
+import com.provectus.kafka.ui.utils.BrowserUtils;
+import org.openqa.selenium.By;
+
+public class TopicCreateEditSettingsView {
+
+    private final SelenideElement timeToRetain = $(By.cssSelector("input#timeToRetain"));
+    private final SelenideElement maxMessageBytes = $(By.name("maxMessageBytes"));
+
+    public TopicCreateEditSettingsView setTopicName(String topicName){
+        $("input#topicFormName").setValue(topicName);
+        return this;
+    }
+
+    public TopicCreateEditSettingsView setMinInsyncReplicas(Integer minInsyncReplicas) {
+        $("input[name=minInsyncReplicas]").setValue(minInsyncReplicas.toString());
+        return this;
+    }
+
+    public TopicCreateEditSettingsView setTimeToRetainDataInMs(Long ms) {
+        timeToRetain.setValue(ms.toString());
+        return this;
+    }
+
+    public TopicCreateEditSettingsView setTimeToRetainDataInMs(String ms) {
+        timeToRetain.setValue(ms);
+        return this;
+    }
+
+
+    public TopicCreateEditSettingsView setMaxSizeOnDiskInGB(String value) {
+        KafkaUISelectElement kafkaUISelectElement = new KafkaUISelectElement("retentionBytes");
+        kafkaUISelectElement.selectByVisibleText(value);
+        return this;
+    }
+
+    public TopicCreateEditSettingsView setMaxMessageBytes(Long bytes) {
+        maxMessageBytes.setValue(bytes.toString());
+        return this;
+    }
+
+    public TopicCreateEditSettingsView setMaxMessageBytes(String bytes) {
+        return setMaxMessageBytes(Long.parseLong(bytes));
+    }
+
+    public TopicCreateEditSettingsView setTimeToRetainDataInMsUsingButtons(String value) {
+        timeToRetain
+                .parent()
+                .parent()
+                .$$("button")
+                .find(Condition.exactText(value))
+                .click();
+        return this;
+    }
+
+
+    public TopicCreateEditSettingsView selectCleanupPolicy(CleanupPolicyValue cleanupPolicyValue) {
+        return selectFromDropDownByOptionValue("cleanupPolicy",
+                cleanupPolicyValue.getOptionValue());
+    }
+
+    public TopicCreateEditSettingsView selectCleanupPolicy(String cleanupPolicyOptionValue) {
+        $("ul#topicFormCleanupPolicy").click();
+        $x("//li[text()='" + cleanupPolicyOptionValue +"']").click();
+        return this;
+    }
+
+
+    public TopicCreateEditSettingsView selectRetentionBytes(String visibleValue) {
+        return selectFromDropDownByVisibleText("retentionBytes", visibleValue);
+    }
+
+    public TopicCreateEditSettingsView selectRetentionBytes(Long optionValue) {
+        return selectFromDropDownByOptionValue("retentionBytes", optionValue.toString());
+    }
+
+    public TopicView sendData() {
+        BrowserUtils.javaExecutorClick($(".ezTgzA.sc-bYEvvW"));
+        return new TopicView();
+    }
+
+    public TopicCreateEditSettingsView addCustomParameter(String customParameterName,
+                                                          String customParameterValue) {
+        ElementsCollection customParametersElements =
+                $$("ul[role=listbox][name^=customParams][name$=name]");
+        KafkaUISelectElement kafkaUISelectElement = null;
+        if (customParametersElements.size() == 1) {
+            if ("Select".equals(customParametersElements.first().getText())) {
+                kafkaUISelectElement = new KafkaUISelectElement(customParametersElements.first());
+            }
+        } else {
+            $$("button")
+                    .find(Condition.exactText("Add Custom Parameter"))
+                    .click();
+            customParametersElements = $$("ul[role=listbox][name^=customParams][name$=name]");
+            kafkaUISelectElement = new KafkaUISelectElement(customParametersElements.last());
+        }
+        kafkaUISelectElement.selectByVisibleText(customParameterName);
+        $("input[name=\"customParams.%d.value\"]".formatted(customParametersElements.size() - 1))
+                .setValue(customParameterValue);
+        return this;
+    }
+
+    public TopicCreateEditSettingsView updateCustomParameter(String customParameterName,
+                                                             String customParameterValue) {
+        SelenideElement selenideElement = $$("ul[role=listbox][name^=customParams][name$=name]")
+                .find(Condition.exactText(customParameterName));
+        String name = selenideElement.getAttribute("name");
+        name = name.substring(0, name.lastIndexOf("."));
+        $("input[name^=%s]".formatted(name)).setValue(customParameterValue);
+        return this;
+    }
+
+    public TopicCreateEditSettingsView cleanupPolicyIs(String value) {
+        String cleanupPolicy = new KafkaUISelectElement("cleanupPolicy")
+                .getCurrentValue();
+        assertThat(cleanupPolicy)
+                .as("Clear policy value should be " + value)
+                .isEqualToIgnoringCase(value);
+        return this;
+    }
+
+    public TopicCreateEditSettingsView timeToRetainIs(String time) {
+        String value = timeToRetain.getValue();
+        assertThat(value)
+                .as("Time to retain data (in ms) should be " + time)
+                .isEqualTo(time);
+        return this;
+    }
+
+    public TopicCreateEditSettingsView maxSizeOnDiskIs(String size) {
+        String retentionBytes = new KafkaUISelectElement("retentionBytes")
+                .getCurrentValue();
+        assertThat(retentionBytes)
+                .as("Max size on disk in GB should be " + size)
+                .isEqualTo(size);
+        return this;
+    }
+
+    public TopicCreateEditSettingsView maxMessageBytesIs(String bytes) {
+        String value = maxMessageBytes.getValue();
+        assertThat(value)
+                .as("Maximum message size in bytes should be " + bytes)
+                .isEqualTo(bytes);
+        return this;
+    }
+
+
+    private static class KafkaUISelectElement {
+
+        private SelenideElement selectElement;
+
+        public KafkaUISelectElement(String selectElementName) {
+            this.selectElement = $("ul[role=listbox][name="+selectElementName+"]");
+        }
+
+        public KafkaUISelectElement(SelenideElement selectElement) {
+            this.selectElement = selectElement;
+        }
+
+        public void selectByOptionValue(String optionValue) {
+            selectElement.click();
+            selectElement
+                    .$$x(".//ul/li[@role='option']")
+                    .find(Condition.attribute("value", optionValue))
+                    .click(ClickOptions.usingJavaScript());
+        }
+
+        public void selectByVisibleText(String visibleText) {
+            selectElement.click();
+            selectElement
+                    .$$("ul>li[role=option]")
+                    .find(Condition.exactText(visibleText))
+                    .click();
+        }
+
+        public String getCurrentValue() {
+            return selectElement.$("li").getText();
+        }
+    }
+
+    public enum CleanupPolicyValue {
+        DELETE("delete", "Delete"),
+        COMPACT("compact", "Compact"),
+        COMPACT_DELETE("compact,delete", "Compact,Delete");
+
+        private final String optionValue;
+        private final String visibleText;
+
+        CleanupPolicyValue(String optionValue, String visibleText) {
+            this.optionValue = optionValue;
+            this.visibleText = visibleText;
+        }
+
+        public String getOptionValue() {
+            return optionValue;
+        }
+
+        public String getVisibleText() {
+            return visibleText;
+        }
+    }
+
+    private TopicCreateEditSettingsView selectFromDropDownByOptionValue(String dropDownElementName,
+                                                                        String optionValue) {
+        KafkaUISelectElement select = new KafkaUISelectElement(dropDownElementName);
+        select.selectByOptionValue(optionValue);
+        return this;
+    }
+
+    private TopicCreateEditSettingsView selectFromDropDownByVisibleText(String dropDownElementName,
+                                                                        String visibleText) {
+        KafkaUISelectElement select = new KafkaUISelectElement(dropDownElementName);
+        select.selectByVisibleText(visibleText);
+        return this;
+    }
+}

+ 72 - 0
kafka-ui-e2e-checks/src/test/java/com/provectus/kafka/ui/pages/topic/TopicView.java

@@ -0,0 +1,72 @@
+package com.provectus.kafka.ui.pages.topic;
+
+import com.codeborne.selenide.Condition;
+import com.codeborne.selenide.Selenide;
+import com.codeborne.selenide.SelenideElement;
+import com.provectus.kafka.ui.base.TestConfiguration;
+import com.provectus.kafka.ui.extensions.WaitUtils;
+import io.qameta.allure.Step;
+import lombok.SneakyThrows;
+import lombok.experimental.ExtensionMethod;
+
+import static com.codeborne.selenide.Selectors.byLinkText;
+import static com.codeborne.selenide.Selenide.*;
+
+@ExtensionMethod({WaitUtils.class})
+public class TopicView {
+
+    private static final String path = "/ui/clusters/%s/topics/%s";
+    private final SelenideElement dotMenuHeader = $(".fPWftu.sc-fHYyUA > .dropdown.is-right");
+    private final SelenideElement dotMenuFooter = $$(".dropdown.is-right button").get(1);
+
+    @Step
+    public TopicView goTo(String cluster, String topic) {
+        Selenide.open(TestConfiguration.BASE_WEB_URL + String.format(path, cluster, topic));
+        return this;
+    }
+
+    @Step
+    public TopicView isOnTopicViewPage() {
+       $("nav[role=navigation] a.is-active.is-primary").shouldBe(Condition.visible);
+        return this;
+    }
+
+    @SneakyThrows
+    public TopicCreateEditSettingsView openEditSettings() {
+        dotMenuHeader.click();
+        $x("//a[text()= '" + DotMenuHeaderItems.EDIT_SETTINGS.getValue() +"']").click();
+        return new TopicCreateEditSettingsView();
+    }
+
+
+    @SneakyThrows
+    public TopicsList deleteTopic() {
+        dotMenuHeader.click();
+        $("#dropdown-menu").$(byLinkText(DotMenuHeaderItems.REMOVE_TOPIC.getValue())).click();
+        $$("div[role=\"dialog\"] button").find(Condition.exactText("Submit")).click();
+        return new TopicsList();
+    }
+
+    private enum DotMenuHeaderItems {
+        EDIT_SETTINGS("Edit settings"),
+        CLEAR_MESSAGES("Clear messages"),
+        REMOVE_TOPIC("Remove topic");
+
+        private String value;
+
+        DotMenuHeaderItems(String value) {
+            this.value = value;
+        }
+
+        public String getValue() {
+            return value;
+        }
+
+        @Override
+        public String toString() {
+            return "DotMenuHeaderItems{" +
+                    "value='" + value + '\'' +
+                    '}';
+        }
+    }
+}

+ 64 - 0
kafka-ui-e2e-checks/src/test/java/com/provectus/kafka/ui/pages/topic/TopicsList.java

@@ -0,0 +1,64 @@
+package com.provectus.kafka.ui.pages.topic;
+
+import com.codeborne.selenide.CollectionCondition;
+import com.codeborne.selenide.Condition;
+import com.codeborne.selenide.Selenide;
+import com.provectus.kafka.ui.base.TestConfiguration;
+import com.provectus.kafka.ui.extensions.WaitUtils;
+import com.provectus.kafka.ui.utils.BrowserUtils;
+import io.qameta.allure.Step;
+import lombok.SneakyThrows;
+import lombok.experimental.ExtensionMethod;
+import org.openqa.selenium.By;
+
+import static com.codeborne.selenide.Selenide.*;
+
+@ExtensionMethod(WaitUtils.class)
+public class TopicsList {
+
+    private static final String path = "/ui/clusters/%s/topics";
+
+    @Step
+    public TopicsList goTo(String cluster) {
+        Selenide.open(TestConfiguration.BASE_WEB_URL + String.format(path, cluster));
+        return this;
+    }
+
+    @Step
+    public TopicsList isOnPage() {
+        $(By.xpath("//*[contains(text(),'Loading')]")).shouldBe(Condition.disappear);
+        $(By.xpath("//h1[text()='All Topics']")).shouldBe(Condition.visible);
+        return this;
+    }
+
+    @Step
+    public TopicCreateEditSettingsView pressCreateNewTopic(){
+        BrowserUtils.javaExecutorClick($(".qEXNn.sc-bYEvvW"));
+        return new TopicCreateEditSettingsView();
+    }
+
+    @Step
+    public TopicsList isTopicVisible(String topicName) {
+        $$("tbody td>a")
+                .shouldBe(CollectionCondition.sizeGreaterThan(4))
+                .find(Condition.exactText(topicName))
+                .shouldBe(Condition.visible);
+        return this;
+    }
+
+    @SneakyThrows
+    public TopicView openTopic(String topicName) {
+        $(By.linkText(topicName)).click();
+        return new TopicView();
+    }
+
+    @SneakyThrows
+    public TopicsList isTopicNotVisible(String topicName) {
+        $$x("//table/tbody/tr/td[2]")
+                .shouldBe(CollectionCondition.sizeGreaterThanOrEqual(4))
+                .find(Condition.exactText(topicName))
+                .shouldBe(Condition.not(Condition.visible));
+        return this;
+    }
+
+}

+ 45 - 28
kafka-ui-e2e-checks/src/test/java/com/provectus/kafka/ui/tests/ConnectorsTests.java

@@ -5,17 +5,19 @@ import com.provectus.kafka.ui.extensions.FileUtils;
 import com.provectus.kafka.ui.helpers.ApiHelper;
 import com.provectus.kafka.ui.helpers.Helpers;
 import lombok.SneakyThrows;
-import org.junit.Ignore;
-import org.junit.jupiter.api.*;
+import org.junit.jupiter.api.AfterAll;
+import org.junit.jupiter.api.BeforeAll;
+import org.junit.jupiter.api.DisplayName;
+import org.junit.jupiter.api.Test;
 
-@Disabled // TODO #1480
 public class ConnectorsTests extends BaseTest {
 
-    public static final String LOCAL = "local";
+    public static final String LOCAL_CLUSTER = "local";
     public static final String SINK_CONNECTOR = "sink_postgres_activities_e2e_checks";
     public static final String TOPIC_FOR_CONNECTOR = "topic_for_connector";
+    public static final String TOPIC_FOR_DELETE_CONNECTOR = "topic_for_delete_connector";
     public static final String TOPIC_FOR_UPDATE_CONNECTOR = "topic_for_update_connector";
-    public static final String FIRST = "first";
+    public static final String FIRST_CONNECTOR = "first";
     public static final String CONNECTOR_FOR_DELETE = "sink_postgres_activities_e2e_checks_for_delete";
     public static final String CONNECTOR_FOR_UPDATE = "sink_postgres_activities_e2e_checks_for_update";
 
@@ -24,60 +26,75 @@ public class ConnectorsTests extends BaseTest {
     public static void beforeAll() {
         ApiHelper apiHelper = Helpers.INSTANCE.apiHelper;
 
+        String connectorToDelete = FileUtils.getResourceAsString("delete_connector_config.json");
+        String connectorToUpdate = FileUtils.getResourceAsString("config_for_create_connector_via_api.json");
         String message = FileUtils.getResourceAsString("message_content_create_topic.json");
-        apiHelper.createTopic(LOCAL, TOPIC_FOR_CONNECTOR);
-        apiHelper.sendMessage(LOCAL, TOPIC_FOR_CONNECTOR, message, " ");
+
+        apiHelper.deleteTopic(LOCAL_CLUSTER, CONNECTOR_FOR_DELETE);
+
+        apiHelper.createTopic(LOCAL_CLUSTER, TOPIC_FOR_CONNECTOR);
+        apiHelper.sendMessage(LOCAL_CLUSTER, TOPIC_FOR_CONNECTOR, message, " ");
+
+        apiHelper.createTopic(LOCAL_CLUSTER, TOPIC_FOR_DELETE_CONNECTOR);
+        apiHelper.sendMessage(LOCAL_CLUSTER, TOPIC_FOR_DELETE_CONNECTOR, message, " ");
+
+        apiHelper.createTopic(LOCAL_CLUSTER, TOPIC_FOR_UPDATE_CONNECTOR);
+        apiHelper.sendMessage(LOCAL_CLUSTER, TOPIC_FOR_UPDATE_CONNECTOR, message, " ");
+
+        apiHelper.createConnector(LOCAL_CLUSTER, FIRST_CONNECTOR, CONNECTOR_FOR_DELETE, connectorToDelete);
+        apiHelper.createConnector(LOCAL_CLUSTER, FIRST_CONNECTOR, CONNECTOR_FOR_UPDATE, connectorToUpdate);
     }
 
     @AfterAll
     @SneakyThrows
     public static void afterAll() {
         ApiHelper apiHelper = Helpers.INSTANCE.apiHelper;
-        apiHelper.deleteConnector(LOCAL, FIRST, SINK_CONNECTOR);
-        apiHelper.deleteTopic(LOCAL, TOPIC_FOR_CONNECTOR);
+        apiHelper.deleteConnector(LOCAL_CLUSTER, FIRST_CONNECTOR, SINK_CONNECTOR);
+        apiHelper.deleteConnector(LOCAL_CLUSTER, FIRST_CONNECTOR, CONNECTOR_FOR_UPDATE);
+        apiHelper.deleteTopic(LOCAL_CLUSTER, TOPIC_FOR_CONNECTOR);
+        apiHelper.deleteTopic(LOCAL_CLUSTER, TOPIC_FOR_DELETE_CONNECTOR);
+        apiHelper.deleteTopic(LOCAL_CLUSTER, TOPIC_FOR_UPDATE_CONNECTOR);
     }
 
     @SneakyThrows
     @DisplayName("should create a connector")
     @Test
-    void createConnector() {
-        pages.openConnectorsList(LOCAL)
+    public void createConnector() {
+        pages.openConnectorsList(LOCAL_CLUSTER)
                 .isOnPage()
                 .clickCreateConnectorButton()
                 .isOnConnectorCreatePage()
                 .setConnectorConfig(
                         SINK_CONNECTOR,
-                        FileUtils.getResourceAsString("config_for_create_connector.json")
-                );
-        pages.openConnectorsList(LOCAL).connectorIsVisibleInList(SINK_CONNECTOR, TOPIC_FOR_CONNECTOR);
+                        FileUtils.getResourceAsString("config_for_create_connector.json"));
+        pages.openConnectorsList(LOCAL_CLUSTER)
+                .isOnPage()
+                .connectorIsVisibleInList(SINK_CONNECTOR, TOPIC_FOR_CONNECTOR);
     }
 
     //disable test due 500 error during create connector via api
     @SneakyThrows
     @DisplayName("should update a connector")
     @Test
-    @Disabled
-    void updateConnector() {
-        pages.openConnectorsList(LOCAL)
+    public void updateConnector() {
+        pages.openConnectorsList(LOCAL_CLUSTER)
                 .isOnPage()
                 .openConnector(CONNECTOR_FOR_UPDATE);
-        pages.openConnectorsView(LOCAL, CONNECTOR_FOR_UPDATE)
-                .openEditConfig()
-                .updateConnectorConfig(
-                        FileUtils.getResourceAsString("config_for_update_connector.json"));
-        pages.openConnectorsList(LOCAL).connectorIsVisibleInList(CONNECTOR_FOR_UPDATE, TOPIC_FOR_UPDATE_CONNECTOR);
+                pages.connectorsView.connectorIsVisibleOnOverview();
+        pages.connectorsView.openEditConfig()
+                        .updConnectorConfig(FileUtils.getResourceAsString("config_for_update_connector.json"));
+        pages.openConnectorsList(LOCAL_CLUSTER).connectorIsVisibleInList(CONNECTOR_FOR_UPDATE, TOPIC_FOR_UPDATE_CONNECTOR);
     }
 
     @SneakyThrows
     @DisplayName("should delete connector")
     @Test
-    @Disabled
-    void deleteConnector() {
-        pages.openConnectorsList(LOCAL)
+    public void deleteConnector() {
+        pages.openConnectorsList(LOCAL_CLUSTER)
                 .isOnPage()
                 .openConnector(CONNECTOR_FOR_DELETE);
-        pages.openConnectorsView(LOCAL, CONNECTOR_FOR_DELETE)
-                .clickDeleteButton();
-        pages.openConnectorsList(LOCAL).isNotVisible(CONNECTOR_FOR_DELETE);
+                pages.connectorsView.clickDeleteButton();
+        pages.openConnectorsList(LOCAL_CLUSTER)
+                .isNotVisible(CONNECTOR_FOR_DELETE);
     }
 }

+ 37 - 30
kafka-ui-e2e-checks/src/test/java/com/provectus/kafka/ui/tests/TopicTests.java

@@ -3,20 +3,17 @@ 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.pages.MainPage;
+import io.qameta.allure.Issue;
 import lombok.SneakyThrows;
 import org.junit.jupiter.api.*;
-import org.junit.jupiter.api.DisplayName;
-import org.junit.jupiter.api.Test;
-import org.junit.jupiter.api.Disabled;
 
-@Disabled // TODO #1480
 public class TopicTests extends BaseTest {
 
     public static final String NEW_TOPIC = "new-topic";
     public static final String TOPIC_TO_UPDATE = "topic-to-update";
     public static final String TOPIC_TO_DELETE = "topic-to-delete";
     public static final String SECOND_LOCAL = "secondLocal";
-    public static final String COMPACT_POLICY_VALUE = "compact";
+    public static final String COMPACT_POLICY_VALUE = "Compact";
     public static final String UPDATED_TIME_TO_RETAIN_VALUE = "604800001";
     public static final String UPDATED_MAX_SIZE_ON_DISK = "20 GB";
     public static final String UPDATED_MAX_MESSAGE_BYTES = "1000020";
@@ -33,41 +30,51 @@ public class TopicTests extends BaseTest {
     public static void afterAll() {
         Helpers.INSTANCE.apiHelper.deleteTopic(SECOND_LOCAL, TOPIC_TO_UPDATE);
         Helpers.INSTANCE.apiHelper.deleteTopic(SECOND_LOCAL, TOPIC_TO_DELETE);
+        Helpers.INSTANCE.apiHelper.deleteTopic(SECOND_LOCAL, NEW_TOPIC);
     }
 
     @SneakyThrows
     @DisplayName("should create a topic")
     @Test
-    void createTopic() {
-        try {
-            helpers.apiHelper.createTopic(SECOND_LOCAL, NEW_TOPIC);
-            pages.open()
-                    .isOnPage()
-                    .goToSideMenu(SECOND_LOCAL, MainPage.SideMenuOptions.TOPICS)
-                    .topicIsVisible(NEW_TOPIC);
-        } finally {
-            helpers.apiHelper.deleteTopic(SECOND_LOCAL, NEW_TOPIC);
-        }
+    public void createTopic() {
+        pages.open()
+                .goToSideMenu(SECOND_LOCAL, MainPage.SideMenuOptions.TOPICS);
+        pages.topicsList.pressCreateNewTopic()
+                .setTopicName(NEW_TOPIC)
+                .sendData()
+                .isOnTopicViewPage();
+        pages.open()
+                .goToSideMenu(SECOND_LOCAL, MainPage.SideMenuOptions.TOPICS)
+                .topicIsVisible(NEW_TOPIC);
+        helpers.apiHelper.deleteTopic(SECOND_LOCAL, NEW_TOPIC);
+        pages.open()
+                .goToSideMenu(SECOND_LOCAL, MainPage.SideMenuOptions.TOPICS)
+                .topicIsNotVisible(NEW_TOPIC);
     }
 
+    @Disabled("Due to issue https://github.com/provectus/kafka-ui/issues/1500 ignore this test")
     @SneakyThrows
     @DisplayName("should update a topic")
+    @Issue("1500")
     @Test
-    void updateTopic() {
+    public void updateTopic() {
         pages.openTopicsList(SECOND_LOCAL)
-                .isOnPage()
-                .openTopic(TOPIC_TO_UPDATE);
+                .isOnPage();
         pages.openTopicView(SECOND_LOCAL, TOPIC_TO_UPDATE)
                 .openEditSettings()
-                .changeCleanupPolicy(COMPACT_POLICY_VALUE)
-                .changeTimeToRetainValue(UPDATED_TIME_TO_RETAIN_VALUE)
-                .changeMaxSizeOnDisk(UPDATED_MAX_SIZE_ON_DISK)
-                .changeMaxMessageBytes(UPDATED_MAX_MESSAGE_BYTES)
-                .submitSettingChanges()
+                .selectCleanupPolicy(COMPACT_POLICY_VALUE)
+                .setMinInsyncReplicas(10)
+                .setTimeToRetainDataInMs(UPDATED_TIME_TO_RETAIN_VALUE)
+                .setMaxSizeOnDiskInGB(UPDATED_MAX_SIZE_ON_DISK)
+                .setMaxMessageBytes(UPDATED_MAX_MESSAGE_BYTES)
+                .sendData()
                 .isOnTopicViewPage();
+
+        pages.openTopicsList(SECOND_LOCAL)
+                .isOnPage();
         pages.openTopicView(SECOND_LOCAL, TOPIC_TO_UPDATE)
                 .openEditSettings()
-        // Assertions
+                // Assertions
                 .cleanupPolicyIs(COMPACT_POLICY_VALUE)
                 .timeToRetainIs(UPDATED_TIME_TO_RETAIN_VALUE)
                 .maxSizeOnDiskIs(UPDATED_MAX_SIZE_ON_DISK)
@@ -77,13 +84,13 @@ public class TopicTests extends BaseTest {
     @SneakyThrows
     @DisplayName("should delete topic")
     @Test
-    void deleteTopic() {
+    public void deleteTopic() {
         pages.openTopicsList(SECOND_LOCAL)
                 .isOnPage()
-                .openTopic(TOPIC_TO_DELETE);
-        pages.openTopicView(SECOND_LOCAL, TOPIC_TO_DELETE)
-                .clickDeleteTopicButton()
-                .isOnTopicListPage()
-                .isNotVisible(TOPIC_TO_DELETE);
+                .openTopic(TOPIC_TO_DELETE)
+                .isOnTopicViewPage()
+                .deleteTopic()
+                .isOnPage()
+                .isTopicNotVisible(TOPIC_TO_DELETE);
     }
 }

+ 23 - 0
kafka-ui-e2e-checks/src/test/java/com/provectus/kafka/ui/utils/BrowserUtils.java

@@ -0,0 +1,23 @@
+package com.provectus.kafka.ui.utils;
+
+import com.codeborne.selenide.Selenide;
+import com.codeborne.selenide.SelenideElement;
+import org.openqa.selenium.NoSuchElementException;
+
+public class BrowserUtils {
+
+    public static void javaExecutorClick(SelenideElement element){
+        Selenide.executeJavaScript("arguments[0].click();", element);
+    }
+
+    public static void waitElementPresentJavaExecutor( SelenideElement element ) {
+        try {
+            Selenide.executeJavaScript("return typeof(arguments[0]) != 'undefined' && arguments[0] != null;",
+                    element);
+        }
+        catch(org.openqa.selenium.StaleElementReferenceException | NoSuchElementException ex){
+            Selenide.executeJavaScript("return typeof(arguments[0]) != 'undefined' && arguments[0] != null;",
+                    element);
+        }
+    }
+}

+ 1 - 1
pom.xml

@@ -34,7 +34,7 @@
         <avro.version>1.11.0</avro.version>
         <confluent.version>7.0.1</confluent.version>
         <apache.commons.version>2.11.1</apache.commons.version>
-        <test.containers.version>1.16.2</test.containers.version>
+        <test.containers.version>1.17.1</test.containers.version>
         <junit-jupiter-engine.version>5.7.2</junit-jupiter-engine.version>
         <mockito.version>2.21.0</mockito.version>
         <assertj.version>3.19.0</assertj.version>