626: add test for update topic functionality
This commit is contained in:
parent
5d1ea6e578
commit
cd9bc5f54d
1 changed files with 28 additions and 10 deletions
|
@ -2,11 +2,8 @@ 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.AfterEach;
|
||||
import org.junit.jupiter.api.Disabled;
|
||||
import org.junit.jupiter.api.DisplayName;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
|
@ -14,21 +11,42 @@ public class TopicTests extends BaseTest {
|
|||
|
||||
|
||||
public static final String NEW_TOPIC = "new-topic";
|
||||
public static final String TOPIC_FOR_UPDATE = "topic-for-update";
|
||||
public static final String SECOND_LOCAL = "secondLocal";
|
||||
|
||||
@AfterEach
|
||||
@SneakyThrows
|
||||
void afterEach(){
|
||||
helpers.apiHelper.deleteTopic("secondLocal","new-topic");
|
||||
void afterEach() {
|
||||
}
|
||||
|
||||
@SneakyThrows
|
||||
@DisplayName("should create a topic")
|
||||
@Test
|
||||
void createTopic(){
|
||||
helpers.apiHelper.createTopic("secondLocal","new-topic");
|
||||
pages.open()
|
||||
.mainPage.shouldBeOnPage()
|
||||
.goToSideMenu("secondLocal", MainPage.SideMenuOptions.TOPICS)
|
||||
.shouldBeTopic(NEW_TOPIC);
|
||||
try {
|
||||
helpers.apiHelper.createTopic("secondLocal", "new-topic");
|
||||
pages.open()
|
||||
.shouldBeOnPage()
|
||||
.goToSideMenu("secondLocal", MainPage.SideMenuOptions.TOPICS)
|
||||
.shouldBeTopic(NEW_TOPIC);
|
||||
} finally {
|
||||
helpers.apiHelper.deleteTopic("secondLocal","new-topic");
|
||||
}
|
||||
}
|
||||
|
||||
@SneakyThrows
|
||||
@DisplayName("should update a topic")
|
||||
@Test
|
||||
void updateTopic(){
|
||||
try {
|
||||
helpers.apiHelper.createTopic(SECOND_LOCAL, TOPIC_FOR_UPDATE);
|
||||
pages.openTopicPage()
|
||||
.shouldBeOnPage()
|
||||
.openTopic(TOPIC_FOR_UPDATE)
|
||||
.openEditSettings();
|
||||
} finally {
|
||||
helpers.apiHelper.deleteTopic(SECOND_LOCAL,TOPIC_FOR_UPDATE);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue