|
@@ -8,59 +8,59 @@ import org.openqa.selenium.By;
|
|
|
import static com.codeborne.selenide.Selenide.$;
|
|
|
import static com.provectus.kafka.ui.helpers.Utils.refreshUntil;
|
|
|
|
|
|
-public class TopicPage {
|
|
|
+public class TopicsListPage {
|
|
|
public static final String path = "ui/clusters/secondLocal/topics";
|
|
|
|
|
|
@Step
|
|
|
- public TopicPage shouldBeOnPage() {
|
|
|
+ public TopicsListPage shouldBeOnPage() {
|
|
|
$(By.xpath("//*[contains(text(),'Loading')]")).shouldBe(Condition.disappear);
|
|
|
$(By.xpath("//span[text()='All Topics']")).shouldBe(Condition.visible);
|
|
|
return this;
|
|
|
}
|
|
|
|
|
|
@SneakyThrows
|
|
|
- public TopicPage openTopic(String topicName) {
|
|
|
+ public TopicsListPage openTopic(String topicName) {
|
|
|
refreshUntil(By.xpath("//div[contains(@class,'section')]//table//a[text()='%s']".formatted(topicName)));
|
|
|
$(By.xpath("//div[contains(@class,'section')]//table//a[text()='%s']".formatted(topicName)))
|
|
|
.click();
|
|
|
return this;
|
|
|
}
|
|
|
@SneakyThrows
|
|
|
- public TopicPage openEditSettings() {
|
|
|
+ public TopicsListPage openEditSettings() {
|
|
|
$(By.xpath("//a[@class=\"button\" and text()='Edit settings']")).click();
|
|
|
return this;
|
|
|
}
|
|
|
|
|
|
@SneakyThrows
|
|
|
- public TopicPage changeCleanupPolicy(String cleanupPolicyValue) {
|
|
|
+ public TopicsListPage changeCleanupPolicy(String cleanupPolicyValue) {
|
|
|
$(By.name("cleanupPolicy")).click();
|
|
|
$(By.xpath("//select/option[text() = '%s']".formatted(cleanupPolicyValue))).click();
|
|
|
return this;
|
|
|
}
|
|
|
|
|
|
@SneakyThrows
|
|
|
- public TopicPage changeTimeToRetainValue(String timeToRetainValue) {
|
|
|
+ public TopicsListPage changeTimeToRetainValue(String timeToRetainValue) {
|
|
|
$(By.id("timeToRetain")).clear();
|
|
|
$(By.id("timeToRetain")).sendKeys(String.valueOf(timeToRetainValue));
|
|
|
return this;
|
|
|
}
|
|
|
|
|
|
@SneakyThrows
|
|
|
- public TopicPage changeMaxSizeOnDisk(String maxSizeOnDisk) {
|
|
|
+ public TopicsListPage changeMaxSizeOnDisk(String maxSizeOnDisk) {
|
|
|
$(By.name("retentionBytes")).click();
|
|
|
$(By.xpath("//select/option[text() = '%s']".formatted(maxSizeOnDisk))).click();
|
|
|
return this;
|
|
|
}
|
|
|
|
|
|
@SneakyThrows
|
|
|
- public TopicPage changeMaxMessageBytes(String maxMessageBytes) {
|
|
|
+ public TopicsListPage changeMaxMessageBytes(String maxMessageBytes) {
|
|
|
$(By.name("maxMessageBytes")).clear();
|
|
|
$(By.name("maxMessageBytes")).sendKeys(String.valueOf(maxMessageBytes));
|
|
|
return this;
|
|
|
}
|
|
|
|
|
|
@SneakyThrows
|
|
|
- public TopicPage submitSettingChanges() {
|
|
|
+ public TopicsListPage submitSettingChanges() {
|
|
|
$(By.xpath("//input[@type='submit']")).click();
|
|
|
return this;
|
|
|
}
|