Skip to content

Commit

Permalink
fix(tests): Fixing add_users smoke test (datahub-project#7116)
Browse files Browse the repository at this point in the history
  • Loading branch information
jjoyce0510 authored and Eric Yomi committed Feb 8, 2023
1 parent bf28db5 commit 9b19168
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
4 changes: 2 additions & 2 deletions datahub-web-react/src/app/shared/ManageAccount.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ export const ManageAccount = ({ urn: _urn, pictureLink: _pictureLink, name }: Pr
</MenuItem>
<Menu.Divider />
<MenuItem danger key="logout" tabIndex={0}>
<a href="/logOut" onClick={handleLogout}>
<a href="/logOut" onClick={handleLogout} data-testid="log-out-menu-item">
Sign Out
</a>
</MenuItem>
Expand All @@ -112,7 +112,7 @@ export const ManageAccount = ({ urn: _urn, pictureLink: _pictureLink, name }: Pr

return (
<Dropdown overlay={menu} trigger={['click']}>
<DropdownWrapper>
<DropdownWrapper data-testid="manage-account-menu">
<CustomAvatar photoUrl={_pictureLink} style={{ marginRight: 4 }} name={name} />
<DownArrow />
</DropdownWrapper>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ describe("add_user", () => {
cy.waitTextVisible(/signup\?invite_token=\w+/).then(($elem) => {
const inviteLink = $elem.text();
cy.log(inviteLink);
cy.visit("/settings/identities/users");
cy.logout();
cy.visit(inviteLink);
let name = tryToSignUp();
Expand Down
3 changes: 2 additions & 1 deletion smoke-test/tests/cypress/cypress/support/commands.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,8 @@ Cypress.Commands.add('deleteUrn', (urn) => {
})

Cypress.Commands.add("logout", () => {
cy.visit("/logOut")
cy.get(selectorWithtestId("manage-account-menu")).click();
cy.get(selectorWithtestId("log-out-menu-item")).click({ force: true });
cy.waitTextVisible("Username");
cy.waitTextVisible("Password");
});
Expand Down

0 comments on commit 9b19168

Please sign in to comment.