-
Notifications
You must be signed in to change notification settings - Fork 3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(build): refactor cypress tests, add some tests for invite users,…
… domain creation (#6259)
- Loading branch information
1 parent
6011b03
commit 4d3c25b
Showing
18 changed files
with
256 additions
and
106 deletions.
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
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
19 changes: 12 additions & 7 deletions
19
smoke-test/tests/cypress/cypress/integration/analytics/analytics.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 |
---|---|---|
@@ -1,14 +1,19 @@ | ||
describe('analytics', () => { | ||
it('can go to a dataset and see analytics in Section Views', () => { | ||
it('can go to a chart and see analytics in Section Views', () => { | ||
cy.login(); | ||
|
||
cy.visit("/analytics"); | ||
cy.contains("documentation").should('not.exist'); | ||
cy.goToAnalytics(); | ||
|
||
cy.visit("/chart/urn:li:chart:(looker,baz1)"); | ||
cy.get("#rc-tabs-0-panel-Dashboards").click({ force: true }); | ||
cy.goToChart("urn:li:chart:(looker,cypress_baz1)"); | ||
cy.waitTextVisible("Baz Chart 1"); | ||
cy.openEntityTab("Dashboards"); | ||
|
||
cy.visit("/analytics"); | ||
cy.contains("documentation"); | ||
cy.goToAnalytics(); | ||
cy.wait(1000); | ||
cy.contains("Section Views across Entity Types").scrollIntoView({ | ||
ensureScrollable: false | ||
}) | ||
cy.wait(1000); | ||
cy.waitTextPresent("dashboards"); | ||
}); | ||
}) |
4 changes: 1 addition & 3 deletions
4
smoke-test/tests/cypress/cypress/integration/containers/containers.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
4 changes: 1 addition & 3 deletions
4
smoke-test/tests/cypress/cypress/integration/domains/domains.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
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
55 changes: 21 additions & 34 deletions
55
smoke-test/tests/cypress/cypress/integration/lineage/impact_analysis.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
40 changes: 40 additions & 0 deletions
40
smoke-test/tests/cypress/cypress/integration/mutations/add_users.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,40 @@ | ||
const tryToSignUp = () => { | ||
cy.enterTextInTestId("email", "[email protected]") | ||
cy.enterTextInTestId("name", "Example Name") | ||
cy.enterTextInTestId("password", "Example password") | ||
cy.enterTextInTestId("confirmPassword", "Example password") | ||
|
||
cy.mouseover("#title").click() | ||
cy.waitTextVisible("Other").click() | ||
|
||
cy.get("[type=submit]").click() | ||
}; | ||
|
||
describe("add_user", () => { | ||
it("go to user link and invite a user", () => { | ||
cy.login() | ||
|
||
cy.visit("/settings/identities/users"); | ||
cy.waitTextVisible("Invite Users"); | ||
|
||
cy.clickOptionWithText("Invite Users") | ||
|
||
cy.waitTextVisible('signup?invite_token').then(($elem) => { | ||
const inviteLink = $elem.text(); | ||
cy.logout(); | ||
cy.visit(inviteLink); | ||
tryToSignUp(); | ||
cy.waitTextVisible("Accepted invite!") | ||
}).then(() => { | ||
cy.logout(); | ||
cy.visit("/signup?invite_token=bad_token"); | ||
tryToSignUp() | ||
cy.waitTextVisible("Failed to log in! An unexpected error occurred.") | ||
}); | ||
}); | ||
}); | ||
|
||
// Verify you can’t generate a reset password link for a non-native user (root, for example) | ||
// Generate a reset password link for a native user | ||
// Log out, then verify that using a bad reset token in the URL doesn’t allow you to reset password | ||
// Use the correct reset link to reset native user credentials |
7 changes: 4 additions & 3 deletions
7
smoke-test/tests/cypress/cypress/integration/mutations/deprecations.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
25 changes: 25 additions & 0 deletions
25
smoke-test/tests/cypress/cypress/integration/mutations/domains.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,25 @@ | ||
const test_domain = "CypressDomainTest"; | ||
|
||
describe("add remove domain", () => { | ||
it("create domain", () => { | ||
cy.login(); | ||
cy.goToDomainList(); | ||
cy.clickOptionWithText("New Domain"); | ||
cy.addViaModel(test_domain, "Create new Domain") | ||
cy.waitTextVisible("Created domain!") | ||
|
||
cy.waitTextVisible(test_domain) | ||
|
||
cy.waitTextVisible(test_domain) | ||
.parents("[data-testid^='urn:li:domain:']") | ||
.invoke('attr', 'data-testid') | ||
.then((data_test_id) => { | ||
cy.log(data_test_id) | ||
}) | ||
}) | ||
|
||
// add asset to domain | ||
// Search filter by domain | ||
// Remove entity from domain | ||
// Delete a domain - ensure that the dangling reference is deleted on the asset | ||
}); |
Oops, something went wrong.