626: add test for delete topic
This commit is contained in:
parent
bf1f78e7b4
commit
1ec461e812
3 changed files with 28 additions and 1 deletions
|
@ -19,6 +19,12 @@ public class TopicViewPage {
|
|||
return this;
|
||||
}
|
||||
|
||||
@SneakyThrows
|
||||
public void clickDeleteTopicButton() {
|
||||
$(By.xpath("//*[text()='Delete Topic']")).click();
|
||||
$(By.xpath("//*[text()='Confirm']")).click();
|
||||
}
|
||||
|
||||
@SneakyThrows
|
||||
public TopicViewPage changeCleanupPolicy(String cleanupPolicyValue) {
|
||||
cleanupPolicy.click();
|
||||
|
|
|
@ -26,4 +26,11 @@ public class TopicsListPage {
|
|||
return this;
|
||||
}
|
||||
|
||||
@SneakyThrows
|
||||
public TopicsListPage shouldBeDeleted(String topicName) {
|
||||
refreshUntil(By.xpath("//div[contains(@class,'section')]//table"));
|
||||
$(By.xpath("//a[text()='%s']".formatted(topicName))).shouldNotBe(Condition.visible);
|
||||
return this;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -67,10 +67,24 @@ public class TopicTests extends BaseTest {
|
|||
TopicViewPage topicViewPage = pages.openTopicViewPage(path)
|
||||
.openEditSettings();
|
||||
|
||||
Assertions.assertEquals(COMPACT_POLICY_VALUE, topicViewPage.cleanupPolicy.getSelectedValue());
|
||||
Assertions.assertEquals(COMPACT_POLICY_VALUE,topicViewPage.cleanupPolicy.getSelectedValue());
|
||||
Assertions.assertEquals(UPDATED_TIME_TO_RETAIN_VALUE,topicViewPage.timeToRetain.getValue());
|
||||
Assertions.assertEquals(UPDATED_MAX_SIZE_ON_DISK,topicViewPage.maxSizeOnDisk.getSelectedText());
|
||||
Assertions.assertEquals(UPDATED_MAX_MESSAGE_BYTES,topicViewPage.maxMessageBytes.getValue());
|
||||
}
|
||||
|
||||
@SneakyThrows
|
||||
@DisplayName("should delete topic")
|
||||
@Test
|
||||
@Disabled
|
||||
void deleteTopic(){
|
||||
final String path = "ui/clusters/" + SECOND_LOCAL + "/topics/" + UPDATE_TOPIC;
|
||||
|
||||
pages.openTopicsListPage()
|
||||
.shouldBeOnPage()
|
||||
.openTopic(UPDATE_TOPIC);
|
||||
pages.openTopicViewPage(path).clickDeleteTopicButton();
|
||||
pages.openTopicsListPage().shouldBeDeleted(UPDATE_TOPIC);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue