|
@@ -3,8 +3,12 @@ package com.provectus.kafka.ui.topics;
|
|
|
import com.provectus.kafka.ui.base.BaseTest;
|
|
|
import com.provectus.kafka.ui.pages.MainPage;
|
|
|
import com.provectus.kafka.ui.steps.kafka.KafkaSteps;
|
|
|
+import com.provectus.kafka.ui.helpers.ApiHelper;
|
|
|
import lombok.SneakyThrows;
|
|
|
-import org.junit.jupiter.api.*;
|
|
|
+import org.junit.jupiter.api.AfterEach;
|
|
|
+import org.junit.jupiter.api.Disabled;
|
|
|
+import org.junit.jupiter.api.DisplayName;
|
|
|
+import org.junit.jupiter.api.Test;
|
|
|
|
|
|
public class TopicTests extends BaseTest {
|
|
|
|
|
@@ -13,18 +17,18 @@ public class TopicTests extends BaseTest {
|
|
|
|
|
|
@AfterEach
|
|
|
@SneakyThrows
|
|
|
- void afterEach(){
|
|
|
- steps.kafka.deleteTopic(KafkaSteps.Cluster.SECOND_LOCAL,NEW_TOPIC);
|
|
|
+ void afterEach(){
|
|
|
+ helpers.apiHelper.deleteTopic("secondLocal","new-topic");
|
|
|
}
|
|
|
|
|
|
@SneakyThrows
|
|
|
@DisplayName("should create a topic")
|
|
|
@Test
|
|
|
void createTopic(){
|
|
|
- steps.kafka.createTopic(KafkaSteps.Cluster.SECOND_LOCAL,NEW_TOPIC);
|
|
|
+ helpers.apiHelper.createTopic("secondLocal","new-topic");
|
|
|
pages.open()
|
|
|
.mainPage.shouldBeOnPage()
|
|
|
- .goToSideMenu(KafkaSteps.Cluster.SECOND_LOCAL.getName(), MainPage.SideMenuOptions.TOPICS)
|
|
|
+ .goToSideMenu("secondLocal", MainPage.SideMenuOptions.TOPICS)
|
|
|
.shouldBeTopic(NEW_TOPIC);
|
|
|
}
|
|
|
}
|