|
@@ -3,12 +3,8 @@ package com.provectus.kafka.ui.smokeSuite.topics;
|
|
import com.provectus.kafka.ui.BaseTest;
|
|
import com.provectus.kafka.ui.BaseTest;
|
|
import com.provectus.kafka.ui.models.Topic;
|
|
import com.provectus.kafka.ui.models.Topic;
|
|
import com.provectus.kafka.ui.pages.topics.TopicDetails;
|
|
import com.provectus.kafka.ui.pages.topics.TopicDetails;
|
|
-import com.provectus.kafka.ui.utilities.qaseUtils.annotations.AutomationStatus;
|
|
|
|
-import com.provectus.kafka.ui.utilities.qaseUtils.annotations.Suite;
|
|
|
|
-import com.provectus.kafka.ui.utilities.qaseUtils.enums.Status;
|
|
|
|
import io.qameta.allure.Issue;
|
|
import io.qameta.allure.Issue;
|
|
import io.qameta.allure.Step;
|
|
import io.qameta.allure.Step;
|
|
-import io.qase.api.annotation.CaseId;
|
|
|
|
import io.qase.api.annotation.QaseId;
|
|
import io.qase.api.annotation.QaseId;
|
|
import org.testng.Assert;
|
|
import org.testng.Assert;
|
|
import org.testng.annotations.AfterClass;
|
|
import org.testng.annotations.AfterClass;
|
|
@@ -31,8 +27,6 @@ import static org.apache.commons.lang3.RandomStringUtils.randomAlphabetic;
|
|
|
|
|
|
public class MessagesTest extends BaseTest {
|
|
public class MessagesTest extends BaseTest {
|
|
|
|
|
|
- private static final long SUITE_ID = 2;
|
|
|
|
- private static final String SUITE_TITLE = "Topics";
|
|
|
|
private static final Topic TOPIC_FOR_MESSAGES = new Topic()
|
|
private static final Topic TOPIC_FOR_MESSAGES = new Topic()
|
|
.setName("topic-with-clean-message-attribute-" + randomAlphabetic(5))
|
|
.setName("topic-with-clean-message-attribute-" + randomAlphabetic(5))
|
|
.setMessageKey(randomAlphabetic(5))
|
|
.setMessageKey(randomAlphabetic(5))
|
|
@@ -41,8 +35,8 @@ public class MessagesTest extends BaseTest {
|
|
.setName("topic-to-clear-and-purge-messages-attribute-" + randomAlphabetic(5))
|
|
.setName("topic-to-clear-and-purge-messages-attribute-" + randomAlphabetic(5))
|
|
.setMessageKey(randomAlphabetic(5))
|
|
.setMessageKey(randomAlphabetic(5))
|
|
.setMessageContent(randomAlphabetic(10));
|
|
.setMessageContent(randomAlphabetic(10));
|
|
- private static final Topic TOPIC_FOR_CHECKING_FILTERS = new Topic()
|
|
|
|
- .setName("topic-for-checking-filters-" + randomAlphabetic(5))
|
|
|
|
|
|
+ private static final Topic TOPIC_FOR_CHECK_FILTERS = new Topic()
|
|
|
|
+ .setName("topic-for-check-filters-" + randomAlphabetic(5))
|
|
.setMessageKey(randomAlphabetic(5))
|
|
.setMessageKey(randomAlphabetic(5))
|
|
.setMessageContent(randomAlphabetic(10));
|
|
.setMessageContent(randomAlphabetic(10));
|
|
private static final Topic TOPIC_TO_RECREATE = new Topic()
|
|
private static final Topic TOPIC_TO_RECREATE = new Topic()
|
|
@@ -50,25 +44,23 @@ public class MessagesTest extends BaseTest {
|
|
.setMessageKey(randomAlphabetic(5))
|
|
.setMessageKey(randomAlphabetic(5))
|
|
.setMessageContent(randomAlphabetic(10));
|
|
.setMessageContent(randomAlphabetic(10));
|
|
private static final Topic TOPIC_FOR_CHECK_MESSAGES_COUNT = new Topic()
|
|
private static final Topic TOPIC_FOR_CHECK_MESSAGES_COUNT = new Topic()
|
|
- .setName("topic-for-check-messages-count" + randomAlphabetic(5))
|
|
|
|
- .setMessageKey(randomAlphabetic(5))
|
|
|
|
- .setMessageContent(randomAlphabetic(10));
|
|
|
|
|
|
+ .setName("topic-for-check-messages-count" + randomAlphabetic(5))
|
|
|
|
+ .setMessageKey(randomAlphabetic(5))
|
|
|
|
+ .setMessageContent(randomAlphabetic(10));
|
|
private static final List<Topic> TOPIC_LIST = new ArrayList<>();
|
|
private static final List<Topic> TOPIC_LIST = new ArrayList<>();
|
|
|
|
|
|
@BeforeClass(alwaysRun = true)
|
|
@BeforeClass(alwaysRun = true)
|
|
public void beforeClass() {
|
|
public void beforeClass() {
|
|
- TOPIC_LIST.addAll(List.of(TOPIC_FOR_MESSAGES, TOPIC_FOR_CHECKING_FILTERS, TOPIC_TO_CLEAR_AND_PURGE_MESSAGES,
|
|
|
|
|
|
+ TOPIC_LIST.addAll(List.of(TOPIC_FOR_MESSAGES, TOPIC_FOR_CHECK_FILTERS, TOPIC_TO_CLEAR_AND_PURGE_MESSAGES,
|
|
TOPIC_TO_RECREATE, TOPIC_FOR_CHECK_MESSAGES_COUNT));
|
|
TOPIC_TO_RECREATE, TOPIC_FOR_CHECK_MESSAGES_COUNT));
|
|
TOPIC_LIST.forEach(topic -> apiService.createTopic(topic.getName()));
|
|
TOPIC_LIST.forEach(topic -> apiService.createTopic(topic.getName()));
|
|
- IntStream.range(1, 3).forEach(i -> apiService.sendMessage(TOPIC_FOR_CHECKING_FILTERS));
|
|
|
|
|
|
+ IntStream.range(1, 3).forEach(i -> apiService.sendMessage(TOPIC_FOR_CHECK_FILTERS));
|
|
waitUntilNewMinuteStarted();
|
|
waitUntilNewMinuteStarted();
|
|
- IntStream.range(1, 3).forEach(i -> apiService.sendMessage(TOPIC_FOR_CHECKING_FILTERS));
|
|
|
|
|
|
+ IntStream.range(1, 3).forEach(i -> apiService.sendMessage(TOPIC_FOR_CHECK_FILTERS));
|
|
IntStream.range(1, 110).forEach(i -> apiService.sendMessage(TOPIC_FOR_CHECK_MESSAGES_COUNT));
|
|
IntStream.range(1, 110).forEach(i -> apiService.sendMessage(TOPIC_FOR_CHECK_MESSAGES_COUNT));
|
|
}
|
|
}
|
|
|
|
|
|
- @Suite(suiteId = SUITE_ID, title = SUITE_TITLE)
|
|
|
|
- @AutomationStatus(status = Status.AUTOMATED)
|
|
|
|
- @CaseId(222)
|
|
|
|
|
|
+ @QaseId(222)
|
|
@Test(priority = 1)
|
|
@Test(priority = 1)
|
|
public void produceMessage() {
|
|
public void produceMessage() {
|
|
navigateToTopicsAndOpenDetails(TOPIC_FOR_MESSAGES.getName());
|
|
navigateToTopicsAndOpenDetails(TOPIC_FOR_MESSAGES.getName());
|
|
@@ -85,9 +77,7 @@ public class MessagesTest extends BaseTest {
|
|
|
|
|
|
@Ignore
|
|
@Ignore
|
|
@Issue("https://github.com/provectus/kafka-ui/issues/2778")
|
|
@Issue("https://github.com/provectus/kafka-ui/issues/2778")
|
|
- @Suite(suiteId = SUITE_ID, title = SUITE_TITLE)
|
|
|
|
- @AutomationStatus(status = Status.AUTOMATED)
|
|
|
|
- @CaseId(19)
|
|
|
|
|
|
+ @QaseId(19)
|
|
@Test(priority = 2)
|
|
@Test(priority = 2)
|
|
public void clearMessage() {
|
|
public void clearMessage() {
|
|
navigateToTopicsAndOpenDetails(TOPIC_FOR_MESSAGES.getName());
|
|
navigateToTopicsAndOpenDetails(TOPIC_FOR_MESSAGES.getName());
|
|
@@ -103,9 +93,7 @@ public class MessagesTest extends BaseTest {
|
|
Assert.assertEquals(0, topicDetails.getMessageCountAmount(), "getMessageCountAmount()");
|
|
Assert.assertEquals(0, topicDetails.getMessageCountAmount(), "getMessageCountAmount()");
|
|
}
|
|
}
|
|
|
|
|
|
- @Suite(suiteId = SUITE_ID, title = SUITE_TITLE)
|
|
|
|
- @AutomationStatus(status = Status.AUTOMATED)
|
|
|
|
- @CaseId(239)
|
|
|
|
|
|
+ @QaseId(239)
|
|
@Test(priority = 3)
|
|
@Test(priority = 3)
|
|
public void checkClearTopicMessage() {
|
|
public void checkClearTopicMessage() {
|
|
navigateToTopicsAndOpenDetails(TOPIC_TO_CLEAR_AND_PURGE_MESSAGES.getName());
|
|
navigateToTopicsAndOpenDetails(TOPIC_TO_CLEAR_AND_PURGE_MESSAGES.getName());
|
|
@@ -128,9 +116,7 @@ public class MessagesTest extends BaseTest {
|
|
softly.assertAll();
|
|
softly.assertAll();
|
|
}
|
|
}
|
|
|
|
|
|
- @Suite(suiteId = SUITE_ID, title = SUITE_TITLE)
|
|
|
|
- @AutomationStatus(status = Status.AUTOMATED)
|
|
|
|
- @CaseId(10)
|
|
|
|
|
|
+ @QaseId(10)
|
|
@Test(priority = 4)
|
|
@Test(priority = 4)
|
|
public void checkPurgeMessagePossibility() {
|
|
public void checkPurgeMessagePossibility() {
|
|
navigateToTopics();
|
|
navigateToTopics();
|
|
@@ -163,12 +149,10 @@ public class MessagesTest extends BaseTest {
|
|
|
|
|
|
@Ignore
|
|
@Ignore
|
|
@Issue("https://github.com/provectus/kafka-ui/issues/2819")
|
|
@Issue("https://github.com/provectus/kafka-ui/issues/2819")
|
|
- @Suite(suiteId = SUITE_ID, title = SUITE_TITLE)
|
|
|
|
- @AutomationStatus(status = Status.AUTOMATED)
|
|
|
|
- @CaseId(21)
|
|
|
|
|
|
+ @QaseId(21)
|
|
@Test(priority = 5)
|
|
@Test(priority = 5)
|
|
public void copyMessageFromTopicProfile() {
|
|
public void copyMessageFromTopicProfile() {
|
|
- navigateToTopicsAndOpenDetails(TOPIC_FOR_CHECKING_FILTERS.getName());
|
|
|
|
|
|
+ navigateToTopicsAndOpenDetails(TOPIC_FOR_CHECK_FILTERS.getName());
|
|
topicDetails
|
|
topicDetails
|
|
.openDetailsTab(MESSAGES)
|
|
.openDetailsTab(MESSAGES)
|
|
.getRandomMessage()
|
|
.getRandomMessage()
|
|
@@ -180,12 +164,10 @@ public class MessagesTest extends BaseTest {
|
|
|
|
|
|
@Ignore
|
|
@Ignore
|
|
@Issue("https://github.com/provectus/kafka-ui/issues/2394")
|
|
@Issue("https://github.com/provectus/kafka-ui/issues/2394")
|
|
- @Suite(suiteId = SUITE_ID, title = SUITE_TITLE)
|
|
|
|
- @AutomationStatus(status = Status.AUTOMATED)
|
|
|
|
- @CaseId(15)
|
|
|
|
|
|
+ @QaseId(15)
|
|
@Test(priority = 6)
|
|
@Test(priority = 6)
|
|
- public void checkingMessageFilteringByOffset() {
|
|
|
|
- navigateToTopicsAndOpenDetails(TOPIC_FOR_CHECKING_FILTERS.getName());
|
|
|
|
|
|
+ public void checkMessageFilteringByOffset() {
|
|
|
|
+ navigateToTopicsAndOpenDetails(TOPIC_FOR_CHECK_FILTERS.getName());
|
|
topicDetails
|
|
topicDetails
|
|
.openDetailsTab(MESSAGES);
|
|
.openDetailsTab(MESSAGES);
|
|
TopicDetails.MessageGridItem secondMessage = topicDetails.getMessageByOffset(1);
|
|
TopicDetails.MessageGridItem secondMessage = topicDetails.getMessageByOffset(1);
|
|
@@ -204,12 +186,10 @@ public class MessagesTest extends BaseTest {
|
|
@Ignore
|
|
@Ignore
|
|
@Issue("https://github.com/provectus/kafka-ui/issues/3215")
|
|
@Issue("https://github.com/provectus/kafka-ui/issues/3215")
|
|
@Issue("https://github.com/provectus/kafka-ui/issues/2345")
|
|
@Issue("https://github.com/provectus/kafka-ui/issues/2345")
|
|
- @Suite(suiteId = SUITE_ID, title = SUITE_TITLE)
|
|
|
|
- @AutomationStatus(status = Status.AUTOMATED)
|
|
|
|
- @CaseId(16)
|
|
|
|
|
|
+ @QaseId(16)
|
|
@Test(priority = 7)
|
|
@Test(priority = 7)
|
|
- public void checkingMessageFilteringByTimestamp() {
|
|
|
|
- navigateToTopicsAndOpenDetails(TOPIC_FOR_CHECKING_FILTERS.getName());
|
|
|
|
|
|
+ public void checkMessageFilteringByTimestamp() {
|
|
|
|
+ navigateToTopicsAndOpenDetails(TOPIC_FOR_CHECK_FILTERS.getName());
|
|
topicDetails
|
|
topicDetails
|
|
.openDetailsTab(MESSAGES);
|
|
.openDetailsTab(MESSAGES);
|
|
LocalDateTime firstTimestamp = topicDetails.getMessageByOffset(0).getTimestamp();
|
|
LocalDateTime firstTimestamp = topicDetails.getMessageByOffset(0).getTimestamp();
|
|
@@ -233,12 +213,10 @@ public class MessagesTest extends BaseTest {
|
|
|
|
|
|
@Ignore
|
|
@Ignore
|
|
@Issue("https://github.com/provectus/kafka-ui/issues/2778")
|
|
@Issue("https://github.com/provectus/kafka-ui/issues/2778")
|
|
- @Suite(suiteId = SUITE_ID, title = SUITE_TITLE)
|
|
|
|
- @AutomationStatus(status = Status.AUTOMATED)
|
|
|
|
- @CaseId(246)
|
|
|
|
|
|
+ @QaseId(246)
|
|
@Test(priority = 8)
|
|
@Test(priority = 8)
|
|
public void checkClearTopicMessageFromOverviewTab() {
|
|
public void checkClearTopicMessageFromOverviewTab() {
|
|
- navigateToTopicsAndOpenDetails(TOPIC_FOR_CHECKING_FILTERS.getName());
|
|
|
|
|
|
+ navigateToTopicsAndOpenDetails(TOPIC_FOR_CHECK_FILTERS.getName());
|
|
topicDetails
|
|
topicDetails
|
|
.openDetailsTab(OVERVIEW)
|
|
.openDetailsTab(OVERVIEW)
|
|
.openDotMenu()
|
|
.openDotMenu()
|
|
@@ -246,16 +224,14 @@ public class MessagesTest extends BaseTest {
|
|
.clickConfirmBtnMdl();
|
|
.clickConfirmBtnMdl();
|
|
SoftAssert softly = new SoftAssert();
|
|
SoftAssert softly = new SoftAssert();
|
|
softly.assertTrue(topicDetails.isAlertWithMessageVisible(SUCCESS,
|
|
softly.assertTrue(topicDetails.isAlertWithMessageVisible(SUCCESS,
|
|
- String.format("%s messages have been successfully cleared!", TOPIC_FOR_CHECKING_FILTERS.getName())),
|
|
|
|
|
|
+ String.format("%s messages have been successfully cleared!", TOPIC_FOR_CHECK_FILTERS.getName())),
|
|
"isAlertWithMessageVisible()");
|
|
"isAlertWithMessageVisible()");
|
|
softly.assertEquals(topicDetails.getMessageCountAmount(), 0,
|
|
softly.assertEquals(topicDetails.getMessageCountAmount(), 0,
|
|
"getMessageCountAmount()= " + topicDetails.getMessageCountAmount());
|
|
"getMessageCountAmount()= " + topicDetails.getMessageCountAmount());
|
|
softly.assertAll();
|
|
softly.assertAll();
|
|
}
|
|
}
|
|
|
|
|
|
- @Suite(suiteId = SUITE_ID, title = SUITE_TITLE)
|
|
|
|
- @AutomationStatus(status = Status.AUTOMATED)
|
|
|
|
- @CaseId(240)
|
|
|
|
|
|
+ @QaseId(240)
|
|
@Test(priority = 9)
|
|
@Test(priority = 9)
|
|
public void checkRecreateTopic() {
|
|
public void checkRecreateTopic() {
|
|
navigateToTopicsAndOpenDetails(TOPIC_TO_RECREATE.getName());
|
|
navigateToTopicsAndOpenDetails(TOPIC_TO_RECREATE.getName());
|
|
@@ -293,7 +269,7 @@ public class MessagesTest extends BaseTest {
|
|
softly.assertTrue(topicDetails.isNextButtonEnabled(), "isNextButtonEnabled()");
|
|
softly.assertTrue(topicDetails.isNextButtonEnabled(), "isNextButtonEnabled()");
|
|
softly.assertAll();
|
|
softly.assertAll();
|
|
int lastOffsetOnPage = topicDetails.getAllMessages()
|
|
int lastOffsetOnPage = topicDetails.getAllMessages()
|
|
- .get(messagesPerPage -1).getOffset();
|
|
|
|
|
|
+ .get(messagesPerPage - 1).getOffset();
|
|
topicDetails
|
|
topicDetails
|
|
.clickNextButton();
|
|
.clickNextButton();
|
|
softly.assertEquals(topicDetails.getAllMessages().stream().findFirst().orElseThrow().getOffset(),
|
|
softly.assertEquals(topicDetails.getAllMessages().stream().findFirst().orElseThrow().getOffset(),
|