@ssa-ui-kit/widgets 0.0.4-alpha → 0.0.5-alpha
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/custom-shots/widgets-bots-table--no-control-orders--menu-opened_[w1920px].png +0 -0
- package/custom-shots/widgets-bots-table--no-control-orders--run-reason-modal_[w1920px].png +0 -0
- package/custom-shots/widgets-collapsiblenavbar-opened__[w1920px].png +0 -0
- package/custom-shots/widgets-collapsiblenavbar-opened__[w899px]_menu_opened.png +0 -0
- package/custom-shots/widgets-collapsiblenavbar-opened__[w899px]_statistics_submenu.png +0 -0
- package/custom-shots/widgets-filters--default__[w1920px].png +0 -0
- package/custom-shots/widgets-filters--more-button__[w900px].png +0 -0
- package/custom-shots/widgets-meal-nutrients--hint-opened__[w1440px].png +0 -0
- package/custom-shots/widgets-meal-nutrients--hint-opened__[w1920px].png +0 -0
- package/custom-shots/widgets-meal-nutrients--hint-opened__dropdown__[w390px].png +0 -0
- package/custom-shots/widgets-navbar-opened__[w1920px].png +0 -0
- package/custom-shots/widgets-notification-menu--is-opened__[w1440px].png +0 -0
- package/custom-shots/widgets-notification-menu--is-opened__[w1920px].png +0 -0
- package/custom-shots/widgets-pagination--next-hover__[w1920px].png +0 -0
- package/custom-shots/widgets-pagination--not-selected-hover__[w1920px].png +0 -0
- package/custom-shots/widgets-pagination--previous-hover__[w1920px].png +0 -0
- package/custom-shots/widgets-pagination--selected-hover__[w1920px].png +0 -0
- package/custom-shots/widgets-progressInfo__[w1440px].png +0 -0
- package/custom-shots/widgets-progressInfo__[w1920px].png +0 -0
- package/custom-shots/widgets-progressInfo__dropdown__[w390px].png +0 -0
- package/custom-shots/widgets-progressInfo__dropdown__[w900px].png +0 -0
- package/custom-shots/widgets-searchbox--cross-icon__[w900px].png +0 -0
- package/custom-shots/widgets-searchbox--search-icon__[w900px].png +0 -0
- package/custom-shots/widgets-table-filters--opened__[w1920px].png +0 -0
- package/custom-shots/widgets-trading-info-card--hover__[w1920px].png +0 -0
- package/custom-shots/widgets-user-profile--is-opened__[w1920px].png +0 -0
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/package.json +3 -3
- package/src/components/UserProfile/UserProfile.spec.tsx +17 -1
- package/src/components/UserProfile/UserProfile.tsx +1 -1
- package/test-results/{src-components-CollapsibleNavBar-CollapsibleNa-550ce-idgets-CollapsibleNavBar-1920-Should-be-visible-chromium → src-components-UserProfile-UserProfile.e2e.ts--1569e-r-info-and-logout-button-when-avatar-is-clicked-chromium}/trace.zip +0 -0
- package/test-results/{src-components-CollapsibleNavBar-CollapsibleNa-3bc42-amburger-menu-icon-should-be-visible-by-default-chromium → src-components-UserProfile-UserProfile.e2e.ts--914db-r-info-and-logout-button-when-avatar-is-hovered-chromium}/trace.zip +0 -0
- package/test-results/{src-components-CollapsibleNavBar-CollapsibleNa-37902-idgets-CollapsibleNavBar-1439-Should-be-visible-chromium → src-components-UserProfile-UserProfile.e2e.ts-Widgets-UserProfile-is-opened-chromium}/trace.zip +0 -0
- package/tsbuildcache +1 -1
- package/test-results/src-components-CollapsibleNavBar-CollapsibleNa-467fc-u-should-be-shown-after-Statistics-icon-hovered-chromium/trace.zip +0 -0
- package/test-results/src-components-CollapsibleNavBar-CollapsibleNa-82d84-should-be-visible-after-Statistics-item-clicked-chromium/trace.zip +0 -0
- package/test-results/src-components-CollapsibleNavBar-CollapsibleNa-86e96-nu-content-should-be-visible-after-icon-clicked-chromium/trace.zip +0 -0
- package/test-results/src-components-CollapsibleNavBar-CollapsibleNa-b093e-nu-should-be-expanded-after-toggle-icon-clicked-chromium/trace.zip +0 -0
- package/test-results/src-components-CollapsibleNavBar-CollapsibleNa-bc4b6-u-should-be-shown-after-Statistics-icon-hovered-chromium/trace.zip +0 -0
- package/test-results/src-components-CollapsibleNavBar-CollapsibleNa-d159d-d-after-Statistics-item-clicked-expanded-state--chromium/trace.zip +0 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ssa-ui-kit/widgets",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.5-alpha",
|
|
4
4
|
"main": "dist/index.js",
|
|
5
5
|
"types": "dist/index.d.ts",
|
|
6
6
|
"private": false,
|
|
@@ -30,8 +30,8 @@
|
|
|
30
30
|
"loose-envify": "^1.4.0",
|
|
31
31
|
"scheduler": "^0.23.0",
|
|
32
32
|
"@ssa-ui-kit/core": "^0.0.4-alpha",
|
|
33
|
-
"@ssa-ui-kit/
|
|
34
|
-
"@ssa-ui-kit/
|
|
33
|
+
"@ssa-ui-kit/utils": "^0.0.1-alpha",
|
|
34
|
+
"@ssa-ui-kit/hooks": "^0.0.1-alpha"
|
|
35
35
|
},
|
|
36
36
|
"browserslist": [
|
|
37
37
|
">0.1%",
|
|
@@ -2,7 +2,7 @@ import userEvent from '@testing-library/user-event';
|
|
|
2
2
|
import { UserProfile } from './UserProfile';
|
|
3
3
|
|
|
4
4
|
describe('UserProfile', () => {
|
|
5
|
-
it('Renders with a user name and email values', async () => {
|
|
5
|
+
it('Renders with a user name and email values via mouse click', async () => {
|
|
6
6
|
const user = userEvent.setup();
|
|
7
7
|
const { getByText, getByTestId } = render(
|
|
8
8
|
<UserProfile
|
|
@@ -18,6 +18,22 @@ describe('UserProfile', () => {
|
|
|
18
18
|
getByText(/Josh@gmail.com/i);
|
|
19
19
|
});
|
|
20
20
|
|
|
21
|
+
it('Renders with a user name and email values via mouse hover', async () => {
|
|
22
|
+
const user = userEvent.setup();
|
|
23
|
+
const { getByText, getByTestId } = render(
|
|
24
|
+
<UserProfile
|
|
25
|
+
name="Josh Li"
|
|
26
|
+
email="Josh@gmail.com"
|
|
27
|
+
trigger="Trigger"
|
|
28
|
+
onClick={jest.fn()}
|
|
29
|
+
/>,
|
|
30
|
+
);
|
|
31
|
+
await user.hover(getByTestId('trigger-button'));
|
|
32
|
+
|
|
33
|
+
getByText(/Josh Li/i);
|
|
34
|
+
getByText(/Josh@gmail.com/i);
|
|
35
|
+
});
|
|
36
|
+
|
|
21
37
|
it('Renders with a Log out button', async () => {
|
|
22
38
|
const user = userEvent.setup();
|
|
23
39
|
const { getByRole, getByTestId } = render(
|
|
@@ -27,7 +27,7 @@ export const UserProfile = ({
|
|
|
27
27
|
}: UserProfileProps) => {
|
|
28
28
|
const theme = useTheme();
|
|
29
29
|
return (
|
|
30
|
-
<Popover placement="bottom-end">
|
|
30
|
+
<Popover placement="bottom-end" interactionsEnabled="both">
|
|
31
31
|
<PopoverTrigger css={ResetBtnStyles}>{trigger}</PopoverTrigger>
|
|
32
32
|
<PopoverContent css={ContentWrapper} className={className}>
|
|
33
33
|
<div css={UserInfo}>
|