626: add steps of test for update topic functionality
This commit is contained in:
parent
fdbecf3638
commit
3b0fbc0265
2 changed files with 42 additions and 2 deletions
|
@ -30,4 +30,39 @@ public class TopicPage {
|
|||
$(By.xpath("//a[@class=\"button\" and text()='Edit settings']")).click();
|
||||
return this;
|
||||
}
|
||||
|
||||
@SneakyThrows
|
||||
public TopicPage changeCleanupPolicy(String cleanupPolicyValue) {
|
||||
$(By.name("cleanupPolicy")).click();
|
||||
$(By.xpath("//select/option[text() = '%s']".formatted(cleanupPolicyValue))).click();
|
||||
return this;
|
||||
}
|
||||
|
||||
@SneakyThrows
|
||||
public TopicPage changeTimeToRetainValue(String timeToRetainValue) {
|
||||
$(By.id("timeToRetain")).clear();
|
||||
$(By.id("timeToRetain")).sendKeys(String.valueOf(timeToRetainValue));
|
||||
return this;
|
||||
}
|
||||
|
||||
@SneakyThrows
|
||||
public TopicPage changeMaxSizeOnDisk(String maxSizeOnDisk) {
|
||||
$(By.name("retentionBytes")).click();
|
||||
$(By.xpath("//select/option[text() = '%s']".formatted(maxSizeOnDisk))).click();
|
||||
return this;
|
||||
}
|
||||
|
||||
@SneakyThrows
|
||||
public TopicPage changeMaxMessageBytes(String maxMessageBytes) {
|
||||
$(By.name("maxMessageBytes")).clear();
|
||||
$(By.name("maxMessageBytes")).sendKeys(String.valueOf(maxMessageBytes));
|
||||
return this;
|
||||
}
|
||||
|
||||
@SneakyThrows
|
||||
public TopicPage submitSettingChanges() {
|
||||
$(By.xpath("//input[@type='submit']")).click();
|
||||
return this;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -31,7 +31,7 @@ public class TopicTests extends BaseTest {
|
|||
void createTopic(){
|
||||
pages.open()
|
||||
.shouldBeOnPage()
|
||||
.goToSideMenu("secondLocal", MainPage.SideMenuOptions.TOPICS)
|
||||
.goToSideMenu(SECOND_LOCAL, MainPage.SideMenuOptions.TOPICS)
|
||||
.shouldBeTopic(NEW_TOPIC);
|
||||
}
|
||||
|
||||
|
@ -42,7 +42,12 @@ public class TopicTests extends BaseTest {
|
|||
pages.openTopicPage()
|
||||
.shouldBeOnPage()
|
||||
.openTopic(NEW_TOPIC)
|
||||
.openEditSettings();
|
||||
.openEditSettings()
|
||||
.changeCleanupPolicy("Compact")
|
||||
.changeTimeToRetainValue("604800001")
|
||||
.changeMaxSizeOnDisk("20 GB")
|
||||
.changeMaxMessageBytes("1000020")
|
||||
.submitSettingChanges();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue