Skip to content

Commit 58eca23

Browse files
[e2e] Verify internal topics naming (#3555)
* Revert "Fix topic internal indication (#2846)" This reverts commit 2f2e19d. * Fix #3135 * Add a nullable annotation for internalTopicPrefix * Fix e2e tests * upd isInternal * upd checkShowInternalTopicsButton * add manual cases --------- Co-authored-by: Roman Zabaluev <[email protected]>
1 parent deb3dba commit 58eca23

File tree

3 files changed

+37
-10
lines changed

3 files changed

+37
-10
lines changed

kafka-ui-e2e-checks/src/main/java/com/provectus/kafka/ui/pages/topics/TopicsList.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -208,23 +208,23 @@ public TopicsList selectItem(boolean select) {
208208
return new TopicsList();
209209
}
210210

211+
private SelenideElement getNameElm() {
212+
return element.$x("./td[2]");
213+
}
214+
211215
@Step
212216
public boolean isInternal() {
213217
boolean internal = false;
214218
try {
215-
internal = element.$x("./td[2]/a/span").isDisplayed();
219+
internal = getNameElm().$x("./a/span").isDisplayed();
216220
} catch (Throwable ignored) {
217221
}
218222
return internal;
219223
}
220224

221-
private SelenideElement getNameElm() {
222-
return element.$x("./td[2]");
223-
}
224-
225225
@Step
226226
public String getName() {
227-
return getNameElm().getText().trim();
227+
return getNameElm().$x("./a").getAttribute("title");
228228
}
229229

230230
@Step

kafka-ui-e2e-checks/src/test/java/com/provectus/kafka/ui/manualSuite/backlog/SmokeBacklog.java

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,4 +58,18 @@ public void testCaseF() {
5858
@Test
5959
public void testCaseG() {
6060
}
61+
62+
@Automation(state = TO_BE_AUTOMATED)
63+
@Suite(id = 5)
64+
@QaseId(335)
65+
@Test
66+
public void testCaseH() {
67+
}
68+
69+
@Automation(state = TO_BE_AUTOMATED)
70+
@Suite(id = 5)
71+
@QaseId(336)
72+
@Test
73+
public void testCaseI() {
74+
}
6175
}

kafka-ui-e2e-checks/src/test/java/com/provectus/kafka/ui/smokeSuite/topics/TopicsTest.java

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -359,7 +359,7 @@ public void checkApplyingSavedFilterWithinTopicMessages() {
359359

360360
@QaseId(11)
361361
@Test(priority = 15)
362-
public void checkShowInternalTopicsButtonFunctionality() {
362+
public void checkShowInternalTopicsButton() {
363363
navigateToTopics();
364364
SoftAssert softly = new SoftAssert();
365365
softly.assertTrue(topicsList.isShowInternalRadioBtnSelected(), "isInternalRadioBtnSelected()");
@@ -373,8 +373,21 @@ public void checkShowInternalTopicsButtonFunctionality() {
373373
softly.assertAll();
374374
}
375375

376-
@QaseId(56)
376+
@QaseId(334)
377377
@Test(priority = 16)
378+
public void checkInternalTopicsNaming() {
379+
navigateToTopics();
380+
SoftAssert softly = new SoftAssert();
381+
topicsList
382+
.setShowInternalRadioButton(true)
383+
.getInternalTopics()
384+
.forEach(topic -> softly.assertTrue(topic.getName().startsWith("_"),
385+
String.format("'%s' starts with '_'", topic.getName())));
386+
softly.assertAll();
387+
}
388+
389+
@QaseId(56)
390+
@Test(priority = 17)
378391
public void checkRetentionBytesAccordingToMaxSizeOnDisk() {
379392
navigateToTopics();
380393
topicsList
@@ -422,7 +435,7 @@ public void checkRetentionBytesAccordingToMaxSizeOnDisk() {
422435
}
423436

424437
@QaseId(247)
425-
@Test(priority = 17)
438+
@Test(priority = 18)
426439
public void recreateTopicFromTopicProfile() {
427440
Topic topicToRecreate = new Topic()
428441
.setName("topic-to-recreate-" + randomAlphabetic(5))
@@ -450,7 +463,7 @@ public void recreateTopicFromTopicProfile() {
450463
}
451464

452465
@QaseId(8)
453-
@Test(priority = 18)
466+
@Test(priority = 19)
454467
public void checkCopyTopicPossibility() {
455468
Topic topicToCopy = new Topic()
456469
.setName("topic-to-copy-" + randomAlphabetic(5))

0 commit comments

Comments
 (0)