Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IDAM-365 IdAM analytics bugs #54

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/Header/Account/Account.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,9 @@ export default class Account extends Component {

if (href.indexOf("editprofile") > -1) {
eventLabel = "Edit profile";
} else if (href.indexOf("signout") > -1) {
} else if (href.indexOf("signout") > -1 || href.indexOf("logout") > -1) {
eventLabel = "Sign out";
} else if (href.indexOf("signin") > -1) {
} else if (href.indexOf("signin") > -1 || href.indexOf("login") > -1) {
eventLabel = "Sign in";
}

Expand Down
2 changes: 1 addition & 1 deletion src/Header/Header.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ Header.propTypes = {
enabled: PropTypes.bool,
search: PropTypes.oneOfType([PropTypes.bool, PropTypes.object]),
cookie: PropTypes.oneOfType([PropTypes.bool, PropTypes.object]),
auth: PropTypes.object,
auth: PropTypes.oneOfType([PropTypes.bool, PropTypes.object]),
onNavigating: PropTypes.oneOfType([PropTypes.func, PropTypes.string])
};

Expand Down
4 changes: 2 additions & 2 deletions src/Header/Nav/Nav.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,9 @@ export default class Nav extends Component {
let eventLabel;
if (href.indexOf("editprofile") > -1) {
eventLabel = "Edit profile";
} else if (href.indexOf("signout") > -1) {
} else if (href.indexOf("signout") > -1 || href.indexOf("logout") > -1) {
eventLabel = "Sign out";
} else if (href.indexOf("signin") > -1) {
} else if (href.indexOf("signin") > -1 || href.indexOf("login") > -1) {
eventLabel = "Sign in";
}

Expand Down
1 change: 0 additions & 1 deletion src/Header/Search/Autocomplete/Autocomplete.test.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,6 @@ describe("Autocomplete", () => {

it("should not load suggestions within the reate limit threshold", () => {
jest.useFakeTimers();
const callback = () => {};
const wrapper = shallow(
<Autocomplete {...defaultProps} source="/url" query="test" />
);
Expand Down
2 changes: 1 addition & 1 deletion types.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ declare module "@nice-digital/global-nav" {
skipLinkId?: string;
search?: false | SearchProps;
cookie?: boolean;
auth?: NiceAccountsProviderProps | IdamProviderProps;
auth?: false | NiceAccountsProviderProps | IdamProviderProps;
onNavigating?: string | OnNavigatingCallback;
};

Expand Down