Co-authored-by: Vlad Senyuta <66071557+VladSenyuta@users.noreply.github.com>
This commit is contained in:
parent
a665fb4d83
commit
a5f539c62a
11 changed files with 58 additions and 37 deletions
|
@ -33,10 +33,11 @@ public class MainPage {
|
||||||
}
|
}
|
||||||
|
|
||||||
@SneakyThrows
|
@SneakyThrows
|
||||||
|
@Step
|
||||||
public void topicIsVisible(String topicName) {
|
public void topicIsVisible(String topicName) {
|
||||||
new TopicsList().isTopicVisible(topicName);
|
new TopicsList().isTopicVisible(topicName);
|
||||||
}
|
}
|
||||||
|
@Step
|
||||||
public void topicIsNotVisible(String topicName){
|
public void topicIsNotVisible(String topicName){
|
||||||
new TopicsList().isTopicNotVisible(topicName);
|
new TopicsList().isTopicNotVisible(topicName);
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,6 +5,7 @@ import com.provectus.kafka.ui.pages.connector.ConnectorsView;
|
||||||
import com.provectus.kafka.ui.pages.schema.SchemaRegistryList;
|
import com.provectus.kafka.ui.pages.schema.SchemaRegistryList;
|
||||||
import com.provectus.kafka.ui.pages.topic.TopicView;
|
import com.provectus.kafka.ui.pages.topic.TopicView;
|
||||||
import com.provectus.kafka.ui.pages.topic.TopicsList;
|
import com.provectus.kafka.ui.pages.topic.TopicsList;
|
||||||
|
import io.qameta.allure.Step;
|
||||||
|
|
||||||
public class Pages {
|
public class Pages {
|
||||||
|
|
||||||
|
@ -18,26 +19,32 @@ public class Pages {
|
||||||
public ConnectorsView connectorsView = new ConnectorsView();
|
public ConnectorsView connectorsView = new ConnectorsView();
|
||||||
public SchemaRegistryList schemaRegistry = new SchemaRegistryList();
|
public SchemaRegistryList schemaRegistry = new SchemaRegistryList();
|
||||||
|
|
||||||
|
@Step
|
||||||
public MainPage open() {
|
public MainPage open() {
|
||||||
return openMainPage();
|
return openMainPage();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Step
|
||||||
public MainPage openMainPage() {
|
public MainPage openMainPage() {
|
||||||
return mainPage.goTo();
|
return mainPage.goTo();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Step
|
||||||
public TopicsList openTopicsList(String clusterName) {
|
public TopicsList openTopicsList(String clusterName) {
|
||||||
return topicsList.goTo(clusterName);
|
return topicsList.goTo(clusterName);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Step
|
||||||
public TopicView openTopicView(String clusterName, String topicName) {
|
public TopicView openTopicView(String clusterName, String topicName) {
|
||||||
return topicView.goTo(clusterName, topicName);
|
return topicView.goTo(clusterName, topicName);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Step
|
||||||
public ConnectorsList openConnectorsList(String clusterName) {
|
public ConnectorsList openConnectorsList(String clusterName) {
|
||||||
return connectorsList.goTo(clusterName);
|
return connectorsList.goTo(clusterName);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Step
|
||||||
public ConnectorsView openConnectorsView(String clusterName, String connectorName) {
|
public ConnectorsView openConnectorsView(String clusterName, String connectorName) {
|
||||||
return connectorsView.goTo(clusterName, connectorName);
|
return connectorsView.goTo(clusterName, connectorName);
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,6 +3,7 @@ package com.provectus.kafka.ui.pages;
|
||||||
import com.codeborne.selenide.Condition;
|
import com.codeborne.selenide.Condition;
|
||||||
import com.codeborne.selenide.SelenideElement;
|
import com.codeborne.selenide.SelenideElement;
|
||||||
import com.provectus.kafka.ui.pages.topic.TopicView;
|
import com.provectus.kafka.ui.pages.topic.TopicView;
|
||||||
|
import io.qameta.allure.Step;
|
||||||
import org.openqa.selenium.By;
|
import org.openqa.selenium.By;
|
||||||
import org.openqa.selenium.Keys;
|
import org.openqa.selenium.Keys;
|
||||||
import org.openqa.selenium.support.ui.ExpectedConditions;
|
import org.openqa.selenium.support.ui.ExpectedConditions;
|
||||||
|
@ -16,26 +17,26 @@ public class ProduceMessagePage{
|
||||||
private final SelenideElement contentField = $(By.xpath("//div[@id = 'content']/textarea"));
|
private final SelenideElement contentField = $(By.xpath("//div[@id = 'content']/textarea"));
|
||||||
private final SelenideElement headersField = $(By.xpath("//div[@id = 'headers']/textarea"));
|
private final SelenideElement headersField = $(By.xpath("//div[@id = 'headers']/textarea"));
|
||||||
private final SelenideElement sendBtn = $(By.xpath("//button[@type = 'submit']"));
|
private final SelenideElement sendBtn = $(By.xpath("//button[@type = 'submit']"));
|
||||||
|
@Step
|
||||||
public ProduceMessagePage setKeyField(String value) {
|
public ProduceMessagePage setKeyField(String value) {
|
||||||
Wait().until(ExpectedConditions.urlContains("message"));
|
Wait().until(ExpectedConditions.urlContains("message"));
|
||||||
keyField.sendKeys(Keys.chord(Keys.DELETE));
|
keyField.sendKeys(Keys.chord(Keys.DELETE));
|
||||||
keyField.setValue(value);
|
keyField.setValue(value);
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
@Step
|
||||||
public ProduceMessagePage setContentFiled(String value) {
|
public ProduceMessagePage setContentFiled(String value) {
|
||||||
Wait().until(ExpectedConditions.urlContains("message"));
|
Wait().until(ExpectedConditions.urlContains("message"));
|
||||||
contentField.sendKeys(Keys.DELETE);
|
contentField.sendKeys(Keys.DELETE);
|
||||||
contentField.setValue(value);
|
contentField.setValue(value);
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
@Step
|
||||||
public ProduceMessagePage setHeaderFiled(String value) {
|
public ProduceMessagePage setHeaderFiled(String value) {
|
||||||
headersField.setValue(value);
|
headersField.setValue(value);
|
||||||
return new ProduceMessagePage();
|
return new ProduceMessagePage();
|
||||||
}
|
}
|
||||||
|
@Step
|
||||||
public TopicView submitProduceMessage() {
|
public TopicView submitProduceMessage() {
|
||||||
sendBtn.shouldBe(Condition.visible).click();
|
sendBtn.shouldBe(Condition.visible).click();
|
||||||
return new TopicView();
|
return new TopicView();
|
||||||
|
|
|
@ -36,12 +36,14 @@ public class ConnectorsList {
|
||||||
}
|
}
|
||||||
|
|
||||||
@SneakyThrows
|
@SneakyThrows
|
||||||
|
@Step
|
||||||
public ConnectorsList openConnector(String connectorName) {
|
public ConnectorsList openConnector(String connectorName) {
|
||||||
$(By.linkText(connectorName)).click();
|
$(By.linkText(connectorName)).click();
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
@SneakyThrows
|
@SneakyThrows
|
||||||
|
@Step
|
||||||
public ConnectorsList isNotVisible(String connectorName) {
|
public ConnectorsList isNotVisible(String connectorName) {
|
||||||
$(By.xpath("//table")).shouldBe(Condition.visible);
|
$(By.xpath("//table")).shouldBe(Condition.visible);
|
||||||
$x("//tbody//td[1]//a[text()='" + connectorName + "']").shouldBe(Condition.not(Condition.visible));
|
$x("//tbody//td[1]//a[text()='" + connectorName + "']").shouldBe(Condition.not(Condition.visible));
|
||||||
|
@ -54,7 +56,7 @@ public class ConnectorsList {
|
||||||
$$(By.linkText(topicName));
|
$$(By.linkText(topicName));
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
@Step
|
||||||
public ConnectorsList connectorIsUpdatedInList(String connectorName, String topicName) {
|
public ConnectorsList connectorIsUpdatedInList(String connectorName, String topicName) {
|
||||||
$(By.xpath(String.format("//a[text() = '%s']", connectorName))).shouldBe(Condition.visible);
|
$(By.xpath(String.format("//a[text() = '%s']", connectorName))).shouldBe(Condition.visible);
|
||||||
By.xpath(String.format("//a[text() = '%s']", topicName)).refreshUntil(Condition.visible);
|
By.xpath(String.format("//a[text() = '%s']", topicName)).refreshUntil(Condition.visible);
|
||||||
|
|
|
@ -2,6 +2,7 @@ package com.provectus.kafka.ui.pages.schema;
|
||||||
|
|
||||||
import com.codeborne.selenide.SelenideElement;
|
import com.codeborne.selenide.SelenideElement;
|
||||||
import com.provectus.kafka.ui.utils.BrowserUtils;
|
import com.provectus.kafka.ui.utils.BrowserUtils;
|
||||||
|
import io.qameta.allure.Step;
|
||||||
import org.openqa.selenium.By;
|
import org.openqa.selenium.By;
|
||||||
|
|
||||||
import static com.codeborne.selenide.Selenide.$;
|
import static com.codeborne.selenide.Selenide.$;
|
||||||
|
@ -12,23 +13,23 @@ public class SchemaCreateView {
|
||||||
private final SelenideElement subjectName = $(By.xpath("//input[@name='subject']"));
|
private final SelenideElement subjectName = $(By.xpath("//input[@name='subject']"));
|
||||||
private final SelenideElement schemaField = $(By.xpath("//textarea[@name='schema']"));
|
private final SelenideElement schemaField = $(By.xpath("//textarea[@name='schema']"));
|
||||||
private final SelenideElement submitSchemaButton = $(By.xpath("//button[@type='submit']"));
|
private final SelenideElement submitSchemaButton = $(By.xpath("//button[@type='submit']"));
|
||||||
|
@Step
|
||||||
public SchemaCreateView selectSchemaTypeFromDropdown(SchemaType schemaType) {
|
public SchemaCreateView selectSchemaTypeFromDropdown(SchemaType schemaType) {
|
||||||
$("ul[role='listbox']").click();
|
$("ul[role='listbox']").click();
|
||||||
$x("//li[text()='" + schemaType.getValue() + "']").click();
|
$x("//li[text()='" + schemaType.getValue() + "']").click();
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
@Step
|
||||||
public SchemaView clickSubmit() {
|
public SchemaView clickSubmit() {
|
||||||
BrowserUtils.javaExecutorClick(submitSchemaButton);
|
BrowserUtils.javaExecutorClick(submitSchemaButton);
|
||||||
return new SchemaView();
|
return new SchemaView();
|
||||||
}
|
}
|
||||||
|
@Step
|
||||||
public SchemaCreateView setSubjectName(String name) {
|
public SchemaCreateView setSubjectName(String name) {
|
||||||
subjectName.setValue(name);
|
subjectName.setValue(name);
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
@Step
|
||||||
public SchemaCreateView setSchemaField(String text) {
|
public SchemaCreateView setSchemaField(String text) {
|
||||||
schemaField.setValue(text);
|
schemaField.setValue(text);
|
||||||
return this;
|
return this;
|
||||||
|
|
|
@ -16,19 +16,19 @@ public class SchemaEditView {
|
||||||
|
|
||||||
SelenideElement newSchemaTextArea = $("#newSchema [wrap]");
|
SelenideElement newSchemaTextArea = $("#newSchema [wrap]");
|
||||||
|
|
||||||
|
@Step
|
||||||
public SchemaEditView selectSchemaTypeFromDropdown(SchemaCreateView.SchemaType schemaType) {
|
public SchemaEditView selectSchemaTypeFromDropdown(SchemaCreateView.SchemaType schemaType) {
|
||||||
$x("//ul[@name='schemaType']").click();
|
$x("//ul[@name='schemaType']").click();
|
||||||
$x("//li[text()='" + schemaType.getValue() + "']").click();
|
$x("//li[text()='" + schemaType.getValue() + "']").click();
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
@Step
|
||||||
public SchemaEditView selectCompatibilityLevelFromDropdown(CompatibilityLevel.CompatibilityEnum level) {
|
public SchemaEditView selectCompatibilityLevelFromDropdown(CompatibilityLevel.CompatibilityEnum level) {
|
||||||
$x("//ul[@name='compatibilityLevel']").click();
|
$x("//ul[@name='compatibilityLevel']").click();
|
||||||
$x("//li[text()='" + level.getValue() + "']").click();
|
$x("//li[text()='" + level.getValue() + "']").click();
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
@Step
|
||||||
public SchemaView clickSubmit() {
|
public SchemaView clickSubmit() {
|
||||||
BrowserUtils.javaExecutorClick($(By.xpath("//button[@type='submit']")));
|
BrowserUtils.javaExecutorClick($(By.xpath("//button[@type='submit']")));
|
||||||
return new SchemaView();
|
return new SchemaView();
|
||||||
|
@ -43,7 +43,7 @@ public class SchemaEditView {
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Step
|
||||||
public SchemaRegistryList removeSchema() {
|
public SchemaRegistryList removeSchema() {
|
||||||
$(By.xpath("//*[contains(text(),'Remove')]")).click();
|
$(By.xpath("//*[contains(text(),'Remove')]")).click();
|
||||||
$(By.xpath("//*[text()='Confirm']")).shouldBe(Condition.visible).click();
|
$(By.xpath("//*[text()='Confirm']")).shouldBe(Condition.visible).click();
|
||||||
|
|
|
@ -12,18 +12,19 @@ import static com.codeborne.selenide.Selenide.*;
|
||||||
public class SchemaRegistryList {
|
public class SchemaRegistryList {
|
||||||
|
|
||||||
private final SelenideElement schemaButton = $(By.xpath("//*[contains(text(),'Create Schema')]"));
|
private final SelenideElement schemaButton = $(By.xpath("//*[contains(text(),'Create Schema')]"));
|
||||||
|
@Step
|
||||||
public SchemaCreateView clickCreateSchema() {
|
public SchemaCreateView clickCreateSchema() {
|
||||||
BrowserUtils.javaExecutorClick(schemaButton);
|
BrowserUtils.javaExecutorClick(schemaButton);
|
||||||
return new SchemaCreateView();
|
return new SchemaCreateView();
|
||||||
}
|
}
|
||||||
|
@Step
|
||||||
public SchemaView openSchema(String schemaName) {
|
public SchemaView openSchema(String schemaName) {
|
||||||
$(By.xpath("//*[contains(text(),'" + schemaName + "')]")).click();
|
$(By.xpath("//*[contains(text(),'" + schemaName + "')]")).click();
|
||||||
return new SchemaView();
|
return new SchemaView();
|
||||||
}
|
}
|
||||||
|
|
||||||
@SneakyThrows
|
@SneakyThrows
|
||||||
|
@Step
|
||||||
public SchemaRegistryList isNotVisible(String schemaName) {
|
public SchemaRegistryList isNotVisible(String schemaName) {
|
||||||
$x(String.format("//*[contains(text(),'%s')]",schemaName)).shouldNotBe(Condition.visible);
|
$x(String.format("//*[contains(text(),'%s')]",schemaName)).shouldNotBe(Condition.visible);
|
||||||
return this;
|
return this;
|
||||||
|
|
|
@ -28,7 +28,7 @@ public class SchemaView {
|
||||||
$x("//button[text()= 'Edit Schema']").click();
|
$x("//button[text()= 'Edit Schema']").click();
|
||||||
return new SchemaEditView();
|
return new SchemaEditView();
|
||||||
}
|
}
|
||||||
|
@Step
|
||||||
public SchemaRegistryList removeSchema() {
|
public SchemaRegistryList removeSchema() {
|
||||||
BrowserUtils.javaExecutorClick($(".dropdown.is-right button"));
|
BrowserUtils.javaExecutorClick($(".dropdown.is-right button"));
|
||||||
$(By.xpath("//*[contains(text(),'Remove')]")).click();
|
$(By.xpath("//*[contains(text(),'Remove')]")).click();
|
||||||
|
|
|
@ -4,6 +4,7 @@ import com.codeborne.selenide.ClickOptions;
|
||||||
import com.codeborne.selenide.Condition;
|
import com.codeborne.selenide.Condition;
|
||||||
import com.codeborne.selenide.ElementsCollection;
|
import com.codeborne.selenide.ElementsCollection;
|
||||||
import com.codeborne.selenide.SelenideElement;
|
import com.codeborne.selenide.SelenideElement;
|
||||||
|
import io.qameta.allure.Step;
|
||||||
import org.openqa.selenium.By;
|
import org.openqa.selenium.By;
|
||||||
import com.provectus.kafka.ui.utils.BrowserUtils;
|
import com.provectus.kafka.ui.utils.BrowserUtils;
|
||||||
|
|
||||||
|
@ -14,43 +15,43 @@ public class TopicCreateEditSettingsView {
|
||||||
|
|
||||||
private final SelenideElement timeToRetain = $(By.cssSelector("input#timeToRetain"));
|
private final SelenideElement timeToRetain = $(By.cssSelector("input#timeToRetain"));
|
||||||
private final SelenideElement maxMessageBytes = $(By.name("maxMessageBytes"));
|
private final SelenideElement maxMessageBytes = $(By.name("maxMessageBytes"));
|
||||||
|
@Step
|
||||||
public TopicCreateEditSettingsView setTopicName(String topicName) {
|
public TopicCreateEditSettingsView setTopicName(String topicName) {
|
||||||
$("input#topicFormName").setValue(topicName);
|
$("input#topicFormName").setValue(topicName);
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
@Step
|
||||||
public TopicCreateEditSettingsView setMinInsyncReplicas(Integer minInsyncReplicas) {
|
public TopicCreateEditSettingsView setMinInsyncReplicas(Integer minInsyncReplicas) {
|
||||||
$("input[name=minInsyncReplicas]").setValue(minInsyncReplicas.toString());
|
$("input[name=minInSyncReplicas]").setValue(minInsyncReplicas.toString());
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
@Step
|
||||||
public TopicCreateEditSettingsView setTimeToRetainDataInMs(Long ms) {
|
public TopicCreateEditSettingsView setTimeToRetainDataInMs(Long ms) {
|
||||||
timeToRetain.setValue(ms.toString());
|
timeToRetain.setValue(ms.toString());
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
@Step
|
||||||
public TopicCreateEditSettingsView setTimeToRetainDataInMs(String ms) {
|
public TopicCreateEditSettingsView setTimeToRetainDataInMs(String ms) {
|
||||||
timeToRetain.setValue(ms);
|
timeToRetain.setValue(ms);
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Step
|
||||||
public TopicCreateEditSettingsView setMaxSizeOnDiskInGB(String value) {
|
public TopicCreateEditSettingsView setMaxSizeOnDiskInGB(String value) {
|
||||||
KafkaUISelectElement kafkaUISelectElement = new KafkaUISelectElement("retentionBytes");
|
KafkaUISelectElement kafkaUISelectElement = new KafkaUISelectElement("retentionBytes");
|
||||||
kafkaUISelectElement.selectByVisibleText(value);
|
kafkaUISelectElement.selectByVisibleText(value);
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
@Step
|
||||||
public TopicCreateEditSettingsView setMaxMessageBytes(Long bytes) {
|
public TopicCreateEditSettingsView setMaxMessageBytes(Long bytes) {
|
||||||
maxMessageBytes.setValue(bytes.toString());
|
maxMessageBytes.setValue(bytes.toString());
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
@Step
|
||||||
public TopicCreateEditSettingsView setMaxMessageBytes(String bytes) {
|
public TopicCreateEditSettingsView setMaxMessageBytes(String bytes) {
|
||||||
return setMaxMessageBytes(Long.parseLong(bytes));
|
return setMaxMessageBytes(Long.parseLong(bytes));
|
||||||
}
|
}
|
||||||
|
@Step
|
||||||
public TopicCreateEditSettingsView setTimeToRetainDataInMsUsingButtons(String value) {
|
public TopicCreateEditSettingsView setTimeToRetainDataInMsUsingButtons(String value) {
|
||||||
timeToRetain
|
timeToRetain
|
||||||
.parent()
|
.parent()
|
||||||
|
@ -61,31 +62,31 @@ public class TopicCreateEditSettingsView {
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Step
|
||||||
public TopicCreateEditSettingsView selectCleanupPolicy(CleanupPolicyValue cleanupPolicyValue) {
|
public TopicCreateEditSettingsView selectCleanupPolicy(CleanupPolicyValue cleanupPolicyValue) {
|
||||||
return selectFromDropDownByOptionValue("cleanupPolicy",
|
return selectFromDropDownByOptionValue("cleanupPolicy",
|
||||||
cleanupPolicyValue.getOptionValue());
|
cleanupPolicyValue.getOptionValue());
|
||||||
}
|
}
|
||||||
|
@Step
|
||||||
public TopicCreateEditSettingsView selectCleanupPolicy(String cleanupPolicyOptionValue) {
|
public TopicCreateEditSettingsView selectCleanupPolicy(String cleanupPolicyOptionValue) {
|
||||||
$("ul#topicFormCleanupPolicy").click();
|
$("ul#topicFormCleanupPolicy").click();
|
||||||
$x("//li[text()='" + cleanupPolicyOptionValue + "']").click();
|
$x("//li[text()='" + cleanupPolicyOptionValue + "']").click();
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
@Step
|
||||||
public TopicCreateEditSettingsView selectRetentionBytes(String visibleValue) {
|
public TopicCreateEditSettingsView selectRetentionBytes(String visibleValue) {
|
||||||
return selectFromDropDownByVisibleText("retentionBytes", visibleValue);
|
return selectFromDropDownByVisibleText("retentionBytes", visibleValue);
|
||||||
}
|
}
|
||||||
|
@Step
|
||||||
public TopicCreateEditSettingsView selectRetentionBytes(Long optionValue) {
|
public TopicCreateEditSettingsView selectRetentionBytes(Long optionValue) {
|
||||||
return selectFromDropDownByOptionValue("retentionBytes", optionValue.toString());
|
return selectFromDropDownByOptionValue("retentionBytes", optionValue.toString());
|
||||||
}
|
}
|
||||||
|
@Step
|
||||||
public TopicView sendData() {
|
public TopicView sendData() {
|
||||||
BrowserUtils.javaExecutorClick($x("//button[@type='submit']"));
|
BrowserUtils.javaExecutorClick($x("//button[@type='submit']"));
|
||||||
return new TopicView();
|
return new TopicView();
|
||||||
}
|
}
|
||||||
|
@Step
|
||||||
public TopicCreateEditSettingsView addCustomParameter(String customParameterName,
|
public TopicCreateEditSettingsView addCustomParameter(String customParameterName,
|
||||||
String customParameterValue) {
|
String customParameterValue) {
|
||||||
ElementsCollection customParametersElements =
|
ElementsCollection customParametersElements =
|
||||||
|
@ -109,7 +110,7 @@ public class TopicCreateEditSettingsView {
|
||||||
.setValue(customParameterValue);
|
.setValue(customParameterValue);
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
@Step
|
||||||
public TopicCreateEditSettingsView updateCustomParameter(String customParameterName,
|
public TopicCreateEditSettingsView updateCustomParameter(String customParameterName,
|
||||||
String customParameterValue) {
|
String customParameterValue) {
|
||||||
SelenideElement selenideElement = $$("ul[role=listbox][name^=customParams][name$=name]")
|
SelenideElement selenideElement = $$("ul[role=listbox][name^=customParams][name$=name]")
|
||||||
|
@ -121,7 +122,7 @@ public class TopicCreateEditSettingsView {
|
||||||
$(String.format("input[name^=%s]", name)).setValue(customParameterValue);
|
$(String.format("input[name^=%s]", name)).setValue(customParameterValue);
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
@Step
|
||||||
public TopicCreateEditSettingsView cleanupPolicyIs(String value) {
|
public TopicCreateEditSettingsView cleanupPolicyIs(String value) {
|
||||||
String cleanupPolicy = new KafkaUISelectElement("cleanupPolicy")
|
String cleanupPolicy = new KafkaUISelectElement("cleanupPolicy")
|
||||||
.getCurrentValue();
|
.getCurrentValue();
|
||||||
|
@ -130,7 +131,7 @@ public class TopicCreateEditSettingsView {
|
||||||
.isEqualToIgnoringCase(value);
|
.isEqualToIgnoringCase(value);
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
@Step
|
||||||
public TopicCreateEditSettingsView timeToRetainIs(String time) {
|
public TopicCreateEditSettingsView timeToRetainIs(String time) {
|
||||||
String value = timeToRetain.getValue();
|
String value = timeToRetain.getValue();
|
||||||
assertThat(value)
|
assertThat(value)
|
||||||
|
@ -138,7 +139,7 @@ public class TopicCreateEditSettingsView {
|
||||||
.isEqualTo(time);
|
.isEqualTo(time);
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
@Step
|
||||||
public TopicCreateEditSettingsView maxSizeOnDiskIs(String size) {
|
public TopicCreateEditSettingsView maxSizeOnDiskIs(String size) {
|
||||||
String retentionBytes = new KafkaUISelectElement("retentionBytes")
|
String retentionBytes = new KafkaUISelectElement("retentionBytes")
|
||||||
.getCurrentValue();
|
.getCurrentValue();
|
||||||
|
@ -147,7 +148,7 @@ public class TopicCreateEditSettingsView {
|
||||||
.isEqualTo(size);
|
.isEqualTo(size);
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
@Step
|
||||||
public TopicCreateEditSettingsView maxMessageBytesIs(String bytes) {
|
public TopicCreateEditSettingsView maxMessageBytesIs(String bytes) {
|
||||||
String value = maxMessageBytes.getValue();
|
String value = maxMessageBytes.getValue();
|
||||||
assertThat(value)
|
assertThat(value)
|
||||||
|
|
|
@ -35,6 +35,7 @@ public class TopicView {
|
||||||
}
|
}
|
||||||
|
|
||||||
@SneakyThrows
|
@SneakyThrows
|
||||||
|
@Step
|
||||||
public TopicCreateEditSettingsView openEditSettings() {
|
public TopicCreateEditSettingsView openEditSettings() {
|
||||||
BrowserUtils.javaExecutorClick(dotMenuHeader);
|
BrowserUtils.javaExecutorClick(dotMenuHeader);
|
||||||
$x("//a[text()= '" + DotMenuHeaderItems.EDIT_SETTINGS.getValue() + "']").click();
|
$x("//a[text()= '" + DotMenuHeaderItems.EDIT_SETTINGS.getValue() + "']").click();
|
||||||
|
@ -48,6 +49,7 @@ public class TopicView {
|
||||||
}
|
}
|
||||||
|
|
||||||
@SneakyThrows
|
@SneakyThrows
|
||||||
|
@Step
|
||||||
public TopicsList deleteTopic() {
|
public TopicsList deleteTopic() {
|
||||||
BrowserUtils.javaExecutorClick(dotMenuHeader);
|
BrowserUtils.javaExecutorClick(dotMenuHeader);
|
||||||
$("#dropdown-menu").$(byLinkText(DotMenuHeaderItems.REMOVE_TOPIC.getValue())).click();
|
$("#dropdown-menu").$(byLinkText(DotMenuHeaderItems.REMOVE_TOPIC.getValue())).click();
|
||||||
|
@ -56,15 +58,18 @@ public class TopicView {
|
||||||
}
|
}
|
||||||
|
|
||||||
@SneakyThrows
|
@SneakyThrows
|
||||||
|
@Step
|
||||||
public ProduceMessagePage clickOnButton(String buttonName) {
|
public ProduceMessagePage clickOnButton(String buttonName) {
|
||||||
BrowserUtils.javaExecutorClick($(By.xpath(String.format("//div//button[text()='%s']", buttonName))));
|
BrowserUtils.javaExecutorClick($(By.xpath(String.format("//div//button[text()='%s']", buttonName))));
|
||||||
return new ProduceMessagePage();
|
return new ProduceMessagePage();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Step
|
||||||
public boolean isKeyMessageVisible(String keyMessage) {
|
public boolean isKeyMessageVisible(String keyMessage) {
|
||||||
return keyMessage.equals($("td[title]").getText());
|
return keyMessage.equals($("td[title]").getText());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Step
|
||||||
public boolean isContentMessageVisible(String contentMessage) {
|
public boolean isContentMessageVisible(String contentMessage) {
|
||||||
return contentMessage.matches($x("//html//div[@id='root']/div/main//table//p").getText().trim());
|
return contentMessage.matches($x("//html//div[@id='root']/div/main//table//p").getText().trim());
|
||||||
}
|
}
|
||||||
|
|
|
@ -47,12 +47,14 @@ public class TopicsList {
|
||||||
}
|
}
|
||||||
|
|
||||||
@SneakyThrows
|
@SneakyThrows
|
||||||
|
@Step
|
||||||
public TopicView openTopic(String topicName) {
|
public TopicView openTopic(String topicName) {
|
||||||
$(By.linkText(topicName)).click();
|
$(By.linkText(topicName)).click();
|
||||||
return new TopicView();
|
return new TopicView();
|
||||||
}
|
}
|
||||||
|
|
||||||
@SneakyThrows
|
@SneakyThrows
|
||||||
|
@Step
|
||||||
public TopicsList isTopicNotVisible(String topicName) {
|
public TopicsList isTopicNotVisible(String topicName) {
|
||||||
$$x("//table/tbody/tr/td[2]")
|
$$x("//table/tbody/tr/td[2]")
|
||||||
.shouldBe(CollectionCondition.sizeGreaterThan(0))
|
.shouldBe(CollectionCondition.sizeGreaterThan(0))
|
||||||
|
|
Loading…
Add table
Reference in a new issue