fixed tests

This commit is contained in:
Bogdan Volodarskiy 2021-06-16 12:50:34 +03:00
parent 11e57b0221
commit 19b454288f
2 changed files with 5 additions and 3 deletions

View file

@ -6,6 +6,8 @@ import com.provectus.kafka.ui.api.*;
import com.provectus.kafka.ui.api.model.*;
import com.provectus.kafka.ui.api.api.TopicsApi;
import java.util.List;
import static org.junit.jupiter.api.Assertions.assertTrue;
public class ApiHelper {
@ -34,12 +36,12 @@ public class ApiHelper {
topic.setName(topicName);
topic.setPartitions(partitions);
topic.setReplicationFactor(replicationFactor);
topicApi().createTopic(clusterName,topic);
topicApi().createTopic(clusterName,topic).block();
}
@SneakyThrows
public void deleteTopic(String clusterName, String topicName) {
topicApi().deleteTopic(clusterName,topicName);
topicApi().deleteTopic(clusterName,topicName).block();
}
}

View file

@ -28,7 +28,7 @@ public class TopicTests extends BaseTest {
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);
}
}