mirror of
https://github.com/datahub-project/datahub.git
synced 2025-08-26 10:06:13 +00:00
fix(test): improve cypress tests (#9711)
This commit is contained in:
parent
9b051e38d6
commit
d6a30a74a7
@ -1,6 +1,6 @@
|
|||||||
const urn = "urn:li:dataset:(urn:li:dataPlatform:hive,cypress_logging_events,PROD)";
|
const urn = "urn:li:dataset:(urn:li:dataPlatform:hive,cypress_logging_events,PROD)";
|
||||||
const datasetName = "cypress_logging_events";
|
const datasetName = "cypress_logging_events";
|
||||||
const glossaryTerm = "CypressGlosssaryTerm";
|
const glossaryTerm = "CypressGlossaryTerm";
|
||||||
const glossaryTermGroup = "CypressGlossaryGroup";
|
const glossaryTermGroup = "CypressGlossaryGroup";
|
||||||
|
|
||||||
describe("glossary", () => {
|
describe("glossary", () => {
|
||||||
@ -8,9 +8,9 @@ describe("glossary", () => {
|
|||||||
cy.loginWithCredentials();
|
cy.loginWithCredentials();
|
||||||
cy.goToGlossaryList();
|
cy.goToGlossaryList();
|
||||||
cy.clickOptionWithText("Add Term");
|
cy.clickOptionWithText("Add Term");
|
||||||
cy.addViaModal(glossaryTerm, "Create Glossary Term", glossaryTerm);
|
cy.addViaModal(glossaryTerm, "Create Glossary Term", glossaryTerm, "glossary-entity-modal-create-button");
|
||||||
cy.clickOptionWithText("Add Term Group");
|
cy.clickOptionWithText("Add Term Group");
|
||||||
cy.addViaModal(glossaryTermGroup, "Create Term Group", glossaryTermGroup);
|
cy.addViaModal(glossaryTermGroup, "Create Term Group", glossaryTermGroup, "glossary-entity-modal-create-button");
|
||||||
cy.addTermToDataset(urn, datasetName, glossaryTerm);
|
cy.addTermToDataset(urn, datasetName, glossaryTerm);
|
||||||
cy.waitTextVisible(glossaryTerm)
|
cy.waitTextVisible(glossaryTerm)
|
||||||
cy.goToGlossaryList();
|
cy.goToGlossaryList();
|
||||||
|
@ -26,7 +26,7 @@ describe("run managed ingestion", () => {
|
|||||||
cy.enterTextInTestId('source-name-input', testName)
|
cy.enterTextInTestId('source-name-input', testName)
|
||||||
cy.clickOptionWithText("Advanced")
|
cy.clickOptionWithText("Advanced")
|
||||||
cy.enterTextInTestId('cli-version-input', cli_version)
|
cy.enterTextInTestId('cli-version-input', cli_version)
|
||||||
cy.clickOptionWithText("Save & Run")
|
cy.clickOptionWithTextToScrollintoView("Save & Run")
|
||||||
cy.waitTextVisible(testName)
|
cy.waitTextVisible(testName)
|
||||||
|
|
||||||
cy.contains(testName).parent().within(() => {
|
cy.contains(testName).parent().within(() => {
|
||||||
|
@ -183,10 +183,10 @@ Cypress.Commands.add("addViaFormModal", (text, modelHeader) => {
|
|||||||
cy.get(".ant-modal-footer > button:nth-child(2)").click();
|
cy.get(".ant-modal-footer > button:nth-child(2)").click();
|
||||||
});
|
});
|
||||||
|
|
||||||
Cypress.Commands.add("addViaModal", (text, modelHeader,value) => {
|
Cypress.Commands.add("addViaModal", (text, modelHeader, value, dataTestId) => {
|
||||||
cy.waitTextVisible(modelHeader);
|
cy.waitTextVisible(modelHeader);
|
||||||
cy.get(".ant-input-affix-wrapper > input[type='text']").first().type(text);
|
cy.get(".ant-input-affix-wrapper > input[type='text']").first().type(text);
|
||||||
cy.get(".ant-modal-footer > button:nth-child(2)").click();
|
cy.get('[data-testid="' + dataTestId + '"]').click();
|
||||||
cy.contains(value).should('be.visible');
|
cy.contains(value).should('be.visible');
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user