|
@@ -1,15 +1,20 @@
|
|
package com.provectus.kafka.ui.suite.topics;
|
|
package com.provectus.kafka.ui.suite.topics;
|
|
|
|
|
|
-import static com.provectus.kafka.ui.pages.NaviSideBar.SideMenuOption.TOPICS;
|
|
|
|
|
|
+import static com.provectus.kafka.ui.pages.BasePage.AlertHeader.SUCCESS;
|
|
|
|
+import static com.provectus.kafka.ui.pages.topic.TopicDetails.TopicMenu.MESSAGES;
|
|
|
|
+import static com.provectus.kafka.ui.pages.topic.TopicDetails.TopicMenu.SETTINGS;
|
|
import static com.provectus.kafka.ui.pages.topic.enums.CleanupPolicyValue.COMPACT;
|
|
import static com.provectus.kafka.ui.pages.topic.enums.CleanupPolicyValue.COMPACT;
|
|
import static com.provectus.kafka.ui.pages.topic.enums.CleanupPolicyValue.DELETE;
|
|
import static com.provectus.kafka.ui.pages.topic.enums.CleanupPolicyValue.DELETE;
|
|
import static com.provectus.kafka.ui.pages.topic.enums.CustomParameterType.COMPRESSION_TYPE;
|
|
import static com.provectus.kafka.ui.pages.topic.enums.CustomParameterType.COMPRESSION_TYPE;
|
|
|
|
+import static com.provectus.kafka.ui.pages.topic.enums.MaxSizeOnDisk.NOT_SET;
|
|
|
|
+import static com.provectus.kafka.ui.pages.topic.enums.MaxSizeOnDisk.SIZE_1_GB;
|
|
import static com.provectus.kafka.ui.pages.topic.enums.MaxSizeOnDisk.SIZE_20_GB;
|
|
import static com.provectus.kafka.ui.pages.topic.enums.MaxSizeOnDisk.SIZE_20_GB;
|
|
import static com.provectus.kafka.ui.settings.Source.CLUSTER_NAME;
|
|
import static com.provectus.kafka.ui.settings.Source.CLUSTER_NAME;
|
|
import static com.provectus.kafka.ui.utilities.FileUtils.fileToString;
|
|
import static com.provectus.kafka.ui.utilities.FileUtils.fileToString;
|
|
import static org.apache.commons.lang.RandomStringUtils.randomAlphabetic;
|
|
import static org.apache.commons.lang.RandomStringUtils.randomAlphabetic;
|
|
-import static org.apache.commons.lang3.RandomUtils.nextInt;
|
|
|
|
import static org.assertj.core.api.Assertions.assertThat;
|
|
import static org.assertj.core.api.Assertions.assertThat;
|
|
|
|
+import static org.apache.commons.lang3.RandomUtils.nextInt;
|
|
|
|
+import static org.apache.commons.lang.RandomStringUtils.randomAlphanumeric;
|
|
|
|
|
|
import com.codeborne.selenide.Condition;
|
|
import com.codeborne.selenide.Condition;
|
|
import com.provectus.kafka.ui.base.BaseTest;
|
|
import com.provectus.kafka.ui.base.BaseTest;
|
|
@@ -45,21 +50,26 @@ public class TopicsTests extends BaseTest {
|
|
.setCustomParameterType(COMPRESSION_TYPE)
|
|
.setCustomParameterType(COMPRESSION_TYPE)
|
|
.setCustomParameterValue("producer")
|
|
.setCustomParameterValue("producer")
|
|
.setCleanupPolicyValue(DELETE);
|
|
.setCleanupPolicyValue(DELETE);
|
|
- private static final Topic TOPIC_FOR_UPDATE = new Topic()
|
|
|
|
|
|
+ private static final Topic TOPIC_TO_UPDATE = new Topic()
|
|
.setName("topic-to-update-" + randomAlphabetic(5))
|
|
.setName("topic-to-update-" + randomAlphabetic(5))
|
|
|
|
+ .setNumberOfPartitions(1)
|
|
.setCleanupPolicyValue(COMPACT)
|
|
.setCleanupPolicyValue(COMPACT)
|
|
.setTimeToRetainData("604800001")
|
|
.setTimeToRetainData("604800001")
|
|
.setMaxSizeOnDisk(SIZE_20_GB)
|
|
.setMaxSizeOnDisk(SIZE_20_GB)
|
|
.setMaxMessageBytes("1000020")
|
|
.setMaxMessageBytes("1000020")
|
|
.setMessageKey(fileToString(System.getProperty("user.dir") + "/src/test/resources/producedkey.txt"))
|
|
.setMessageKey(fileToString(System.getProperty("user.dir") + "/src/test/resources/producedkey.txt"))
|
|
.setMessageContent(fileToString(System.getProperty("user.dir") + "/src/test/resources/testData.txt"));
|
|
.setMessageContent(fileToString(System.getProperty("user.dir") + "/src/test/resources/testData.txt"));
|
|
-
|
|
|
|
|
|
+ private static final Topic TOPIC_TO_CHECK_SETTINGS = new Topic()
|
|
|
|
+ .setName("new-topic-" + randomAlphabetic(5))
|
|
|
|
+ .setNumberOfPartitions(1)
|
|
|
|
+ .setMaxMessageBytes("1000012")
|
|
|
|
+ .setMaxSizeOnDisk(NOT_SET);
|
|
private static final Topic TOPIC_FOR_DELETE = new Topic().setName("topic-to-delete-" + randomAlphabetic(5));
|
|
private static final Topic TOPIC_FOR_DELETE = new Topic().setName("topic-to-delete-" + randomAlphabetic(5));
|
|
private static final List<Topic> TOPIC_LIST = new ArrayList<>();
|
|
private static final List<Topic> TOPIC_LIST = new ArrayList<>();
|
|
|
|
|
|
@BeforeAll
|
|
@BeforeAll
|
|
public void beforeAll() {
|
|
public void beforeAll() {
|
|
- TOPIC_LIST.addAll(List.of(TOPIC_FOR_UPDATE, TOPIC_FOR_DELETE));
|
|
|
|
|
|
+ TOPIC_LIST.addAll(List.of(TOPIC_TO_UPDATE, TOPIC_FOR_DELETE));
|
|
TOPIC_LIST.forEach(topic -> apiHelper.createTopic(CLUSTER_NAME, topic.getName()));
|
|
TOPIC_LIST.forEach(topic -> apiHelper.createTopic(CLUSTER_NAME, topic.getName()));
|
|
}
|
|
}
|
|
|
|
|
|
@@ -70,10 +80,8 @@ public class TopicsTests extends BaseTest {
|
|
@Test
|
|
@Test
|
|
@Order(1)
|
|
@Order(1)
|
|
public void createTopic() {
|
|
public void createTopic() {
|
|
- naviSideBar
|
|
|
|
- .openSideMenu(TOPICS);
|
|
|
|
|
|
+ navigateToTopics();
|
|
topicsList
|
|
topicsList
|
|
- .waitUntilScreenReady()
|
|
|
|
.clickAddTopicBtn();
|
|
.clickAddTopicBtn();
|
|
topicCreateEditForm
|
|
topicCreateEditForm
|
|
.waitUntilScreenReady()
|
|
.waitUntilScreenReady()
|
|
@@ -81,13 +89,7 @@ public class TopicsTests extends BaseTest {
|
|
.setNumberOfPartitions(TOPIC_TO_CREATE.getNumberOfPartitions())
|
|
.setNumberOfPartitions(TOPIC_TO_CREATE.getNumberOfPartitions())
|
|
.selectCleanupPolicy(TOPIC_TO_CREATE.getCleanupPolicyValue())
|
|
.selectCleanupPolicy(TOPIC_TO_CREATE.getCleanupPolicyValue())
|
|
.clickCreateTopicBtn();
|
|
.clickCreateTopicBtn();
|
|
- topicDetails
|
|
|
|
- .waitUntilScreenReady();
|
|
|
|
- naviSideBar
|
|
|
|
- .openSideMenu(TOPICS);
|
|
|
|
- topicsList
|
|
|
|
- .waitUntilScreenReady()
|
|
|
|
- .openTopic(TOPIC_TO_CREATE.getName());
|
|
|
|
|
|
+ navigateToTopicsAndOpenDetails(TOPIC_TO_CREATE.getName());
|
|
SoftAssertions softly = new SoftAssertions();
|
|
SoftAssertions softly = new SoftAssertions();
|
|
softly.assertThat(topicDetails.isTopicHeaderVisible(TOPIC_TO_CREATE.getName())).as("isTopicHeaderVisible()")
|
|
softly.assertThat(topicDetails.isTopicHeaderVisible(TOPIC_TO_CREATE.getName())).as("isTopicHeaderVisible()")
|
|
.isTrue();
|
|
.isTrue();
|
|
@@ -96,10 +98,7 @@ public class TopicsTests extends BaseTest {
|
|
softly.assertThat(topicDetails.getPartitions()).as("getPartitions()")
|
|
softly.assertThat(topicDetails.getPartitions()).as("getPartitions()")
|
|
.isEqualTo(TOPIC_TO_CREATE.getNumberOfPartitions());
|
|
.isEqualTo(TOPIC_TO_CREATE.getNumberOfPartitions());
|
|
softly.assertAll();
|
|
softly.assertAll();
|
|
- naviSideBar
|
|
|
|
- .openSideMenu(TOPICS);
|
|
|
|
- topicsList
|
|
|
|
- .waitUntilScreenReady();
|
|
|
|
|
|
+ navigateToTopics();
|
|
Assertions.assertTrue(topicsList.isTopicVisible(TOPIC_TO_CREATE.getName()), "isTopicVisible");
|
|
Assertions.assertTrue(topicsList.isTopicVisible(TOPIC_TO_CREATE.getName()), "isTopicVisible");
|
|
TOPIC_LIST.add(TOPIC_TO_CREATE);
|
|
TOPIC_LIST.add(TOPIC_TO_CREATE);
|
|
}
|
|
}
|
|
@@ -110,20 +109,16 @@ public class TopicsTests extends BaseTest {
|
|
@CaseId(7)
|
|
@CaseId(7)
|
|
@Test
|
|
@Test
|
|
@Order(2)
|
|
@Order(2)
|
|
- void checkAvailableOperations(){
|
|
|
|
- String processingTopic = "my_ksql_1ksql_processing_log";
|
|
|
|
- String confluentTopic = "_confluent-ksql-my_ksql_1_command_topic";
|
|
|
|
- naviSideBar
|
|
|
|
- .openSideMenu(TOPICS);
|
|
|
|
|
|
+ void checkAvailableOperations() {
|
|
|
|
+ navigateToTopics();
|
|
topicsList
|
|
topicsList
|
|
- .waitUntilScreenReady()
|
|
|
|
- .selectCheckboxByName(processingTopic);
|
|
|
|
- topicsList.getActionButtons().
|
|
|
|
- forEach(element -> assertThat(element.is(Condition.enabled))
|
|
|
|
- .as(element.getSearchCriteria() + " isEnabled()").isTrue());
|
|
|
|
|
|
+ .getTopicItem("my_ksql_1ksql_processing_log")
|
|
|
|
+ .selectItem(true);
|
|
|
|
+ verifyElementsCondition(topicsList.getActionButtons(),Condition.enabled);
|
|
topicsList
|
|
topicsList
|
|
- .selectCheckboxByName(confluentTopic);
|
|
|
|
- Assertions.assertFalse(topicsList.isCopySelectedTopicBtnEnabled(),"isCopySelectedTopicBtnEnabled()");
|
|
|
|
|
|
+ .getTopicItem("_confluent-ksql-my_ksql_1_command_topic")
|
|
|
|
+ .selectItem(true);
|
|
|
|
+ Assertions.assertFalse(topicsList.isCopySelectedTopicBtnEnabled(), "isCopySelectedTopicBtnEnabled()");
|
|
}
|
|
}
|
|
|
|
|
|
@Disabled()
|
|
@Disabled()
|
|
@@ -135,43 +130,33 @@ public class TopicsTests extends BaseTest {
|
|
@Test
|
|
@Test
|
|
@Order(3)
|
|
@Order(3)
|
|
public void updateTopic() {
|
|
public void updateTopic() {
|
|
- naviSideBar
|
|
|
|
- .openSideMenu(TOPICS);
|
|
|
|
- topicsList
|
|
|
|
- .waitUntilScreenReady()
|
|
|
|
- .openTopic(TOPIC_FOR_UPDATE.getName());
|
|
|
|
|
|
+ navigateToTopicsAndOpenDetails(TOPIC_TO_UPDATE.getName());
|
|
topicDetails
|
|
topicDetails
|
|
- .waitUntilScreenReady()
|
|
|
|
.openDotMenu()
|
|
.openDotMenu()
|
|
.clickEditSettingsMenu();
|
|
.clickEditSettingsMenu();
|
|
topicCreateEditForm
|
|
topicCreateEditForm
|
|
.waitUntilScreenReady()
|
|
.waitUntilScreenReady()
|
|
- .selectCleanupPolicy((TOPIC_FOR_UPDATE.getCleanupPolicyValue()))
|
|
|
|
|
|
+ .selectCleanupPolicy((TOPIC_TO_UPDATE.getCleanupPolicyValue()))
|
|
.setMinInsyncReplicas(10)
|
|
.setMinInsyncReplicas(10)
|
|
- .setTimeToRetainDataInMs(TOPIC_FOR_UPDATE.getTimeToRetainData())
|
|
|
|
- .setMaxSizeOnDiskInGB(TOPIC_FOR_UPDATE.getMaxSizeOnDisk())
|
|
|
|
- .setMaxMessageBytes(TOPIC_FOR_UPDATE.getMaxMessageBytes())
|
|
|
|
|
|
+ .setTimeToRetainDataInMs(TOPIC_TO_UPDATE.getTimeToRetainData())
|
|
|
|
+ .setMaxSizeOnDiskInGB(TOPIC_TO_UPDATE.getMaxSizeOnDisk())
|
|
|
|
+ .setMaxMessageBytes(TOPIC_TO_UPDATE.getMaxMessageBytes())
|
|
.clickCreateTopicBtn();
|
|
.clickCreateTopicBtn();
|
|
topicDetails
|
|
topicDetails
|
|
.waitUntilScreenReady();
|
|
.waitUntilScreenReady();
|
|
- naviSideBar
|
|
|
|
- .openSideMenu(TOPICS);
|
|
|
|
- topicsList
|
|
|
|
- .waitUntilScreenReady()
|
|
|
|
- .openTopic(TOPIC_FOR_UPDATE.getName());
|
|
|
|
|
|
+ navigateToTopicsAndOpenDetails(TOPIC_TO_UPDATE.getName());
|
|
topicDetails
|
|
topicDetails
|
|
- .waitUntilScreenReady()
|
|
|
|
.openDotMenu()
|
|
.openDotMenu()
|
|
.clickEditSettingsMenu();
|
|
.clickEditSettingsMenu();
|
|
SoftAssertions softly = new SoftAssertions();
|
|
SoftAssertions softly = new SoftAssertions();
|
|
softly.assertThat(topicCreateEditForm.getCleanupPolicy()).as("getCleanupPolicy()")
|
|
softly.assertThat(topicCreateEditForm.getCleanupPolicy()).as("getCleanupPolicy()")
|
|
- .isEqualTo(TOPIC_FOR_UPDATE.getCleanupPolicyValue().getVisibleText());
|
|
|
|
|
|
+ .isEqualTo(TOPIC_TO_UPDATE.getCleanupPolicyValue().getVisibleText());
|
|
softly.assertThat(topicCreateEditForm.getTimeToRetain()).as("getTimeToRetain()")
|
|
softly.assertThat(topicCreateEditForm.getTimeToRetain()).as("getTimeToRetain()")
|
|
- .isEqualTo(TOPIC_FOR_UPDATE.getTimeToRetainData());
|
|
|
|
|
|
+ .isEqualTo(TOPIC_TO_UPDATE.getTimeToRetainData());
|
|
softly.assertThat(topicCreateEditForm.getMaxSizeOnDisk()).as("getMaxSizeOnDisk()")
|
|
softly.assertThat(topicCreateEditForm.getMaxSizeOnDisk()).as("getMaxSizeOnDisk()")
|
|
- .isEqualTo(TOPIC_FOR_UPDATE.getMaxSizeOnDisk().getVisibleText());
|
|
|
|
|
|
+ .isEqualTo(TOPIC_TO_UPDATE.getMaxSizeOnDisk().getVisibleText());
|
|
softly.assertThat(topicCreateEditForm.getMaxMessageBytes()).as("getMaxMessageBytes()")
|
|
softly.assertThat(topicCreateEditForm.getMaxMessageBytes()).as("getMaxMessageBytes()")
|
|
- .isEqualTo(TOPIC_FOR_UPDATE.getMaxMessageBytes());
|
|
|
|
|
|
+ .isEqualTo(TOPIC_TO_UPDATE.getMaxMessageBytes());
|
|
softly.assertAll();
|
|
softly.assertAll();
|
|
}
|
|
}
|
|
|
|
|
|
@@ -182,20 +167,12 @@ public class TopicsTests extends BaseTest {
|
|
@Test
|
|
@Test
|
|
@Order(4)
|
|
@Order(4)
|
|
public void deleteTopic() {
|
|
public void deleteTopic() {
|
|
- naviSideBar
|
|
|
|
- .openSideMenu(TOPICS);
|
|
|
|
- topicsList
|
|
|
|
- .waitUntilScreenReady()
|
|
|
|
- .openTopic(TOPIC_FOR_DELETE.getName());
|
|
|
|
|
|
+ navigateToTopicsAndOpenDetails(TOPIC_FOR_DELETE.getName());
|
|
topicDetails
|
|
topicDetails
|
|
- .waitUntilScreenReady()
|
|
|
|
.openDotMenu()
|
|
.openDotMenu()
|
|
.clickDeleteTopicMenu()
|
|
.clickDeleteTopicMenu()
|
|
- .clickConfirmDeleteBtn();
|
|
|
|
- naviSideBar
|
|
|
|
- .openSideMenu(TOPICS);
|
|
|
|
- topicsList
|
|
|
|
- .waitUntilScreenReady();
|
|
|
|
|
|
+ .clickConfirmBtnMdl();
|
|
|
|
+ navigateToTopics();
|
|
Assertions.assertFalse(topicsList.isTopicVisible(TOPIC_FOR_DELETE.getName()), "isTopicVisible");
|
|
Assertions.assertFalse(topicsList.isTopicVisible(TOPIC_FOR_DELETE.getName()), "isTopicVisible");
|
|
TOPIC_LIST.remove(TOPIC_FOR_DELETE);
|
|
TOPIC_LIST.remove(TOPIC_FOR_DELETE);
|
|
}
|
|
}
|
|
@@ -209,13 +186,8 @@ public class TopicsTests extends BaseTest {
|
|
void redirectToConsumerFromTopic() {
|
|
void redirectToConsumerFromTopic() {
|
|
String topicName = "source-activities";
|
|
String topicName = "source-activities";
|
|
String consumerGroupId = "connect-sink_postgres_activities";
|
|
String consumerGroupId = "connect-sink_postgres_activities";
|
|
- naviSideBar
|
|
|
|
- .openSideMenu(TOPICS);
|
|
|
|
- topicsList
|
|
|
|
- .waitUntilScreenReady()
|
|
|
|
- .openTopic(topicName);
|
|
|
|
|
|
+ navigateToTopicsAndOpenDetails(topicName);
|
|
topicDetails
|
|
topicDetails
|
|
- .waitUntilScreenReady()
|
|
|
|
.openDetailsTab(TopicDetails.TopicMenu.CONSUMERS)
|
|
.openDetailsTab(TopicDetails.TopicMenu.CONSUMERS)
|
|
.openConsumerGroup(consumerGroupId);
|
|
.openConsumerGroup(consumerGroupId);
|
|
consumersDetails
|
|
consumersDetails
|
|
@@ -233,10 +205,8 @@ public class TopicsTests extends BaseTest {
|
|
@Test
|
|
@Test
|
|
@Order(6)
|
|
@Order(6)
|
|
void checkTopicCreatePossibility() {
|
|
void checkTopicCreatePossibility() {
|
|
- naviSideBar
|
|
|
|
- .openSideMenu(TOPICS);
|
|
|
|
|
|
+ navigateToTopics();
|
|
topicsList
|
|
topicsList
|
|
- .waitUntilScreenReady()
|
|
|
|
.clickAddTopicBtn();
|
|
.clickAddTopicBtn();
|
|
topicCreateEditForm
|
|
topicCreateEditForm
|
|
.waitUntilScreenReady();
|
|
.waitUntilScreenReady();
|
|
@@ -253,15 +223,49 @@ public class TopicsTests extends BaseTest {
|
|
assertThat(topicCreateEditForm.isCreateTopicButtonEnabled()).as("isCreateTopicButtonEnabled()").isTrue();
|
|
assertThat(topicCreateEditForm.isCreateTopicButtonEnabled()).as("isCreateTopicButtonEnabled()").isTrue();
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ @DisplayName("Checking 'Time to retain data (in ms)' custom value with editing Topic's settings")
|
|
|
|
+ @Suite(suiteId = SUITE_ID, title = SUITE_TITLE)
|
|
|
|
+ @AutomationStatus(status = Status.AUTOMATED)
|
|
|
|
+ @CaseId(266)
|
|
|
|
+ @Test
|
|
|
|
+ @Order(7)
|
|
|
|
+ void checkTimeToRetainDataCustomValueWithEditingTopic() {
|
|
|
|
+ Topic topicToRetainData = new Topic()
|
|
|
|
+ .setName("topic-to-retain-data-" + randomAlphabetic(5))
|
|
|
|
+ .setTimeToRetainData("86400000");
|
|
|
|
+ navigateToTopics();
|
|
|
|
+ topicsList
|
|
|
|
+ .clickAddTopicBtn();
|
|
|
|
+ topicCreateEditForm
|
|
|
|
+ .waitUntilScreenReady()
|
|
|
|
+ .setTopicName(topicToRetainData.getName())
|
|
|
|
+ .setNumberOfPartitions(1)
|
|
|
|
+ .setTimeToRetainDataInMs("604800000");
|
|
|
|
+ assertThat(topicCreateEditForm.getTimeToRetain()).as("getTimeToRetain()").isEqualTo("604800000");
|
|
|
|
+ topicCreateEditForm
|
|
|
|
+ .setTimeToRetainDataInMs(topicToRetainData.getTimeToRetainData())
|
|
|
|
+ .clickCreateTopicBtn();
|
|
|
|
+ topicDetails
|
|
|
|
+ .waitUntilScreenReady()
|
|
|
|
+ .openDotMenu()
|
|
|
|
+ .clickEditSettingsMenu();
|
|
|
|
+ assertThat(topicCreateEditForm.getTimeToRetain()).as("getTimeToRetain()")
|
|
|
|
+ .isEqualTo(topicToRetainData.getTimeToRetainData());
|
|
|
|
+ topicDetails
|
|
|
|
+ .openDetailsTab(SETTINGS);
|
|
|
|
+ assertThat(topicDetails.getSettingsGridValueByKey("retention.ms")).as("getSettingsGridValueByKey()")
|
|
|
|
+ .isEqualTo(topicToRetainData.getTimeToRetainData());
|
|
|
|
+ TOPIC_LIST.add(topicToRetainData);
|
|
|
|
+ }
|
|
|
|
+
|
|
@DisplayName("Checking requiredness of Custom parameters within 'Create new Topic'")
|
|
@DisplayName("Checking requiredness of Custom parameters within 'Create new Topic'")
|
|
@Suite(suiteId = SUITE_ID, title = SUITE_TITLE)
|
|
@Suite(suiteId = SUITE_ID, title = SUITE_TITLE)
|
|
@AutomationStatus(status = Status.AUTOMATED)
|
|
@AutomationStatus(status = Status.AUTOMATED)
|
|
@CaseId(6)
|
|
@CaseId(6)
|
|
@Test
|
|
@Test
|
|
- @Order(7)
|
|
|
|
|
|
+ @Order(8)
|
|
void checkCustomParametersWithinCreateNewTopic() {
|
|
void checkCustomParametersWithinCreateNewTopic() {
|
|
- naviSideBar
|
|
|
|
- .openSideMenu(TOPICS);
|
|
|
|
|
|
+ navigateToTopics();
|
|
topicsList
|
|
topicsList
|
|
.waitUntilScreenReady()
|
|
.waitUntilScreenReady()
|
|
.clickAddTopicBtn();
|
|
.clickAddTopicBtn();
|
|
@@ -283,20 +287,11 @@ public class TopicsTests extends BaseTest {
|
|
@AutomationStatus(status = Status.AUTOMATED)
|
|
@AutomationStatus(status = Status.AUTOMATED)
|
|
@CaseId(2)
|
|
@CaseId(2)
|
|
@Test
|
|
@Test
|
|
- @Order(8)
|
|
|
|
|
|
+ @Order(9)
|
|
void checkTopicListElements() {
|
|
void checkTopicListElements() {
|
|
- naviSideBar
|
|
|
|
- .openSideMenu(TOPICS);
|
|
|
|
- topicsList
|
|
|
|
- .waitUntilScreenReady();
|
|
|
|
- SoftAssertions softly = new SoftAssertions();
|
|
|
|
- topicsList.getAllVisibleElements().forEach(
|
|
|
|
- element -> softly.assertThat(element.is(Condition.visible)).as(element.getSearchCriteria() + " isVisible()")
|
|
|
|
- .isTrue());
|
|
|
|
- topicsList.getAllEnabledElements().forEach(
|
|
|
|
- element -> softly.assertThat(element.is(Condition.enabled)).as(element.getSearchCriteria() + " isEnabled()")
|
|
|
|
- .isTrue());
|
|
|
|
- softly.assertAll();
|
|
|
|
|
|
+ navigateToTopics();
|
|
|
|
+ verifyElementsCondition(topicsList.getAllVisibleElements(), Condition.visible);
|
|
|
|
+ verifyElementsCondition(topicsList.getAllEnabledElements(), Condition.enabled);
|
|
}
|
|
}
|
|
|
|
|
|
@DisplayName("Filter adding within Topic")
|
|
@DisplayName("Filter adding within Topic")
|
|
@@ -304,39 +299,177 @@ public class TopicsTests extends BaseTest {
|
|
@AutomationStatus(status = Status.AUTOMATED)
|
|
@AutomationStatus(status = Status.AUTOMATED)
|
|
@CaseId(12)
|
|
@CaseId(12)
|
|
@Test
|
|
@Test
|
|
- @Order(9)
|
|
|
|
|
|
+ @Order(10)
|
|
void addingNewFilterWithinTopic() {
|
|
void addingNewFilterWithinTopic() {
|
|
- String topicName = "_schemas";
|
|
|
|
- String filterName = "123ABC";
|
|
|
|
- naviSideBar
|
|
|
|
- .openSideMenu(TOPICS);
|
|
|
|
- topicsList
|
|
|
|
- .waitUntilScreenReady()
|
|
|
|
- .openTopic(topicName);
|
|
|
|
|
|
+ String filterName = randomAlphabetic(5);
|
|
|
|
+ navigateToTopicsAndOpenDetails("_schemas");
|
|
topicDetails
|
|
topicDetails
|
|
- .openDetailsTab(TopicDetails.TopicMenu.MESSAGES)
|
|
|
|
|
|
+ .openDetailsTab(MESSAGES)
|
|
.clickMessagesAddFiltersBtn()
|
|
.clickMessagesAddFiltersBtn()
|
|
.waitUntilAddFiltersMdlVisible();
|
|
.waitUntilAddFiltersMdlVisible();
|
|
- SoftAssertions softly = new SoftAssertions();
|
|
|
|
- topicDetails.getAllAddFilterModalVisibleElements().forEach(element ->
|
|
|
|
- softly.assertThat(element.is(Condition.visible))
|
|
|
|
- .as(element.getSearchCriteria() + " isVisible()").isTrue());
|
|
|
|
- topicDetails.getAllAddFilterModalEnabledElements().forEach(element ->
|
|
|
|
- softly.assertThat(element.is(Condition.enabled))
|
|
|
|
- .as(element.getSearchCriteria() + " isEnabled()").isTrue());
|
|
|
|
- topicDetails.getAllAddFilterModalDisabledElements().forEach(element ->
|
|
|
|
- softly.assertThat(element.is(Condition.enabled))
|
|
|
|
- .as(element.getSearchCriteria() + " isEnabled()").isFalse());
|
|
|
|
- softly.assertThat(topicDetails.isSaveThisFilterCheckBoxSelected()).as("isSaveThisFilterCheckBoxSelected()")
|
|
|
|
|
|
+ verifyElementsCondition(topicDetails.getAllAddFilterModalVisibleElements(), Condition.visible);
|
|
|
|
+ verifyElementsCondition(topicDetails.getAllAddFilterModalEnabledElements(), Condition.enabled);
|
|
|
|
+ verifyElementsCondition(topicDetails.getAllAddFilterModalDisabledElements(), Condition.disabled);
|
|
|
|
+ assertThat(topicDetails.isSaveThisFilterCheckBoxSelected()).as("isSaveThisFilterCheckBoxSelected()")
|
|
.isFalse();
|
|
.isFalse();
|
|
- softly.assertAll();
|
|
|
|
topicDetails
|
|
topicDetails
|
|
.setFilterCodeFieldAddFilterMdl(filterName);
|
|
.setFilterCodeFieldAddFilterMdl(filterName);
|
|
- assertThat(topicDetails.isAddFilterBtnAddFilterMdlEnabled()).as("isMessagesAddFilterTabAddFilterBtnEnabled()")
|
|
|
|
|
|
+ assertThat(topicDetails.isAddFilterBtnAddFilterMdlEnabled()).as("isAddFilterBtnAddFilterMdlEnabled()")
|
|
|
|
+ .isTrue();
|
|
|
|
+ topicDetails.clickAddFilterBtnAndCloseMdl(true);
|
|
|
|
+ assertThat(topicDetails.isActiveFilterVisible(filterName)).as("isActiveFilterVisible()")
|
|
|
|
+ .isTrue();
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ @DisplayName("Checking filter saving within Messages/Topic profile/Saved Filters")
|
|
|
|
+ @Suite(suiteId = SUITE_ID, title = SUITE_TITLE)
|
|
|
|
+ @AutomationStatus(status = Status.AUTOMATED)
|
|
|
|
+ @CaseId(13)
|
|
|
|
+ @Test
|
|
|
|
+ @Order(11)
|
|
|
|
+ void checkFilterSavingWithinSavedFilters() {
|
|
|
|
+ String displayName = randomAlphabetic(5);
|
|
|
|
+ navigateToTopicsAndOpenDetails("my_ksql_1ksql_processing_log");
|
|
|
|
+ topicDetails
|
|
|
|
+ .openDetailsTab(MESSAGES)
|
|
|
|
+ .clickMessagesAddFiltersBtn()
|
|
|
|
+ .waitUntilAddFiltersMdlVisible()
|
|
|
|
+ .setFilterCodeFieldAddFilterMdl(randomAlphabetic(4))
|
|
|
|
+ .selectSaveThisFilterCheckboxMdl(true)
|
|
|
|
+ .setDisplayNameFldAddFilterMdl(displayName);
|
|
|
|
+ assertThat(topicDetails.isAddFilterBtnAddFilterMdlEnabled()).as("isAddFilterBtnAddFilterMdlEnabled()")
|
|
.isTrue();
|
|
.isTrue();
|
|
- topicDetails.clickAddFilterBtnAddFilterMdl();
|
|
|
|
- assertThat(topicDetails.getFilterName()).as("isFilterNameVisible(filterName)")
|
|
|
|
- .isEqualTo(filterName);
|
|
|
|
|
|
+ topicDetails
|
|
|
|
+ .clickAddFilterBtnAndCloseMdl(false)
|
|
|
|
+ .openSavedFiltersListMdl();
|
|
|
|
+ assertThat(topicDetails.isFilterVisibleAtSavedFiltersMdl(displayName))
|
|
|
|
+ .as("isFilterVisibleAtSavedFiltersMdl()").isTrue();
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ @DisplayName("Checking applying saved filter within Topic/Messages")
|
|
|
|
+ @Suite(suiteId = SUITE_ID, title = SUITE_TITLE)
|
|
|
|
+ @AutomationStatus(status = Status.AUTOMATED)
|
|
|
|
+ @CaseId(14)
|
|
|
|
+ @Test
|
|
|
|
+ @Order(12)
|
|
|
|
+ void checkingApplyingSavedFilterWithinTopicMessages() {
|
|
|
|
+ String displayName = randomAlphabetic(5);
|
|
|
|
+ navigateToTopicsAndOpenDetails("my_ksql_1ksql_processing_log");
|
|
|
|
+ topicDetails
|
|
|
|
+ .openDetailsTab(MESSAGES)
|
|
|
|
+ .clickMessagesAddFiltersBtn()
|
|
|
|
+ .waitUntilAddFiltersMdlVisible()
|
|
|
|
+ .setFilterCodeFieldAddFilterMdl(randomAlphabetic(4))
|
|
|
|
+ .selectSaveThisFilterCheckboxMdl(true)
|
|
|
|
+ .setDisplayNameFldAddFilterMdl(displayName)
|
|
|
|
+ .clickAddFilterBtnAndCloseMdl(false)
|
|
|
|
+ .openSavedFiltersListMdl()
|
|
|
|
+ .selectFilterAtSavedFiltersMdl(displayName)
|
|
|
|
+ .clickSelectFilterBtnAtSavedFiltersMdl();
|
|
|
|
+ assertThat(topicDetails.isActiveFilterVisible(displayName))
|
|
|
|
+ .as("isActiveFilterVisible()").isTrue();
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ @DisplayName("Checking 'Show Internal Topics' toggle functionality within 'All Topics' page")
|
|
|
|
+ @Suite(suiteId = SUITE_ID, title = SUITE_TITLE)
|
|
|
|
+ @AutomationStatus(status = Status.AUTOMATED)
|
|
|
|
+ @CaseId(11)
|
|
|
|
+ @Test
|
|
|
|
+ @Order(13)
|
|
|
|
+ void checkShowInternalTopicsButtonFunctionality(){
|
|
|
|
+ navigateToTopics();
|
|
|
|
+ SoftAssertions softly = new SoftAssertions();
|
|
|
|
+ softly.assertThat(topicsList.isShowInternalRadioBtnSelected()).as("isInternalRadioBtnSelected()").isTrue();
|
|
|
|
+ softly.assertThat(topicsList.getInternalTopics()).as("getInternalTopics()").size().isGreaterThan(0);
|
|
|
|
+ softly.assertThat(topicsList.getNonInternalTopics()).as("getNonInternalTopics()").size().isGreaterThan(0);
|
|
|
|
+ softly.assertAll();
|
|
|
|
+ topicsList
|
|
|
|
+ .setShowInternalRadioButton(false);
|
|
|
|
+ softly.assertThat(topicsList.getInternalTopics()).as("getInternalTopics()").size().isEqualTo(0);
|
|
|
|
+ softly.assertThat(topicsList.getNonInternalTopics()).as("getNonInternalTopics()").size().isGreaterThan(0);
|
|
|
|
+ softly.assertAll();
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ @DisplayName("Checking Topics settings to make sure retention.bytes is right according to Max size on disk in GB selected value")
|
|
|
|
+ @Suite(suiteId = SUITE_ID, title = SUITE_TITLE)
|
|
|
|
+ @AutomationStatus(status = Status.AUTOMATED)
|
|
|
|
+ @CaseId(56)
|
|
|
|
+ @Test
|
|
|
|
+ void checkRetentionBytesAccordingToMaxSizeOnDisk(){
|
|
|
|
+ navigateToTopics();
|
|
|
|
+ topicsList
|
|
|
|
+ .clickAddTopicBtn();
|
|
|
|
+ topicCreateEditForm
|
|
|
|
+ .waitUntilScreenReady()
|
|
|
|
+ .setTopicName(TOPIC_TO_CHECK_SETTINGS.getName())
|
|
|
|
+ .setNumberOfPartitions(TOPIC_TO_CHECK_SETTINGS.getNumberOfPartitions())
|
|
|
|
+ .setMaxMessageBytes(TOPIC_TO_CHECK_SETTINGS.getMaxMessageBytes())
|
|
|
|
+ .clickCreateTopicBtn();
|
|
|
|
+ topicDetails
|
|
|
|
+ .waitUntilScreenReady();
|
|
|
|
+ TOPIC_LIST.add(TOPIC_TO_CHECK_SETTINGS);
|
|
|
|
+ topicDetails
|
|
|
|
+ .openDetailsTab(SETTINGS);
|
|
|
|
+ topicSettingsTab
|
|
|
|
+ .waitUntilScreenReady();
|
|
|
|
+ SoftAssertions softly = new SoftAssertions();
|
|
|
|
+ softly.assertThat(topicSettingsTab.getValueByKey("retention.bytes"))
|
|
|
|
+ .as("getValueOfKey(retention.bytes)").isEqualTo(TOPIC_TO_CHECK_SETTINGS.getMaxSizeOnDisk().getOptionValue());
|
|
|
|
+ softly.assertThat(topicSettingsTab.getValueByKey("max.message.bytes"))
|
|
|
|
+ .as("getValueOfKey(max.message.bytes)").isEqualTo(TOPIC_TO_CHECK_SETTINGS.getMaxMessageBytes());
|
|
|
|
+ softly.assertAll();
|
|
|
|
+ TOPIC_TO_CHECK_SETTINGS
|
|
|
|
+ .setMaxSizeOnDisk(SIZE_1_GB)
|
|
|
|
+ .setMaxMessageBytes("1000056");
|
|
|
|
+ topicDetails
|
|
|
|
+ .openDotMenu()
|
|
|
|
+ .clickEditSettingsMenu();
|
|
|
|
+ topicCreateEditForm
|
|
|
|
+ .waitUntilScreenReady()
|
|
|
|
+ .setMaxSizeOnDiskInGB(TOPIC_TO_CHECK_SETTINGS.getMaxSizeOnDisk())
|
|
|
|
+ .setMaxMessageBytes(TOPIC_TO_CHECK_SETTINGS.getMaxMessageBytes())
|
|
|
|
+ .clickCreateTopicBtn();
|
|
|
|
+ topicDetails
|
|
|
|
+ .waitUntilScreenReady()
|
|
|
|
+ .openDetailsTab(SETTINGS);
|
|
|
|
+ topicSettingsTab
|
|
|
|
+ .waitUntilScreenReady();
|
|
|
|
+ softly.assertThat(topicSettingsTab.getValueByKey("retention.bytes"))
|
|
|
|
+ .as("getValueOfKey(retention.bytes)").isEqualTo(TOPIC_TO_CHECK_SETTINGS.getMaxSizeOnDisk().getOptionValue());
|
|
|
|
+ softly.assertThat(topicSettingsTab.getValueByKey("max.message.bytes"))
|
|
|
|
+ .as("getValueOfKey(max.message.bytes)").isEqualTo(TOPIC_TO_CHECK_SETTINGS.getMaxMessageBytes());
|
|
|
|
+ softly.assertAll();
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ @DisplayName("TopicTests.recreateTopicFromTopicProfile : Recreate topic from topic profile")
|
|
|
|
+ @Suite(suiteId = SUITE_ID, title = SUITE_TITLE)
|
|
|
|
+ @AutomationStatus(status = Status.AUTOMATED)
|
|
|
|
+ @CaseId(247)
|
|
|
|
+ @Test
|
|
|
|
+ void recreateTopicFromTopicProfile(){
|
|
|
|
+ Topic topicToRecreate = new Topic()
|
|
|
|
+ .setName("topic-to-recreate-" + randomAlphabetic(5))
|
|
|
|
+ .setNumberOfPartitions(1);
|
|
|
|
+ navigateToTopics();
|
|
|
|
+ topicsList
|
|
|
|
+ .clickAddTopicBtn();
|
|
|
|
+ topicCreateEditForm
|
|
|
|
+ .waitUntilScreenReady()
|
|
|
|
+ .setTopicName(topicToRecreate.getName())
|
|
|
|
+ .setNumberOfPartitions(topicToRecreate.getNumberOfPartitions())
|
|
|
|
+ .clickCreateTopicBtn();
|
|
|
|
+ topicDetails
|
|
|
|
+ .waitUntilScreenReady();
|
|
|
|
+ TOPIC_LIST.add(topicToRecreate);
|
|
|
|
+ topicDetails
|
|
|
|
+ .openDotMenu()
|
|
|
|
+ .clickRecreateTopicMenu();
|
|
|
|
+ assertThat(topicDetails.isConfirmationMdlVisible()).as("isConfirmationMdlVisible()").isTrue();
|
|
|
|
+ topicDetails
|
|
|
|
+ .clickConfirmBtnMdl();
|
|
|
|
+ assertThat(topicDetails.isAlertWithMessageVisible(SUCCESS,
|
|
|
|
+ String.format("Topic %s successfully recreated!", topicToRecreate.getName())))
|
|
|
|
+ .as("isAlertWithMessageVisible()").isTrue();
|
|
}
|
|
}
|
|
|
|
|
|
@AfterAll
|
|
@AfterAll
|