forked from datahub-project/datahub
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(ci): add cypress test ui based ingestion (datahub-project#6769)
- Loading branch information
1 parent
45b4d71
commit 1e36ef1
Showing
4 changed files
with
51 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
41 changes: 41 additions & 0 deletions
41
smoke-test/tests/cypress/cypress/integration/mutations/managed_ingestion.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
function readyToTypeEditor() { | ||
return cy.get('.monaco-editor textarea:first') | ||
.click().focused(); | ||
} | ||
|
||
describe("run managed ingestion", () => { | ||
it("create run managed ingestion source", () => { | ||
let number = Math.floor(Math.random() * 100000); | ||
let testName = `cypress test source ${number}` | ||
let cli_version = "0.9.3.3rc5"; | ||
cy.login(); | ||
cy.goToIngestionPage(); | ||
cy.clickOptionWithText("Create new source"); | ||
cy.clickOptionWithText("Other"); | ||
|
||
cy.waitTextVisible("source-type"); | ||
readyToTypeEditor().type('{ctrl}a').clear() | ||
readyToTypeEditor().type("source:"); | ||
readyToTypeEditor().type("{enter}"); | ||
readyToTypeEditor().type(" type: demo-data"); | ||
readyToTypeEditor().type("{enter}"); | ||
// no space because the editor starts new line at same indentation | ||
readyToTypeEditor().type("config: {}"); | ||
cy.clickOptionWithText("Next") | ||
|
||
cy.clickOptionWithText("Skip") | ||
|
||
cy.enterTextInTestId('source-name-input', testName) | ||
cy.clickOptionWithText("Advanced") | ||
cy.enterTextInTestId('cli-version-input', cli_version) | ||
cy.clickOptionWithText("Save & Run") | ||
cy.waitTextVisible(testName) | ||
|
||
cy.contains(testName).parent().within(() => { | ||
cy.contains("Succeeded", {timeout: 30000}) | ||
cy.clickOptionWithTestId("delete-button"); | ||
}) | ||
cy.clickOptionWithText("Yes") | ||
cy.ensureTextNotPresent(testName) | ||
}) | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters