|
@@ -18,7 +18,6 @@ public class TopicDetails {
|
|
|
|
|
|
protected SelenideElement loadingSpinner = $x("//*[contains(text(),'Loading')]");
|
|
|
protected SelenideElement dotMenuBtn = $$x("//button[@aria-label='Dropdown Toggle']").first();
|
|
|
- protected SelenideElement dotPartitionIdMenuBtn = $(By.cssSelector("button.sc-hOqruk.eYtACj"));
|
|
|
protected SelenideElement clearMessagesBtn = $x(("//div[contains(text(), 'Clear messages')]"));
|
|
|
protected SelenideElement overviewTab = $x("//a[contains(text(),'Overview')]");
|
|
|
protected SelenideElement messagesTab = $x("//a[contains(text(),'Messages')]");
|
|
@@ -40,21 +39,26 @@ public class TopicDetails {
|
|
|
}
|
|
|
|
|
|
@Step
|
|
|
- public TopicDetails openEditSettings() {
|
|
|
+ public TopicDetails openTopicMenu(TopicMenu menu) {
|
|
|
+ $(By.linkText(menu.getValue())).shouldBe(Condition.visible).click();
|
|
|
+ return this;
|
|
|
+ }
|
|
|
+
|
|
|
+ @Step
|
|
|
+ public TopicDetails openDotMenu() {
|
|
|
clickByJavaScript(dotMenuBtn);
|
|
|
- editSettingsTab.shouldBe(Condition.visible).click();
|
|
|
return this;
|
|
|
}
|
|
|
|
|
|
@Step
|
|
|
- public TopicDetails openTopicMenu(TopicMenu menu) {
|
|
|
- $(By.linkText(menu.getValue())).shouldBe(Condition.visible).click();
|
|
|
+ public TopicDetails clickEditSettingsMenu() {
|
|
|
+ editSettingsTab.shouldBe(Condition.visible).click();
|
|
|
return this;
|
|
|
}
|
|
|
|
|
|
@Step
|
|
|
- public TopicDetails openDotPartitionIdMenu() {
|
|
|
- dotPartitionIdMenuBtn.shouldBe(Condition.visible.because("dot menu invisible")).click();
|
|
|
+ public TopicDetails clickClearMessagesMenu() {
|
|
|
+ clearMessagesBtn.shouldBe(Condition.visible).click();
|
|
|
return this;
|
|
|
}
|
|
|
|
|
@@ -74,15 +78,13 @@ public class TopicDetails {
|
|
|
}
|
|
|
|
|
|
@Step
|
|
|
- public TopicDetails clickClearMessagesBtn() {
|
|
|
- clearMessagesBtn.shouldBe(Condition.visible.because("Clear Messages invisible")).click();
|
|
|
+ public TopicDetails clickDeleteTopicMenu() {
|
|
|
+ removeTopicBtn.shouldBe(Condition.visible).click();
|
|
|
return this;
|
|
|
}
|
|
|
|
|
|
@Step
|
|
|
- public TopicDetails deleteTopic() {
|
|
|
- clickByJavaScript(dotMenuBtn);
|
|
|
- removeTopicBtn.shouldBe(Condition.visible).click();
|
|
|
+ public TopicDetails clickConfirmDeleteBtn() {
|
|
|
confirmBtn.shouldBe(Condition.enabled).click();
|
|
|
confirmBtn.shouldBe(Condition.disappear);
|
|
|
return this;
|
|
@@ -93,6 +95,7 @@ public class TopicDetails {
|
|
|
clickByJavaScript(produceMessageBtn);
|
|
|
return this;
|
|
|
}
|
|
|
+
|
|
|
@Step
|
|
|
public TopicDetails openConsumerGroup(String consumerId) {
|
|
|
$x(String.format(consumerIdLocator, consumerId)).click();
|
|
@@ -135,26 +138,6 @@ public class TopicDetails {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- public enum DotPartitionIdMenu {
|
|
|
- CLEAR_MESSAGES("Clear messages");
|
|
|
-
|
|
|
-
|
|
|
- private final String value;
|
|
|
-
|
|
|
- DotPartitionIdMenu(String value) {
|
|
|
- this.value = value;
|
|
|
- }
|
|
|
-
|
|
|
- public String getValue() {
|
|
|
- return value;
|
|
|
- }
|
|
|
-
|
|
|
- @Override
|
|
|
- public String toString() {
|
|
|
- return "DotPartitionIdMenuItems{" + "value='" + value + '\'' + '}';
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
public enum TopicMenu {
|
|
|
OVERVIEW("Overview"),
|
|
|
MESSAGES("Messages"),
|