|
@@ -4,8 +4,6 @@ import com.provectus.kafka.ui.api.model.CompatibilityLevel;
|
|
import com.provectus.kafka.ui.base.BaseTest;
|
|
import com.provectus.kafka.ui.base.BaseTest;
|
|
import com.provectus.kafka.ui.models.Schema;
|
|
import com.provectus.kafka.ui.models.Schema;
|
|
import com.provectus.kafka.ui.pages.MainPage;
|
|
import com.provectus.kafka.ui.pages.MainPage;
|
|
-import com.provectus.kafka.ui.pages.schema.SchemaEditView;
|
|
|
|
-import com.provectus.kafka.ui.pages.schema.SchemaView;
|
|
|
|
import com.provectus.kafka.ui.utilities.qaseIoUtils.annotations.AutomationStatus;
|
|
import com.provectus.kafka.ui.utilities.qaseIoUtils.annotations.AutomationStatus;
|
|
import com.provectus.kafka.ui.utilities.qaseIoUtils.annotations.Suite;
|
|
import com.provectus.kafka.ui.utilities.qaseIoUtils.annotations.Suite;
|
|
import com.provectus.kafka.ui.utilities.qaseIoUtils.enums.Status;
|
|
import com.provectus.kafka.ui.utilities.qaseIoUtils.enums.Status;
|
|
@@ -32,7 +30,7 @@ public class SchemasTests extends BaseTest {
|
|
@SneakyThrows
|
|
@SneakyThrows
|
|
public void beforeAll() {
|
|
public void beforeAll() {
|
|
SCHEMA_LIST.addAll(List.of(AVRO_API, JSON_API, PROTOBUF_API));
|
|
SCHEMA_LIST.addAll(List.of(AVRO_API, JSON_API, PROTOBUF_API));
|
|
- SCHEMA_LIST.forEach(schema -> apiHelpers.createSchema(CLUSTER_NAME, schema));
|
|
|
|
|
|
+ SCHEMA_LIST.forEach(schema -> apiHelper.createSchema(CLUSTER_NAME, schema));
|
|
}
|
|
}
|
|
|
|
|
|
@DisplayName("should create AVRO schema")
|
|
@DisplayName("should create AVRO schema")
|
|
@@ -45,7 +43,7 @@ public class SchemasTests extends BaseTest {
|
|
Schema schemaAvro = Schema.createSchemaAvro();
|
|
Schema schemaAvro = Schema.createSchemaAvro();
|
|
mainPage.goTo()
|
|
mainPage.goTo()
|
|
.goToSideMenu(CLUSTER_NAME, MainPage.SideMenuOptions.SCHEMA_REGISTRY);
|
|
.goToSideMenu(CLUSTER_NAME, MainPage.SideMenuOptions.SCHEMA_REGISTRY);
|
|
- schemaRegistry.clickCreateSchema()
|
|
|
|
|
|
+ schemaRegistryList.clickCreateSchema()
|
|
.setSubjectName(schemaAvro.getName())
|
|
.setSubjectName(schemaAvro.getName())
|
|
.setSchemaField(fileToString(schemaAvro.getValuePath()))
|
|
.setSchemaField(fileToString(schemaAvro.getValuePath()))
|
|
.selectSchemaTypeFromDropdown(schemaAvro.getType())
|
|
.selectSchemaTypeFromDropdown(schemaAvro.getType())
|
|
@@ -53,7 +51,7 @@ public class SchemasTests extends BaseTest {
|
|
.waitUntilScreenReady();
|
|
.waitUntilScreenReady();
|
|
mainPage.goTo()
|
|
mainPage.goTo()
|
|
.goToSideMenu(CLUSTER_NAME, MainPage.SideMenuOptions.SCHEMA_REGISTRY);
|
|
.goToSideMenu(CLUSTER_NAME, MainPage.SideMenuOptions.SCHEMA_REGISTRY);
|
|
- Assertions.assertTrue(schemaRegistry.isSchemaVisible(schemaAvro.getName()),"isSchemaVisible()");
|
|
|
|
|
|
+ Assertions.assertTrue(schemaRegistryList.isSchemaVisible(schemaAvro.getName()), "isSchemaVisible()");
|
|
SCHEMA_LIST.add(schemaAvro);
|
|
SCHEMA_LIST.add(schemaAvro);
|
|
}
|
|
}
|
|
|
|
|
|
@@ -67,15 +65,15 @@ public class SchemasTests extends BaseTest {
|
|
AVRO_API.setValuePath(System.getProperty("user.dir") + "/src/main/resources/testData/schema_avro_for_update.json");
|
|
AVRO_API.setValuePath(System.getProperty("user.dir") + "/src/main/resources/testData/schema_avro_for_update.json");
|
|
mainPage.goTo()
|
|
mainPage.goTo()
|
|
.goToSideMenu(CLUSTER_NAME, MainPage.SideMenuOptions.SCHEMA_REGISTRY);
|
|
.goToSideMenu(CLUSTER_NAME, MainPage.SideMenuOptions.SCHEMA_REGISTRY);
|
|
- schemaRegistry.openSchema(AVRO_API.getName())
|
|
|
|
|
|
+ schemaRegistryList.openSchema(AVRO_API.getName())
|
|
.waitUntilScreenReady()
|
|
.waitUntilScreenReady()
|
|
.openEditSchema();
|
|
.openEditSchema();
|
|
- Assertions.assertTrue(new SchemaEditView().isSchemaDropDownDisabled(),"isSchemaDropDownDisabled()");
|
|
|
|
- new SchemaEditView().selectCompatibilityLevelFromDropdown(CompatibilityLevel.CompatibilityEnum.NONE)
|
|
|
|
|
|
+ Assertions.assertTrue(schemaEditView.isSchemaDropDownDisabled(), "isSchemaDropDownDisabled()");
|
|
|
|
+ schemaEditView.selectCompatibilityLevelFromDropdown(CompatibilityLevel.CompatibilityEnum.NONE)
|
|
.setNewSchemaValue(fileToString(AVRO_API.getValuePath()))
|
|
.setNewSchemaValue(fileToString(AVRO_API.getValuePath()))
|
|
.clickSubmit()
|
|
.clickSubmit()
|
|
.waitUntilScreenReady();
|
|
.waitUntilScreenReady();
|
|
- Assertions.assertEquals(CompatibilityLevel.CompatibilityEnum.NONE.toString(), new SchemaView().getCompatibility(), "getCompatibility()");
|
|
|
|
|
|
+ Assertions.assertEquals(CompatibilityLevel.CompatibilityEnum.NONE.toString(), schemaView.getCompatibility(), "getCompatibility()");
|
|
}
|
|
}
|
|
|
|
|
|
@DisplayName("should delete AVRO schema")
|
|
@DisplayName("should delete AVRO schema")
|
|
@@ -87,10 +85,10 @@ public class SchemasTests extends BaseTest {
|
|
void deleteSchemaAvro() {
|
|
void deleteSchemaAvro() {
|
|
mainPage.goTo()
|
|
mainPage.goTo()
|
|
.goToSideMenu(CLUSTER_NAME, MainPage.SideMenuOptions.SCHEMA_REGISTRY);
|
|
.goToSideMenu(CLUSTER_NAME, MainPage.SideMenuOptions.SCHEMA_REGISTRY);
|
|
- schemaRegistry.openSchema(AVRO_API.getName())
|
|
|
|
|
|
+ schemaRegistryList.openSchema(AVRO_API.getName())
|
|
.waitUntilScreenReady()
|
|
.waitUntilScreenReady()
|
|
.removeSchema();
|
|
.removeSchema();
|
|
- Assertions.assertFalse(schemaRegistry.isSchemaVisible(AVRO_API.getName()),"isSchemaVisible()");
|
|
|
|
|
|
+ Assertions.assertFalse(schemaRegistryList.isSchemaVisible(AVRO_API.getName()), "isSchemaVisible()");
|
|
SCHEMA_LIST.remove(AVRO_API);
|
|
SCHEMA_LIST.remove(AVRO_API);
|
|
}
|
|
}
|
|
|
|
|
|
@@ -104,14 +102,14 @@ public class SchemasTests extends BaseTest {
|
|
Schema schemaJson = Schema.createSchemaJson();
|
|
Schema schemaJson = Schema.createSchemaJson();
|
|
mainPage.goTo()
|
|
mainPage.goTo()
|
|
.goToSideMenu(CLUSTER_NAME, MainPage.SideMenuOptions.SCHEMA_REGISTRY);
|
|
.goToSideMenu(CLUSTER_NAME, MainPage.SideMenuOptions.SCHEMA_REGISTRY);
|
|
- schemaRegistry.clickCreateSchema()
|
|
|
|
|
|
+ schemaRegistryList.clickCreateSchema()
|
|
.setSubjectName(schemaJson.getName())
|
|
.setSubjectName(schemaJson.getName())
|
|
- .setSchemaField(fileToString(schemaJson.getValuePath()))
|
|
|
|
- .selectSchemaTypeFromDropdown(schemaJson.getType())
|
|
|
|
|
|
+ .setSchemaField(fileToString(schemaJson.getValuePath()));
|
|
|
|
+ schemaEditView.selectSchemaTypeFromDropdown(schemaJson.getType())
|
|
.clickSubmit()
|
|
.clickSubmit()
|
|
.waitUntilScreenReady();
|
|
.waitUntilScreenReady();
|
|
mainPage.goToSideMenu(CLUSTER_NAME, MainPage.SideMenuOptions.SCHEMA_REGISTRY);
|
|
mainPage.goToSideMenu(CLUSTER_NAME, MainPage.SideMenuOptions.SCHEMA_REGISTRY);
|
|
- Assertions.assertTrue(schemaRegistry.isSchemaVisible(schemaJson.getName()),"isSchemaVisible()");
|
|
|
|
|
|
+ Assertions.assertTrue(schemaRegistryList.isSchemaVisible(schemaJson.getName()), "isSchemaVisible()");
|
|
SCHEMA_LIST.add(schemaJson);
|
|
SCHEMA_LIST.add(schemaJson);
|
|
}
|
|
}
|
|
|
|
|
|
@@ -124,10 +122,10 @@ public class SchemasTests extends BaseTest {
|
|
void deleteSchemaJson() {
|
|
void deleteSchemaJson() {
|
|
mainPage.goTo()
|
|
mainPage.goTo()
|
|
.goToSideMenu(CLUSTER_NAME, MainPage.SideMenuOptions.SCHEMA_REGISTRY);
|
|
.goToSideMenu(CLUSTER_NAME, MainPage.SideMenuOptions.SCHEMA_REGISTRY);
|
|
- schemaRegistry.openSchema(JSON_API.getName())
|
|
|
|
|
|
+ schemaRegistryList.openSchema(JSON_API.getName())
|
|
.waitUntilScreenReady()
|
|
.waitUntilScreenReady()
|
|
.removeSchema();
|
|
.removeSchema();
|
|
- Assertions.assertFalse(schemaRegistry.isSchemaVisible(JSON_API.getName()),"isSchemaVisible()");
|
|
|
|
|
|
+ Assertions.assertFalse(schemaRegistryList.isSchemaVisible(JSON_API.getName()), "isSchemaVisible()");
|
|
SCHEMA_LIST.remove(JSON_API);
|
|
SCHEMA_LIST.remove(JSON_API);
|
|
}
|
|
}
|
|
|
|
|
|
@@ -141,14 +139,14 @@ public class SchemasTests extends BaseTest {
|
|
Schema schemaProtobuf = Schema.createSchemaProtobuf();
|
|
Schema schemaProtobuf = Schema.createSchemaProtobuf();
|
|
mainPage.goTo()
|
|
mainPage.goTo()
|
|
.goToSideMenu(CLUSTER_NAME, MainPage.SideMenuOptions.SCHEMA_REGISTRY);
|
|
.goToSideMenu(CLUSTER_NAME, MainPage.SideMenuOptions.SCHEMA_REGISTRY);
|
|
- schemaRegistry.clickCreateSchema()
|
|
|
|
|
|
+ schemaRegistryList.clickCreateSchema()
|
|
.setSubjectName(schemaProtobuf.getName())
|
|
.setSubjectName(schemaProtobuf.getName())
|
|
- .setSchemaField(fileToString(schemaProtobuf.getValuePath()))
|
|
|
|
- .selectSchemaTypeFromDropdown(schemaProtobuf.getType())
|
|
|
|
|
|
+ .setSchemaField(fileToString(schemaProtobuf.getValuePath()));
|
|
|
|
+ schemaEditView.selectSchemaTypeFromDropdown(schemaProtobuf.getType())
|
|
.clickSubmit()
|
|
.clickSubmit()
|
|
.waitUntilScreenReady();
|
|
.waitUntilScreenReady();
|
|
mainPage.goToSideMenu(CLUSTER_NAME, MainPage.SideMenuOptions.SCHEMA_REGISTRY);
|
|
mainPage.goToSideMenu(CLUSTER_NAME, MainPage.SideMenuOptions.SCHEMA_REGISTRY);
|
|
- Assertions.assertTrue(schemaRegistry.isSchemaVisible(schemaProtobuf.getName()),"isSchemaVisible()");
|
|
|
|
|
|
+ Assertions.assertTrue(schemaRegistryList.isSchemaVisible(schemaProtobuf.getName()), "isSchemaVisible()");
|
|
SCHEMA_LIST.add(schemaProtobuf);
|
|
SCHEMA_LIST.add(schemaProtobuf);
|
|
}
|
|
}
|
|
|
|
|
|
@@ -161,15 +159,15 @@ public class SchemasTests extends BaseTest {
|
|
void deleteSchemaProtobuf() {
|
|
void deleteSchemaProtobuf() {
|
|
mainPage.goTo()
|
|
mainPage.goTo()
|
|
.goToSideMenu(CLUSTER_NAME, MainPage.SideMenuOptions.SCHEMA_REGISTRY);
|
|
.goToSideMenu(CLUSTER_NAME, MainPage.SideMenuOptions.SCHEMA_REGISTRY);
|
|
- schemaRegistry.openSchema(PROTOBUF_API.getName())
|
|
|
|
|
|
+ schemaRegistryList.openSchema(PROTOBUF_API.getName())
|
|
.waitUntilScreenReady()
|
|
.waitUntilScreenReady()
|
|
.removeSchema();
|
|
.removeSchema();
|
|
- Assertions.assertFalse(schemaRegistry.isSchemaVisible(PROTOBUF_API.getName()),"isSchemaVisible()");
|
|
|
|
|
|
+ Assertions.assertFalse(schemaRegistryList.isSchemaVisible(PROTOBUF_API.getName()), "isSchemaVisible()");
|
|
SCHEMA_LIST.remove(PROTOBUF_API);
|
|
SCHEMA_LIST.remove(PROTOBUF_API);
|
|
}
|
|
}
|
|
|
|
|
|
@AfterAll
|
|
@AfterAll
|
|
public void afterAll() {
|
|
public void afterAll() {
|
|
- SCHEMA_LIST.forEach(schema -> apiHelpers.deleteSchema(CLUSTER_NAME, schema.getName()));
|
|
|
|
|
|
+ SCHEMA_LIST.forEach(schema -> apiHelper.deleteSchema(CLUSTER_NAME, schema.getName()));
|
|
}
|
|
}
|
|
}
|
|
}
|