Repository: provectus/kafka-ui
Issue: [e2e]Update workflow to run e2e checks on current build
Labels: scope/QA

Currently, e2e-checks use the latest docker build (from `./docker/kafka-ui.yaml`). 
We need to run tests against the version, that is currently in commit


Issue comments:

Pull request review comments:

Patch that resolved the issue:
diff --git a/.github/workflows/e2e-checks.yaml b/.github/workflows/e2e-checks.yaml
index 6622c0908a9..f6b5caa7ed7 100644
--- a/.github/workflows/e2e-checks.yaml
+++ b/.github/workflows/e2e-checks.yaml
@@ -20,26 +20,30 @@ jobs:
             ${{ runner.os }}-maven-
       - uses: actions/checkout@v2
       - name: Set the values
-        id: step_one
+        id: set_env_values
         run: |
           cat "./kafka-ui-e2e-checks/.env.ci" >> "./kafka-ui-e2e-checks/.env"
       - name: pull docker
-        id: step_four
+        id: pull_selenoid
         run: |
           docker pull selenoid/vnc:chrome_86.0
-      - name: compose app
-        id: step_five
-        run: |
-          docker-compose -f ./docker/kafka-ui.yaml up -d
       - name: Set up JDK 1.13
         uses: actions/setup-java@v1
         with:
           java-version: 1.13
-      - name: Build and analyze
+      - name: Build with Maven
+        id: build_app
+        run: |
+          mvn clean package -DskipTests ${{ github.event.inputs.extraMavenOptions }}
+      - name: compose app
+        id: compose_app
+        run: |
+          docker-compose -f ./docker/kafka-ui.yaml up -d
+      - name: e2e run
         env:
           GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}  # Needed to get PR information, if any
           SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
-        run: mvn -B verify org.sonarsource.scanner.maven:sonar-maven-plugin:sonar
+        run: mvn -pl '!kafka-ui-api' test -Pprod
       - name: Generate allure report
         uses: simple-elf/allure-report-action@master
         if: always()


Test patch:
diff --git a/kafka-ui-e2e-checks/src/test/java/com/provectus/kafka/ui/extensions/WaitUtils.java b/kafka-ui-e2e-checks/src/test/java/com/provectus/kafka/ui/extensions/WaitUtils.java
index 5632ce72c22..0fa3d810e60 100644
--- a/kafka-ui-e2e-checks/src/test/java/com/provectus/kafka/ui/extensions/WaitUtils.java
+++ b/kafka-ui-e2e-checks/src/test/java/com/provectus/kafka/ui/extensions/WaitUtils.java
@@ -25,7 +25,7 @@ public static void waitForSelectedValue(SelenideElement element, String selected
             refresh();
             i++;
             sleep(2000);
-        } while (!selectedValue.equals(element.getSelectedValue()) && i != 30);
+        } while (!selectedValue.equals(element.getSelectedValue()) && i != 40);
         Assertions.assertEquals(selectedValue, element.getSelectedValue()) ;
     }
 }
diff --git a/kafka-ui-e2e-checks/src/test/java/com/provectus/kafka/ui/topics/TopicTests.java b/kafka-ui-e2e-checks/src/test/java/com/provectus/kafka/ui/topics/TopicTests.java
index cfca9d529b7..99a809a01ea 100644
--- a/kafka-ui-e2e-checks/src/test/java/com/provectus/kafka/ui/topics/TopicTests.java
+++ b/kafka-ui-e2e-checks/src/test/java/com/provectus/kafka/ui/topics/TopicTests.java
@@ -57,6 +57,7 @@ void updateTopic() {
         pages.openTopicsList(SECOND_LOCAL)
                 .isOnPage()
                 .openTopic(TOPIC_TO_UPDATE);
+        Selenide.refresh();
         pages.openTopicView(SECOND_LOCAL, TOPIC_TO_UPDATE)
                 .openEditSettings()
                 .changeCleanupPolicy(COMPACT_POLICY_VALUE)
@@ -85,6 +86,7 @@ void deleteTopic() {
                 .openTopic(TOPIC_TO_DELETE);
         pages.openTopicView(SECOND_LOCAL, TOPIC_TO_DELETE).clickDeleteTopicButton();
         pages.openTopicsList(SECOND_LOCAL).isNotVisible(TOPIC_TO_DELETE);
+        
     }
 
 }