[e2e] refactor POM classes structure (#2736)
* Resolved conflicts * revert QaseExtension * Added waiter * Deleted unused imports * Renamed method clickOnButton * Added waitUntil * Refactored SelenideElements * Refactored xPath in ConnectorCreateForm * Resolve conversations * Revert xPath * Resolved conversations * Resolved conversations * Resolved conversations * Deleted clickByJavaScript * Refactored methods setConnectorConfig and setConfig, added alertMessage condition Co-authored-by: Vlad Senyuta <66071557+VladSenyuta@users.noreply.github.com>
This commit is contained in:
parent
45aa4542ba
commit
7f92c0f2e5
16 changed files with 259 additions and 191 deletions
|
@ -11,22 +11,27 @@ import static com.provectus.kafka.ui.settings.Source.CLUSTER_NAME;
|
|||
|
||||
public class NaviSideBar {
|
||||
|
||||
protected SelenideElement loadingSpinner = $x("//*[contains(text(),'Loading')]");
|
||||
protected SelenideElement dashboardMenuItem = $x("//a[@title='Dashboard']");
|
||||
protected String sideMenuOptionElementLocator = ".//ul/li[contains(.,'%s')]";
|
||||
protected String clusterElementLocator = "//aside/ul/li[contains(.,'%s')]";
|
||||
|
||||
@Step
|
||||
public NaviSideBar waitUntilScreenReady() {
|
||||
$x("//*[contains(text(),'Loading')]").shouldBe(Condition.disappear, Duration.ofSeconds(30));
|
||||
$x("//a[@title='Dashboard']").shouldBe(Condition.visible, Duration.ofSeconds(30));
|
||||
loadingSpinner.shouldBe(Condition.disappear, Duration.ofSeconds(30));
|
||||
dashboardMenuItem.shouldBe(Condition.visible, Duration.ofSeconds(30));
|
||||
return this;
|
||||
}
|
||||
|
||||
@Step
|
||||
public NaviSideBar openSideMenu(String clusterName, SideMenuOption option) {
|
||||
SelenideElement clusterElement = $x(String.format("//aside/ul/li[contains(.,'%s')]", clusterName)).shouldBe(Condition.visible);
|
||||
SelenideElement clusterElement = $x(String.format(clusterElementLocator, clusterName)).shouldBe(Condition.visible);
|
||||
if (clusterElement.parent().$$x(".//ul").size() == 0) {
|
||||
clusterElement.click();
|
||||
}
|
||||
clusterElement
|
||||
.parent()
|
||||
.$x(String.format(".//ul/li[contains(.,'%s')]", option.value))
|
||||
.$x(String.format(sideMenuOptionElementLocator, option.value))
|
||||
.click();
|
||||
return this;
|
||||
}
|
||||
|
@ -37,7 +42,6 @@ public class NaviSideBar {
|
|||
return this;
|
||||
}
|
||||
|
||||
|
||||
public enum SideMenuOption {
|
||||
BROKERS("Brokers"),
|
||||
TOPICS("Topics"),
|
||||
|
|
|
@ -3,37 +3,33 @@ package com.provectus.kafka.ui.pages.connector;
|
|||
import com.codeborne.selenide.Condition;
|
||||
import com.codeborne.selenide.SelenideElement;
|
||||
import io.qameta.allure.Step;
|
||||
import org.openqa.selenium.By;
|
||||
|
||||
import static com.codeborne.selenide.Selenide.$;
|
||||
import static com.codeborne.selenide.Selenide.sleep;
|
||||
import static com.codeborne.selenide.Selenide.$x;
|
||||
import static com.provectus.kafka.ui.utilities.WebUtils.clickByJavaScript;
|
||||
import static com.provectus.kafka.ui.utilities.screenshots.Screenshooter.log;
|
||||
|
||||
public class ConnectorCreateForm {
|
||||
|
||||
protected SelenideElement nameField = $(By.xpath("//input[@name='name']"));
|
||||
protected SelenideElement contentTextArea = $(".ace_text-input");
|
||||
protected SelenideElement submitButton = $(By.xpath("//button[@type='submit']"));
|
||||
|
||||
private static final String path = "/ui/clusters/secondLocal/connectors/create_new";
|
||||
|
||||
@Step("Set connector config JSON")
|
||||
public ConnectorDetails setConnectorConfig(String connectName, String configJson) {
|
||||
nameField.setValue(connectName);
|
||||
$("#config").click();
|
||||
contentTextArea.setValue("");
|
||||
contentTextArea.setValue(String.valueOf(configJson.toCharArray()));
|
||||
nameField.click();
|
||||
clickByJavaScript(submitButton);
|
||||
sleep(4000);
|
||||
log.info("Connector config is submitted");
|
||||
return new ConnectorDetails();
|
||||
}
|
||||
protected SelenideElement loadingSpinner = $x("//*[contains(text(),'Loading')]");
|
||||
protected SelenideElement nameField = $x("//input[@name='name']");
|
||||
protected SelenideElement contentTextArea = $x("//textarea[@class='ace_text-input']");
|
||||
protected SelenideElement submitBtn = $x("//button[@type='submit']");
|
||||
protected SelenideElement configField = $x("//div[@id='config']");
|
||||
|
||||
@Step
|
||||
public ConnectorCreateForm waitUntilScreenReady() {
|
||||
loadingSpinner.shouldBe(Condition.disappear);
|
||||
nameField.shouldBe(Condition.visible);
|
||||
return this;
|
||||
}
|
||||
|
||||
@Step
|
||||
public ConnectorCreateForm setConnectorConfig(String connectName, String configJson) {
|
||||
nameField.shouldBe(Condition.enabled).setValue(connectName);
|
||||
configField.shouldBe(Condition.enabled).click();
|
||||
contentTextArea.setValue(configJson);
|
||||
nameField.shouldBe(Condition.enabled).click();
|
||||
clickByJavaScript(submitBtn);
|
||||
loadingSpinner.shouldBe(Condition.disappear);
|
||||
return this;
|
||||
}
|
||||
}
|
|
@ -3,71 +3,75 @@ package com.provectus.kafka.ui.pages.connector;
|
|||
import com.codeborne.selenide.Condition;
|
||||
import com.codeborne.selenide.SelenideElement;
|
||||
import io.qameta.allure.Step;
|
||||
import org.openqa.selenium.By;
|
||||
import org.openqa.selenium.Keys;
|
||||
|
||||
import static com.codeborne.selenide.Selenide.$;
|
||||
import static com.codeborne.selenide.Selenide.sleep;
|
||||
import java.util.Arrays;
|
||||
|
||||
import static com.codeborne.selenide.Selenide.$x;
|
||||
import static com.provectus.kafka.ui.utilities.WebUtils.clearByKeyboard;
|
||||
import static com.provectus.kafka.ui.utilities.WebUtils.clickByJavaScript;
|
||||
import static com.provectus.kafka.ui.utilities.screenshots.Screenshooter.log;
|
||||
|
||||
public class ConnectorDetails {
|
||||
protected SelenideElement dotMenuBtn = $(By.xpath("//button[@aria-label='Dropdown Toggle']"));
|
||||
protected SelenideElement deleteBtn = $(By.xpath("//li/div[text()='Delete']"));
|
||||
protected SelenideElement confirmBtnMdl = $(By.xpath("//div[@role='dialog']//button[text()='Confirm']"));
|
||||
protected SelenideElement submitBtn = $(By.xpath("//button[@type='submit']"));
|
||||
protected SelenideElement contentTextArea = $("[wrap]");
|
||||
|
||||
protected SelenideElement loadingSpinner = $x("//*[contains(text(),'Loading')]");
|
||||
protected SelenideElement dotMenuBtn = $x("//button[@aria-label='Dropdown Toggle']");
|
||||
protected SelenideElement deleteBtn = $x("//li/div[contains(text(),'Delete')]");
|
||||
protected SelenideElement confirmBtnMdl = $x("//div[@role='dialog']//button[contains(text(),'Confirm')]");
|
||||
protected SelenideElement submitBtn = $x("//button[@type='submit']");
|
||||
protected SelenideElement contentTextArea = $x("//textarea[@class='ace_text-input']");
|
||||
protected SelenideElement taskTab = $x("//a[contains(text(),'Tasks')]");
|
||||
protected SelenideElement configTab = $x("//a[contains(text(),'Config')]");
|
||||
protected SelenideElement configField = $x("//div[@id='config']");
|
||||
protected SelenideElement successAlertMessage = $x("//div[contains(text(),'Config successfully updated')]");
|
||||
|
||||
|
||||
@Step
|
||||
public ConnectorDetails waitUntilScreenReady() {
|
||||
$(By.xpath("//a[text() ='Tasks']")).shouldBe(Condition.visible);
|
||||
$(By.xpath("//a[text() ='Config']")).shouldBe(Condition.visible);
|
||||
loadingSpinner.shouldBe(Condition.disappear);
|
||||
Arrays.asList(taskTab,configTab).forEach(elementsMenu -> elementsMenu.shouldBe(Condition.visible));
|
||||
return this;
|
||||
}
|
||||
|
||||
@Step()
|
||||
@Step
|
||||
public ConnectorDetails openConfigTab() {
|
||||
clickByJavaScript($(By.xpath("//a[text() ='Config']")));
|
||||
clickByJavaScript(configTab);
|
||||
return this;
|
||||
}
|
||||
|
||||
@Step()
|
||||
@Step
|
||||
public ConnectorDetails setConfig(String configJson) {
|
||||
$("#config").click();
|
||||
contentTextArea.sendKeys(Keys.LEFT_CONTROL + "a");
|
||||
contentTextArea.setValue("");
|
||||
contentTextArea.setValue(String.valueOf(configJson.toCharArray()));
|
||||
$("#config").click();
|
||||
configField.shouldBe(Condition.enabled).click();
|
||||
clearByKeyboard(contentTextArea);
|
||||
contentTextArea.setValue(configJson);
|
||||
configField.shouldBe(Condition.enabled).click();
|
||||
clickByJavaScript(submitBtn);
|
||||
sleep(4000);
|
||||
log.info("Connector config is submitted");
|
||||
successAlertMessage.shouldBe(Condition.visible);
|
||||
return this;
|
||||
}
|
||||
|
||||
@Step()
|
||||
@Step
|
||||
public ConnectorDetails openDotMenu() {
|
||||
clickByJavaScript(dotMenuBtn);
|
||||
return this;
|
||||
}
|
||||
|
||||
@Step()
|
||||
public ConnectorDetails clickDeleteButton() {
|
||||
@Step
|
||||
public ConnectorDetails clickDeleteBtn() {
|
||||
clickByJavaScript(deleteBtn);
|
||||
return this;
|
||||
}
|
||||
|
||||
@Step()
|
||||
public ConnectorDetails clickConfirmButton() {
|
||||
@Step
|
||||
public ConnectorDetails clickConfirmBtn() {
|
||||
confirmBtnMdl.shouldBe(Condition.enabled).click();
|
||||
confirmBtnMdl.shouldBe(Condition.disappear);
|
||||
return this;
|
||||
}
|
||||
|
||||
@Step()
|
||||
@Step
|
||||
public ConnectorDetails deleteConnector() {
|
||||
openDotMenu();
|
||||
clickDeleteButton();
|
||||
clickConfirmButton();
|
||||
clickDeleteBtn();
|
||||
clickConfirmBtn();
|
||||
return this;
|
||||
}
|
||||
}
|
|
@ -1,12 +1,12 @@
|
|||
package com.provectus.kafka.ui.pages.connector;
|
||||
|
||||
import com.codeborne.selenide.Condition;
|
||||
import com.codeborne.selenide.SelenideElement;
|
||||
import com.provectus.kafka.ui.utilities.WaitUtils;
|
||||
import io.qameta.allure.Step;
|
||||
import lombok.experimental.ExtensionMethod;
|
||||
import org.openqa.selenium.By;
|
||||
|
||||
import static com.codeborne.selenide.Selenide.$;
|
||||
import static com.codeborne.selenide.Selenide.$x;
|
||||
import static com.provectus.kafka.ui.utilities.WebUtils.clickByJavaScript;
|
||||
import static com.provectus.kafka.ui.utilities.WebUtils.isVisible;
|
||||
|
@ -14,34 +14,41 @@ import static com.provectus.kafka.ui.utilities.WebUtils.isVisible;
|
|||
@ExtensionMethod(WaitUtils.class)
|
||||
public class KafkaConnectList {
|
||||
|
||||
protected SelenideElement loadingSpinner = $x("//*[contains(text(),'Loading')]");
|
||||
protected SelenideElement pageTitle = $x("//h1[text()='Connectors']");
|
||||
protected SelenideElement createConnectorBtn = $x("//button[contains(text(),'Create Connector')]");
|
||||
protected SelenideElement connectorsGrid = $x("//table");
|
||||
protected String tabElementLocator = "//td[contains(text(),'%s')]";
|
||||
|
||||
@Step
|
||||
public KafkaConnectList waitUntilScreenReady() {
|
||||
$(By.xpath("//h1[text()='Connectors']")).shouldBe(Condition.visible);
|
||||
loadingSpinner.shouldBe(Condition.disappear);
|
||||
pageTitle.shouldBe(Condition.visible);
|
||||
return this;
|
||||
}
|
||||
|
||||
@Step("Click on button 'Create Connector'")
|
||||
public ConnectorCreateForm clickCreateConnectorButton() {
|
||||
clickByJavaScript($x("//button[text()='Create Connector']"));
|
||||
return new ConnectorCreateForm();
|
||||
@Step
|
||||
public KafkaConnectList clickCreateConnectorBtn() {
|
||||
clickByJavaScript(createConnectorBtn);
|
||||
return this;
|
||||
}
|
||||
|
||||
@Step
|
||||
public KafkaConnectList openConnector(String connectorName) {
|
||||
$x("//tbody//td[1][text()='" + connectorName + "']").shouldBe(Condition.enabled).click();
|
||||
$x(String.format(tabElementLocator,connectorName)).shouldBe(Condition.visible).click();
|
||||
return this;
|
||||
}
|
||||
|
||||
@Step
|
||||
public boolean isConnectorVisible(String connectorName) {
|
||||
$(By.xpath("//table")).shouldBe(Condition.visible);
|
||||
return isVisible($x("//tbody//td[1][text()='" + connectorName + "']"));
|
||||
connectorsGrid.shouldBe(Condition.visible);
|
||||
return isVisible($x(String.format(tabElementLocator,connectorName)));
|
||||
}
|
||||
|
||||
@Step
|
||||
public KafkaConnectList connectorIsUpdatedInList(String connectorName, String topicName) {
|
||||
$(By.xpath(String.format("//a[text() = '%s']", connectorName))).shouldBe(Condition.visible);
|
||||
By.xpath(String.format("//a[text() = '%s']", topicName)).refreshUntil(Condition.visible);
|
||||
$x(String.format(tabElementLocator,connectorName)).shouldBe(Condition.visible);
|
||||
By.xpath(String.format(tabElementLocator,topicName)).refreshUntil(Condition.visible);
|
||||
return this;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,70 +1,73 @@
|
|||
package com.provectus.kafka.ui.pages.schema;
|
||||
|
||||
import com.codeborne.selenide.Condition;
|
||||
import com.codeborne.selenide.Selenide;
|
||||
import com.codeborne.selenide.SelenideElement;
|
||||
import com.provectus.kafka.ui.api.model.CompatibilityLevel;
|
||||
import com.provectus.kafka.ui.api.model.SchemaType;
|
||||
import io.qameta.allure.Step;
|
||||
import org.openqa.selenium.By;
|
||||
import org.openqa.selenium.Keys;
|
||||
|
||||
import static com.codeborne.selenide.Selenide.$;
|
||||
import static com.codeborne.selenide.Selenide.$x;
|
||||
import static com.provectus.kafka.ui.utilities.WebUtils.clearByKeyboard;
|
||||
import static com.provectus.kafka.ui.utilities.WebUtils.clickByJavaScript;
|
||||
|
||||
public class SchemaCreateForm {
|
||||
|
||||
protected SelenideElement subjectName = $(By.xpath("//input[@name='subject']"));
|
||||
protected SelenideElement schemaField = $(By.xpath("//textarea[@name='schema']"));
|
||||
protected SelenideElement submitSchemaButton = $(By.xpath("//button[@type='submit']"));
|
||||
protected SelenideElement newSchemaTextArea = $("#newSchema [wrap]");
|
||||
protected SelenideElement schemaTypeDropDown = $x("//ul[@name='schemaType']");
|
||||
protected SelenideElement loadingSpinner = $x("//*[contains(text(),'Loading')]");
|
||||
protected SelenideElement schemaNameField = $x("//input[@name='subject']");
|
||||
protected SelenideElement pageTitle = $x("//h1['Edit']");
|
||||
protected SelenideElement schemaTextArea = $x("//textarea[@name='schema']");
|
||||
protected SelenideElement submitBtn = $x("//button[@type='submit']");
|
||||
protected SelenideElement newSchemaInput = $("#newSchema [wrap]");
|
||||
protected SelenideElement schemaTypeDdl = $x("//ul[@name='schemaType']");
|
||||
protected SelenideElement compatibilityLevelList = $x("//ul[@name='compatibilityLevel']");
|
||||
protected SelenideElement newSchemaTextArea = $x("//div[@id='newSchema']");
|
||||
protected String elementLocatorDdl = "//li[@value='%s']";
|
||||
|
||||
@Step
|
||||
public SchemaCreateForm waitUntilScreenReady(){
|
||||
$x("//h1['Edit']").shouldBe(Condition.visible);
|
||||
loadingSpinner.shouldBe(Condition.disappear);
|
||||
pageTitle.shouldBe(Condition.visible);
|
||||
return this;
|
||||
}
|
||||
|
||||
@Step
|
||||
public SchemaCreateForm setSubjectName(String name) {
|
||||
subjectName.setValue(name);
|
||||
schemaNameField.setValue(name);
|
||||
return this;
|
||||
}
|
||||
|
||||
@Step
|
||||
public SchemaCreateForm setSchemaField(String text) {
|
||||
schemaField.setValue(text);
|
||||
schemaTextArea.setValue(text);
|
||||
return this;
|
||||
}
|
||||
|
||||
@Step
|
||||
public SchemaCreateForm selectSchemaTypeFromDropdown(SchemaType schemaType) {
|
||||
$("ul[role='listbox']").click();
|
||||
$x("//li[text()='" + schemaType.getValue() + "']").click();
|
||||
schemaTypeDdl.shouldBe(Condition.enabled).click();
|
||||
$x(String.format(elementLocatorDdl, schemaType.getValue())).shouldBe(Condition.visible).click();
|
||||
return this;
|
||||
}
|
||||
|
||||
@Step
|
||||
public SchemaDetails clickSubmit() {
|
||||
clickByJavaScript(submitSchemaButton);
|
||||
return new SchemaDetails();
|
||||
public SchemaCreateForm clickSubmitBtn() {
|
||||
clickByJavaScript(submitBtn);
|
||||
return this;
|
||||
}
|
||||
|
||||
@Step
|
||||
public SchemaCreateForm selectCompatibilityLevelFromDropdown(CompatibilityLevel.CompatibilityEnum level) {
|
||||
$x("//ul[@name='compatibilityLevel']").click();
|
||||
$x("//li[text()='" + level.getValue() + "']").click();
|
||||
compatibilityLevelList.shouldBe(Condition.enabled).click();
|
||||
$x(String.format(elementLocatorDdl, level.getValue())).shouldBe(Condition.visible).click();
|
||||
return this;
|
||||
}
|
||||
|
||||
@Step("Set new schema value")
|
||||
@Step
|
||||
public SchemaCreateForm setNewSchemaValue(String configJson) {
|
||||
$("#newSchema").click();
|
||||
newSchemaTextArea.sendKeys(Keys.CONTROL + "a", Keys.BACK_SPACE);
|
||||
Selenide.executeJavaScript("arguments[0].value = '';", $("#newSchema"));
|
||||
newSchemaTextArea.setValue(configJson);
|
||||
newSchemaTextArea.shouldBe(Condition.visible).click();
|
||||
clearByKeyboard(newSchemaInput);
|
||||
newSchemaInput.setValue(configJson);
|
||||
return this;
|
||||
}
|
||||
|
||||
|
@ -72,7 +75,7 @@ public class SchemaCreateForm {
|
|||
public boolean isSchemaDropDownDisabled(){
|
||||
boolean disabled = false;
|
||||
try{
|
||||
String attribute = schemaTypeDropDown.getAttribute("disabled");
|
||||
String attribute = schemaTypeDdl.getAttribute("disabled");
|
||||
disabled = true;
|
||||
}
|
||||
catch (Throwable ignored){
|
||||
|
|
|
@ -3,39 +3,45 @@ package com.provectus.kafka.ui.pages.schema;
|
|||
import com.codeborne.selenide.Condition;
|
||||
import com.codeborne.selenide.SelenideElement;
|
||||
import io.qameta.allure.Step;
|
||||
import org.openqa.selenium.By;
|
||||
|
||||
import static com.codeborne.selenide.Selenide.*;
|
||||
import static com.codeborne.selenide.Selenide.$$x;
|
||||
import static com.codeborne.selenide.Selenide.$x;
|
||||
import static com.provectus.kafka.ui.utilities.WebUtils.clickByJavaScript;
|
||||
|
||||
public class SchemaDetails {
|
||||
|
||||
protected SelenideElement dotMenuBtn = $$x("//button[@aria-label='Dropdown Toggle']").first();
|
||||
protected SelenideElement loadingSpinner = $x("//*[contains(text(),'Loading')]");
|
||||
protected SelenideElement actualVersionTextArea = $x("//div[@id='schema']");
|
||||
protected SelenideElement compatibilityField = $x("//h4[contains(text(),'Compatibility')]/../p");
|
||||
protected SelenideElement editSchemaBtn = $x("//button[contains(text(),'Edit Schema')]");
|
||||
protected SelenideElement removeBtn = $x("//*[contains(text(),'Remove')]");
|
||||
protected SelenideElement confirmBtn = $x("//div[@role='dialog']//button[contains(text(),'Confirm')]");
|
||||
|
||||
@Step
|
||||
public SchemaDetails waitUntilScreenReady() {
|
||||
$("div#schema").shouldBe(Condition.visible);
|
||||
loadingSpinner.shouldBe(Condition.disappear);
|
||||
actualVersionTextArea.shouldBe(Condition.visible);
|
||||
return this;
|
||||
}
|
||||
|
||||
@Step
|
||||
public String getCompatibility() {
|
||||
return $x("//h4[contains(text(),'Compatibility')]/../p").getText();
|
||||
return compatibilityField.getText();
|
||||
}
|
||||
|
||||
@Step
|
||||
public SchemaDetails openEditSchema(){
|
||||
$x("//button[text()= 'Edit Schema']").click();
|
||||
editSchemaBtn.shouldBe(Condition.visible).click();
|
||||
return this;
|
||||
}
|
||||
|
||||
@Step
|
||||
public SchemaRegistryList removeSchema() {
|
||||
public SchemaDetails removeSchema() {
|
||||
clickByJavaScript(dotMenuBtn);
|
||||
$(By.xpath("//*[contains(text(),'Remove')]")).click();
|
||||
SelenideElement confirmButton = $x("//div[@role=\"dialog\"]//button[text()='Confirm']");
|
||||
confirmButton.shouldBe(Condition.enabled).click();
|
||||
confirmButton.shouldBe(Condition.disappear);
|
||||
return new SchemaRegistryList();
|
||||
removeBtn.shouldBe(Condition.enabled).click();
|
||||
confirmBtn.shouldBe(Condition.visible).click();
|
||||
confirmBtn.shouldBe(Condition.disappear);
|
||||
return this;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -3,40 +3,41 @@ package com.provectus.kafka.ui.pages.schema;
|
|||
import com.codeborne.selenide.Condition;
|
||||
import com.codeborne.selenide.SelenideElement;
|
||||
import io.qameta.allure.Step;
|
||||
import org.openqa.selenium.By;
|
||||
|
||||
import static com.codeborne.selenide.Selenide.$;
|
||||
import static com.codeborne.selenide.Selenide.$x;
|
||||
import static com.provectus.kafka.ui.utilities.WebUtils.clickByJavaScript;
|
||||
import static com.provectus.kafka.ui.utilities.WebUtils.isVisible;
|
||||
|
||||
public class SchemaRegistryList {
|
||||
|
||||
private final SelenideElement schemaButton = $(By.xpath("//*[contains(text(),'Create Schema')]"));
|
||||
protected SelenideElement loadingSpinner = $x("//*[contains(text(),'Loading')]");
|
||||
protected SelenideElement createSchemaBtn = $x("//button[contains(text(),'Create Schema')]");
|
||||
protected SelenideElement schemaGrid = $x("//table");
|
||||
protected String schemaTabElementLocator = "//a[contains(text(),'%s')]";
|
||||
|
||||
@Step
|
||||
public SchemaRegistryList waitUntilScreenReady(){
|
||||
$x("//*[contains(text(),'Loading')]").shouldBe(Condition.disappear);
|
||||
$x("//button[contains(text(),'Create Schema')]").shouldBe(Condition.visible);
|
||||
loadingSpinner.shouldBe(Condition.disappear);
|
||||
createSchemaBtn.shouldBe(Condition.visible);
|
||||
return this;
|
||||
}
|
||||
|
||||
@Step
|
||||
public SchemaCreateForm clickCreateSchema() {
|
||||
clickByJavaScript(schemaButton);
|
||||
return new SchemaCreateForm();
|
||||
public SchemaRegistryList clickCreateSchema() {
|
||||
clickByJavaScript(createSchemaBtn);
|
||||
return this;
|
||||
}
|
||||
|
||||
@Step
|
||||
public SchemaDetails openSchema(String schemaName) {
|
||||
$(By.xpath("//*[contains(text(),'" + schemaName + "')]")).click();
|
||||
return new SchemaDetails();
|
||||
public SchemaRegistryList openSchema(String schemaName) {
|
||||
$x(String.format(schemaTabElementLocator,schemaName)).shouldBe(Condition.visible).click();
|
||||
return this;
|
||||
}
|
||||
|
||||
@Step
|
||||
public boolean isSchemaVisible(String schemaName) {
|
||||
$(By.xpath("//table")).shouldBe(Condition.visible);
|
||||
return isVisible($x("//tbody//td//a[text()='" + schemaName + "']"));
|
||||
schemaGrid.shouldBe(Condition.visible);
|
||||
return isVisible($x(String.format(schemaTabElementLocator,schemaName)));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -3,46 +3,56 @@ package com.provectus.kafka.ui.pages.topic;
|
|||
import com.codeborne.selenide.Condition;
|
||||
import com.codeborne.selenide.SelenideElement;
|
||||
import io.qameta.allure.Step;
|
||||
import org.openqa.selenium.By;
|
||||
import org.openqa.selenium.Keys;
|
||||
|
||||
import static com.codeborne.selenide.Selenide.$;
|
||||
import java.util.Arrays;
|
||||
|
||||
import static com.codeborne.selenide.Selenide.$x;
|
||||
import static com.codeborne.selenide.Selenide.refresh;
|
||||
import static com.provectus.kafka.ui.utilities.WebUtils.clearByKeyboard;
|
||||
|
||||
public class ProduceMessagePanel {
|
||||
|
||||
private final SelenideElement keyField = $(By.xpath("//div[@id='key']/textarea"));
|
||||
private final SelenideElement contentField = $(By.xpath("//div[@id='content']/textarea"));
|
||||
private final SelenideElement headersField = $(By.xpath("//div[@id='headers']/textarea"));
|
||||
private final SelenideElement submitBtn = headersField.$(By.xpath("../../../..//button[@type='submit']"));
|
||||
protected SelenideElement loadingSpinner = $x("//*[contains(text(),'Loading')]");
|
||||
protected SelenideElement keyTextArea = $x("//div[@id='key']/textarea");
|
||||
protected SelenideElement contentTextArea = $x("//div[@id='content']/textarea");
|
||||
protected SelenideElement headersTextArea = $x("//div[@id='headers']/textarea");
|
||||
protected SelenideElement submitBtn = headersTextArea.$x("../../../..//button[@type='submit']");
|
||||
protected SelenideElement partitionDdl = $x("//ul[@name='partition']");
|
||||
protected SelenideElement keySerdeDdl = $x("//ul[@name='keySerde']");
|
||||
protected SelenideElement contentSerdeDdl = $x("//ul[@name='valueSerde']");
|
||||
|
||||
@Step
|
||||
public ProduceMessagePanel waitUntilScreenReady(){
|
||||
loadingSpinner.shouldBe(Condition.disappear);
|
||||
Arrays.asList(partitionDdl, keySerdeDdl, contentSerdeDdl).forEach(element -> element.shouldBe(Condition.visible));
|
||||
return this;
|
||||
}
|
||||
|
||||
@Step
|
||||
public ProduceMessagePanel setKeyField(String value) {
|
||||
keyField.shouldBe(Condition.enabled)
|
||||
.sendKeys(Keys.chord(Keys.DELETE));
|
||||
keyField.setValue(value);
|
||||
clearByKeyboard(keyTextArea);
|
||||
keyTextArea.setValue(value);
|
||||
return this;
|
||||
}
|
||||
|
||||
@Step
|
||||
public ProduceMessagePanel setContentFiled(String value) {
|
||||
contentField.shouldBe(Condition.enabled)
|
||||
.sendKeys(Keys.DELETE);
|
||||
contentField.setValue(value);
|
||||
clearByKeyboard(contentTextArea);
|
||||
contentTextArea.setValue(value);
|
||||
return this;
|
||||
}
|
||||
|
||||
@Step
|
||||
public ProduceMessagePanel setHeaderFiled(String value) {
|
||||
headersField.setValue(value);
|
||||
return new ProduceMessagePanel();
|
||||
headersTextArea.setValue(value);
|
||||
return this;
|
||||
}
|
||||
|
||||
@Step
|
||||
public TopicDetails submitProduceMessage() {
|
||||
public ProduceMessagePanel submitProduceMessage() {
|
||||
submitBtn.shouldBe(Condition.enabled).click();
|
||||
submitBtn.shouldBe(Condition.disappear);
|
||||
refresh();
|
||||
return new TopicDetails();
|
||||
return this;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -5,7 +5,6 @@ import com.codeborne.selenide.Condition;
|
|||
import com.codeborne.selenide.ElementsCollection;
|
||||
import com.codeborne.selenide.SelenideElement;
|
||||
import io.qameta.allure.Step;
|
||||
import org.openqa.selenium.By;
|
||||
|
||||
import static com.codeborne.selenide.Selenide.*;
|
||||
import static com.provectus.kafka.ui.utilities.WebUtils.clickByJavaScript;
|
||||
|
@ -13,43 +12,55 @@ import static org.assertj.core.api.Assertions.assertThat;
|
|||
|
||||
public class TopicCreateEditForm {
|
||||
|
||||
private final SelenideElement timeToRetain = $(By.cssSelector("input#timeToRetain"));
|
||||
private final SelenideElement maxMessageBytes = $(By.name("maxMessageBytes"));
|
||||
protected SelenideElement loadingSpinner = $x("//*[contains(text(),'Loading')]");
|
||||
protected SelenideElement timeToRetainField = $x("//input[@id='timeToRetain']");
|
||||
protected SelenideElement nameField = $x("//input[@name='name']");
|
||||
protected SelenideElement maxMessageBytesField = $x("//input[@name='maxMessageBytes']");
|
||||
protected SelenideElement minInSyncReplicasField = $x("//input[@name='minInSyncReplicas']");
|
||||
protected SelenideElement cleanUpPolicyDdl = $x("//ul[@id='topicFormCleanupPolicy']");
|
||||
protected SelenideElement createTopicBtn = $x("//button[@type='submit']");
|
||||
protected String cleanUpPolicyTypeLocator = "//li[text()='%s']";
|
||||
|
||||
@Step
|
||||
public TopicCreateEditForm waitUntilScreenReady(){
|
||||
loadingSpinner.shouldBe(Condition.disappear);
|
||||
nameField.shouldBe(Condition.visible);
|
||||
return this;
|
||||
}
|
||||
|
||||
@Step
|
||||
public TopicCreateEditForm setTopicName(String topicName) {
|
||||
$("input#topicFormName").setValue(topicName);
|
||||
nameField.setValue(topicName);
|
||||
return this;
|
||||
}
|
||||
|
||||
@Step
|
||||
public TopicCreateEditForm setMinInsyncReplicas(Integer minInsyncReplicas) {
|
||||
$("input[name=minInSyncReplicas]").setValue(minInsyncReplicas.toString());
|
||||
minInSyncReplicasField.setValue(minInsyncReplicas.toString());
|
||||
return this;
|
||||
}
|
||||
|
||||
@Step
|
||||
public TopicCreateEditForm setTimeToRetainDataInMs(Long ms) {
|
||||
timeToRetain.setValue(ms.toString());
|
||||
timeToRetainField.setValue(ms.toString());
|
||||
return this;
|
||||
}
|
||||
|
||||
@Step
|
||||
public TopicCreateEditForm setTimeToRetainDataInMs(String ms) {
|
||||
timeToRetain.setValue(ms);
|
||||
timeToRetainField.setValue(ms);
|
||||
return this;
|
||||
}
|
||||
|
||||
@Step
|
||||
public TopicCreateEditForm setMaxSizeOnDiskInGB(String value) {
|
||||
KafkaUISelectElement kafkaUISelectElement = new KafkaUISelectElement("retentionBytes");
|
||||
kafkaUISelectElement.selectByVisibleText(value);
|
||||
new KafkaUISelectElement("retentionBytes").selectByVisibleText(value);
|
||||
return this;
|
||||
}
|
||||
|
||||
@Step
|
||||
public TopicCreateEditForm setMaxMessageBytes(Long bytes) {
|
||||
maxMessageBytes.setValue(bytes.toString());
|
||||
maxMessageBytesField.setValue(bytes.toString());
|
||||
return this;
|
||||
}
|
||||
|
||||
|
@ -60,7 +71,7 @@ public class TopicCreateEditForm {
|
|||
|
||||
@Step
|
||||
public TopicCreateEditForm setTimeToRetainDataInMsUsingButtons(String value) {
|
||||
timeToRetain
|
||||
timeToRetainField
|
||||
.parent()
|
||||
.parent()
|
||||
.$$("button")
|
||||
|
@ -77,8 +88,8 @@ public class TopicCreateEditForm {
|
|||
|
||||
@Step
|
||||
public TopicCreateEditForm selectCleanupPolicy(String cleanupPolicyOptionValue) {
|
||||
$("ul#topicFormCleanupPolicy").click();
|
||||
$x("//li[text()='" + cleanupPolicyOptionValue + "']").click();
|
||||
cleanUpPolicyDdl.shouldBe(Condition.visible).click();
|
||||
$x(String.format(cleanUpPolicyTypeLocator,cleanupPolicyOptionValue)).shouldBe(Condition.visible).click();
|
||||
return this;
|
||||
}
|
||||
|
||||
|
@ -93,9 +104,9 @@ public class TopicCreateEditForm {
|
|||
}
|
||||
|
||||
@Step
|
||||
public TopicDetails sendData() {
|
||||
clickByJavaScript($x("//button[@type='submit']"));
|
||||
return new TopicDetails();
|
||||
public TopicCreateEditForm clickCreateTopicBtn() {
|
||||
clickByJavaScript(createTopicBtn);
|
||||
return this;
|
||||
}
|
||||
|
||||
@Step
|
||||
|
@ -148,7 +159,7 @@ public class TopicCreateEditForm {
|
|||
|
||||
@Step
|
||||
public TopicCreateEditForm timeToRetainIs(String time) {
|
||||
String value = timeToRetain.getValue();
|
||||
String value = timeToRetainField.getValue();
|
||||
assertThat(value)
|
||||
.as("Time to retain data (in ms) should be " + time)
|
||||
.isEqualTo(time);
|
||||
|
@ -162,7 +173,7 @@ public class TopicCreateEditForm {
|
|||
|
||||
@Step
|
||||
public String getTimeToRetain() {
|
||||
return timeToRetain.getValue();
|
||||
return timeToRetainField.getValue();
|
||||
}
|
||||
|
||||
@Step
|
||||
|
@ -172,7 +183,7 @@ public class TopicCreateEditForm {
|
|||
|
||||
@Step
|
||||
public String getMaxMessageBytes() {
|
||||
return maxMessageBytes.getValue();
|
||||
return maxMessageBytesField.getValue();
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -7,25 +7,36 @@ import io.qameta.allure.Step;
|
|||
import lombok.experimental.ExtensionMethod;
|
||||
import org.openqa.selenium.By;
|
||||
|
||||
import java.util.Arrays;
|
||||
|
||||
import static com.codeborne.selenide.Selenide.*;
|
||||
import static com.provectus.kafka.ui.utilities.WebUtils.clickByJavaScript;
|
||||
|
||||
@ExtensionMethod({WaitUtils.class})
|
||||
public class TopicDetails {
|
||||
|
||||
protected SelenideElement loadingSpinner = $x("//*[contains(text(),'Loading')]");
|
||||
protected SelenideElement dotMenuBtn = $$x("//button[@aria-label='Dropdown Toggle']").first();
|
||||
protected SelenideElement overviewTab = $x("//a[contains(text(),'Overview')]");
|
||||
protected SelenideElement messagesTab = $x("//a[contains(text(),'Messages')]");
|
||||
protected SelenideElement editSettingsTab = $x("//li[@role][contains(text(),'Edit settings')]");
|
||||
protected SelenideElement removeTopicBtn = $x("//ul[@role='menu']//div[contains(text(),'Remove Topic')]");
|
||||
protected SelenideElement confirmBtn = $x("//div[@role='dialog']//button[contains(text(),'Confirm')]");
|
||||
protected SelenideElement produceMessageBtn = $x("//div//button[text()='Produce Message']");
|
||||
protected SelenideElement contentMessageTab = $x("//html//div[@id='root']/div/main//table//p");
|
||||
|
||||
@Step
|
||||
public TopicDetails waitUntilScreenReady() {
|
||||
$(By.linkText("Overview")).shouldBe(Condition.visible);
|
||||
loadingSpinner.shouldBe(Condition.disappear);
|
||||
Arrays.asList(overviewTab,messagesTab).forEach(element -> element.shouldBe(Condition.visible));
|
||||
return this;
|
||||
}
|
||||
|
||||
@Step
|
||||
public TopicCreateEditForm openEditSettings() {
|
||||
public TopicDetails openEditSettings() {
|
||||
clickByJavaScript(dotMenuBtn);
|
||||
$x("//li[@role][text()='Edit settings']").click();
|
||||
return new TopicCreateEditForm();
|
||||
editSettingsTab.shouldBe(Condition.visible).click();
|
||||
return this;
|
||||
}
|
||||
|
||||
@Step
|
||||
|
@ -35,19 +46,18 @@ public class TopicDetails {
|
|||
}
|
||||
|
||||
@Step
|
||||
public TopicsList deleteTopic() {
|
||||
public TopicDetails deleteTopic() {
|
||||
clickByJavaScript(dotMenuBtn);
|
||||
$x("//ul[@role='menu']//div[text()='Remove Topic']").click();
|
||||
SelenideElement confirmButton = $x("//div[@role=\"dialog\"]//button[text()='Confirm']");
|
||||
confirmButton.shouldBe(Condition.enabled).click();
|
||||
confirmButton.shouldBe(Condition.disappear);
|
||||
return new TopicsList();
|
||||
removeTopicBtn.shouldBe(Condition.visible).click();
|
||||
confirmBtn.shouldBe(Condition.enabled).click();
|
||||
confirmBtn.shouldBe(Condition.disappear);
|
||||
return this;
|
||||
}
|
||||
|
||||
@Step
|
||||
public ProduceMessagePanel clickOnButton(String buttonName) {
|
||||
clickByJavaScript($(By.xpath(String.format("//div//button[text()='%s']", buttonName))));
|
||||
return new ProduceMessagePanel();
|
||||
public TopicDetails clickProduceMessageBtn() {
|
||||
clickByJavaScript(produceMessageBtn);
|
||||
return this;
|
||||
}
|
||||
|
||||
@Step
|
||||
|
@ -57,7 +67,7 @@ public class TopicDetails {
|
|||
|
||||
@Step
|
||||
public boolean isContentMessageVisible(String contentMessage) {
|
||||
return contentMessage.matches($x("//html//div[@id='root']/div/main//table//p").getText().trim());
|
||||
return contentMessage.matches(contentMessageTab.getText().trim());
|
||||
}
|
||||
|
||||
private enum DotMenuHeaderItems {
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
package com.provectus.kafka.ui.pages.topic;
|
||||
|
||||
import com.codeborne.selenide.Condition;
|
||||
import com.codeborne.selenide.SelenideElement;
|
||||
import com.provectus.kafka.ui.utilities.WaitUtils;
|
||||
import io.qameta.allure.Step;
|
||||
import lombok.experimental.ExtensionMethod;
|
||||
|
@ -14,28 +15,34 @@ import static com.provectus.kafka.ui.utilities.WebUtils.isVisible;
|
|||
@ExtensionMethod(WaitUtils.class)
|
||||
public class TopicsList {
|
||||
|
||||
protected SelenideElement loadingSpinner = $x("//*[contains(text(),'Loading')]");
|
||||
protected SelenideElement topicListHeader = $x("//h1[text()='Topics']");
|
||||
protected SelenideElement addTopicBtn = $x("//button[normalize-space(text()) ='Add a Topic']");
|
||||
protected SelenideElement topicGrid = $x("//table");
|
||||
protected String topicElementLocator = "//tbody//td//a[text()='%s']";
|
||||
|
||||
@Step
|
||||
public TopicsList waitUntilScreenReady() {
|
||||
$(By.xpath("//*[contains(text(),'Loading')]")).shouldBe(Condition.disappear);
|
||||
$(By.xpath("//h1[text()='Topics']")).shouldBe(Condition.visible);
|
||||
loadingSpinner.shouldBe(Condition.disappear);
|
||||
topicListHeader.shouldBe(Condition.visible);
|
||||
return this;
|
||||
}
|
||||
|
||||
@Step
|
||||
public TopicCreateEditForm pressCreateNewTopic() {
|
||||
clickByJavaScript($x("//button[normalize-space(text()) ='Add a Topic']"));
|
||||
return new TopicCreateEditForm();
|
||||
public TopicsList clickAddTopicBtn() {
|
||||
clickByJavaScript(addTopicBtn);
|
||||
return this;
|
||||
}
|
||||
|
||||
@Step
|
||||
public boolean isTopicVisible(String topicName) {
|
||||
$(By.xpath("//table")).shouldBe(Condition.visible);
|
||||
return isVisible($x("//tbody//td//a[text()='" + topicName + "']"));
|
||||
topicGrid.shouldBe(Condition.visible);
|
||||
return isVisible($x(String.format(topicElementLocator,topicName)));
|
||||
}
|
||||
|
||||
@Step
|
||||
public TopicDetails openTopic(String topicName) {
|
||||
public TopicsList openTopic(String topicName) {
|
||||
$(By.linkText(topicName)).click();
|
||||
return new TopicDetails();
|
||||
return this;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -3,6 +3,7 @@ package com.provectus.kafka.ui.utilities;
|
|||
import com.codeborne.selenide.Condition;
|
||||
import com.codeborne.selenide.SelenideElement;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.openqa.selenium.Keys;
|
||||
|
||||
import static com.codeborne.selenide.Selenide.executeJavaScript;
|
||||
|
||||
|
@ -10,18 +11,26 @@ import static com.codeborne.selenide.Selenide.executeJavaScript;
|
|||
public class WebUtils {
|
||||
|
||||
public static void clickByJavaScript(SelenideElement element) {
|
||||
log.debug("\nclickByJavaScript: {}", element.getSearchCriteria());
|
||||
element.shouldBe(Condition.enabled);
|
||||
String script = "arguments[0].click();";
|
||||
executeJavaScript(script, element);
|
||||
}
|
||||
|
||||
public static void clearByKeyboard(SelenideElement field) {
|
||||
log.debug("\nclearByKeyboard: {}", field.getSearchCriteria());
|
||||
field.shouldBe(Condition.enabled).sendKeys(Keys.END);
|
||||
field.sendKeys(Keys.chord(Keys.CONTROL + "a"), Keys.DELETE);
|
||||
}
|
||||
|
||||
public static boolean isVisible(SelenideElement element) {
|
||||
log.debug("\nisVisible: {}", element.getSearchCriteria());
|
||||
boolean isVisible = false;
|
||||
try {
|
||||
element.shouldBe(Condition.visible);
|
||||
isVisible = true;
|
||||
} catch (Throwable e) {
|
||||
log.debug("Element {} is not visible", element.getSearchCriteria());
|
||||
log.debug("{} is not visible", element.getSearchCriteria());
|
||||
}
|
||||
return isVisible;
|
||||
}
|
||||
|
|
|
@ -6,14 +6,11 @@ import io.qameta.allure.Step;
|
|||
import io.qameta.allure.selenide.AllureSelenide;
|
||||
import lombok.SneakyThrows;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.junit.jupiter.api.AfterEach;
|
||||
import org.junit.jupiter.api.BeforeEach;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.Arrays;
|
||||
|
||||
import static com.codeborne.selenide.Selenide.*;
|
||||
import static com.provectus.kafka.ui.settings.Source.BASE_WEB_URL;
|
||||
|
||||
@Slf4j
|
||||
public abstract class Setup {
|
||||
|
|
|
@ -66,7 +66,7 @@ public class ConnectorsTests extends BaseTest {
|
|||
.openSideMenu(KAFKA_CONNECT);
|
||||
kafkaConnectList
|
||||
.waitUntilScreenReady()
|
||||
.clickCreateConnectorButton();
|
||||
.clickCreateConnectorBtn();
|
||||
connectorCreateForm
|
||||
.waitUntilScreenReady()
|
||||
.setConnectorConfig(connectorForCreate.getName(), connectorForCreate.getConfig());
|
||||
|
@ -114,8 +114,8 @@ public class ConnectorsTests extends BaseTest {
|
|||
connectorDetails
|
||||
.waitUntilScreenReady()
|
||||
.openDotMenu()
|
||||
.clickDeleteButton()
|
||||
.clickConfirmButton();
|
||||
.clickDeleteBtn()
|
||||
.clickConfirmBtn();
|
||||
naviSideBar
|
||||
.openSideMenu(KAFKA_CONNECT);
|
||||
kafkaConnectList
|
||||
|
|
|
@ -51,7 +51,7 @@ public class SchemasTests extends BaseTest {
|
|||
.setSubjectName(schemaAvro.getName())
|
||||
.setSchemaField(fileToString(schemaAvro.getValuePath()))
|
||||
.selectSchemaTypeFromDropdown(schemaAvro.getType())
|
||||
.clickSubmit();
|
||||
.clickSubmitBtn();
|
||||
schemaDetails
|
||||
.waitUntilScreenReady();
|
||||
naviSideBar
|
||||
|
@ -84,7 +84,7 @@ public class SchemasTests extends BaseTest {
|
|||
schemaCreateForm
|
||||
.selectCompatibilityLevelFromDropdown(CompatibilityLevel.CompatibilityEnum.NONE)
|
||||
.setNewSchemaValue(fileToString(AVRO_API.getValuePath()))
|
||||
.clickSubmit();
|
||||
.clickSubmitBtn();
|
||||
schemaDetails
|
||||
.waitUntilScreenReady();
|
||||
Assertions.assertEquals(CompatibilityLevel.CompatibilityEnum.NONE.toString(), schemaDetails.getCompatibility(), "getCompatibility()");
|
||||
|
@ -128,7 +128,7 @@ public class SchemasTests extends BaseTest {
|
|||
.setSubjectName(schemaJson.getName())
|
||||
.setSchemaField(fileToString(schemaJson.getValuePath()))
|
||||
.selectSchemaTypeFromDropdown(schemaJson.getType())
|
||||
.clickSubmit();
|
||||
.clickSubmitBtn();
|
||||
schemaDetails
|
||||
.waitUntilScreenReady();
|
||||
naviSideBar
|
||||
|
@ -177,7 +177,7 @@ public class SchemasTests extends BaseTest {
|
|||
.setSubjectName(schemaProtobuf.getName())
|
||||
.setSchemaField(fileToString(schemaProtobuf.getValuePath()))
|
||||
.selectSchemaTypeFromDropdown(schemaProtobuf.getType())
|
||||
.clickSubmit();
|
||||
.clickSubmitBtn();
|
||||
schemaDetails
|
||||
.waitUntilScreenReady();
|
||||
naviSideBar
|
||||
|
|
|
@ -49,10 +49,11 @@ public class TopicTests extends BaseTest {
|
|||
.openSideMenu(TOPICS);
|
||||
topicsList
|
||||
.waitUntilScreenReady()
|
||||
.pressCreateNewTopic();
|
||||
.clickAddTopicBtn();
|
||||
topicCreateEditForm
|
||||
.waitUntilScreenReady()
|
||||
.setTopicName(topicToCreate.getName())
|
||||
.sendData();
|
||||
.clickCreateTopicBtn();
|
||||
topicDetails
|
||||
.waitUntilScreenReady();
|
||||
naviSideBar
|
||||
|
@ -79,12 +80,13 @@ public class TopicTests extends BaseTest {
|
|||
.waitUntilScreenReady()
|
||||
.openEditSettings();
|
||||
topicCreateEditForm
|
||||
.waitUntilScreenReady()
|
||||
.selectCleanupPolicy(TOPIC_FOR_UPDATE.getCompactPolicyValue())
|
||||
.setMinInsyncReplicas(10)
|
||||
.setTimeToRetainDataInMs(TOPIC_FOR_UPDATE.getTimeToRetainData())
|
||||
.setMaxSizeOnDiskInGB(TOPIC_FOR_UPDATE.getMaxSizeOnDisk())
|
||||
.setMaxMessageBytes(TOPIC_FOR_UPDATE.getMaxMessageBytes())
|
||||
.sendData();
|
||||
.clickCreateTopicBtn();
|
||||
topicDetails
|
||||
.waitUntilScreenReady();
|
||||
naviSideBar
|
||||
|
@ -139,8 +141,9 @@ public class TopicTests extends BaseTest {
|
|||
topicDetails
|
||||
.waitUntilScreenReady()
|
||||
.openTopicMenu(TopicDetails.TopicMenu.MESSAGES)
|
||||
.clickOnButton("Produce Message");
|
||||
.clickProduceMessageBtn();
|
||||
produceMessagePanel
|
||||
.waitUntilScreenReady()
|
||||
.setContentFiled(TOPIC_FOR_UPDATE.getMessageContent())
|
||||
.setKeyField(TOPIC_FOR_UPDATE.getMessageKey())
|
||||
.submitProduceMessage();
|
||||
|
|
Loading…
Add table
Reference in a new issue