626: change names for better clarity
This commit is contained in:
parent
32186a5e77
commit
5ec6094cd4
2 changed files with 9 additions and 9 deletions
|
@ -38,7 +38,7 @@ public class TopicsList {
|
|||
}
|
||||
|
||||
@SneakyThrows
|
||||
public TopicsList isDeleted(String topicName) {
|
||||
public TopicsList isNotVisible(String topicName) {
|
||||
By.xpath("//div[contains(@class,'section')]//table").refreshUntil(Condition.visible);
|
||||
$(By.xpath("//a[text()='%s']".formatted(topicName))).shouldNotBe(Condition.visible);
|
||||
return this;
|
||||
|
|
|
@ -13,8 +13,8 @@ import org.junit.jupiter.api.Test;
|
|||
public class TopicTests extends BaseTest {
|
||||
|
||||
public static final String NEW_TOPIC = "new-topic";
|
||||
public static final String UPDATE_TOPIC = "update-topic";
|
||||
public static final String TOPIC_TO_DELETE = "delete-topic";
|
||||
public static final String TOPIC_TO_UPDATE = "topic-to-update";
|
||||
public static final String TOPIC_TO_DELETE = "topic-to-delete";
|
||||
public static final String SECOND_LOCAL = "secondLocal";
|
||||
public static final String COMPACT_POLICY_VALUE = "compact";
|
||||
public static final String UPDATED_TIME_TO_RETAIN_VALUE = "604800001";
|
||||
|
@ -24,14 +24,14 @@ public class TopicTests extends BaseTest {
|
|||
@BeforeAll
|
||||
@SneakyThrows
|
||||
public static void beforeAll() {
|
||||
Helpers.INSTANCE.apiHelper.createTopic(SECOND_LOCAL, UPDATE_TOPIC);
|
||||
Helpers.INSTANCE.apiHelper.createTopic(SECOND_LOCAL, TOPIC_TO_UPDATE);
|
||||
Helpers.INSTANCE.apiHelper.createTopic(SECOND_LOCAL, TOPIC_TO_DELETE);
|
||||
}
|
||||
|
||||
@AfterAll
|
||||
@SneakyThrows
|
||||
public static void afterAll() {
|
||||
Helpers.INSTANCE.apiHelper.deleteTopic(SECOND_LOCAL, UPDATE_TOPIC);
|
||||
Helpers.INSTANCE.apiHelper.deleteTopic(SECOND_LOCAL, TOPIC_TO_UPDATE);
|
||||
Helpers.INSTANCE.apiHelper.deleteTopic(SECOND_LOCAL, TOPIC_TO_DELETE);
|
||||
}
|
||||
|
||||
|
@ -56,8 +56,8 @@ public class TopicTests extends BaseTest {
|
|||
void updateTopic() {
|
||||
pages.openTopicsList(SECOND_LOCAL)
|
||||
.isOnPage()
|
||||
.openTopic(UPDATE_TOPIC);
|
||||
pages.openTopicView(SECOND_LOCAL, UPDATE_TOPIC)
|
||||
.openTopic(TOPIC_TO_UPDATE);
|
||||
pages.openTopicView(SECOND_LOCAL, TOPIC_TO_UPDATE)
|
||||
.openEditSettings()
|
||||
.changeCleanupPolicy(COMPACT_POLICY_VALUE)
|
||||
.changeTimeToRetainValue(UPDATED_TIME_TO_RETAIN_VALUE)
|
||||
|
@ -65,7 +65,7 @@ public class TopicTests extends BaseTest {
|
|||
.changeMaxMessageBytes(UPDATED_MAX_MESSAGE_BYTES)
|
||||
.submitSettingChanges();
|
||||
Selenide.refresh();
|
||||
pages.openTopicView(SECOND_LOCAL, UPDATE_TOPIC)
|
||||
pages.openTopicView(SECOND_LOCAL, TOPIC_TO_UPDATE)
|
||||
.openEditSettings()
|
||||
// Assertions
|
||||
.cleanupPolicyIs(COMPACT_POLICY_VALUE)
|
||||
|
@ -84,7 +84,7 @@ public class TopicTests extends BaseTest {
|
|||
.isOnPage()
|
||||
.openTopic(TOPIC_TO_DELETE);
|
||||
pages.openTopicView(SECOND_LOCAL, TOPIC_TO_DELETE).clickDeleteTopicButton();
|
||||
pages.openTopicsList(SECOND_LOCAL).isDeleted(TOPIC_TO_DELETE);
|
||||
pages.openTopicsList(SECOND_LOCAL).isNotVisible(TOPIC_TO_DELETE);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue