@apify/ui-library 1.154.5 → 1.154.7
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/dist/components/actor_template_card/actor_template_card.d.ts.map +1 -1
- package/dist/components/actor_template_card/actor_template_card.js +2 -1
- package/dist/components/actor_template_card/actor_template_card.test_ids.d.ts +2 -0
- package/dist/components/actor_template_card/actor_template_card.test_ids.d.ts.map +1 -0
- package/dist/components/actor_template_card/actor_template_card.test_ids.js +4 -0
- package/dist/components/card/card.d.ts.map +1 -1
- package/dist/components/card/card.js +7 -6
- package/dist/components/card/card.test_ids.d.ts +9 -0
- package/dist/components/card/card.test_ids.d.ts.map +1 -0
- package/dist/components/card/card.test_ids.js +11 -0
- package/dist/components/code/action_button.d.ts.map +1 -1
- package/dist/components/code/action_button.js +2 -1
- package/dist/components/code/action_button.test_ids.d.ts +4 -0
- package/dist/components/code/action_button.test_ids.d.ts.map +1 -0
- package/dist/components/code/action_button.test_ids.js +4 -0
- package/dist/components/code/code_block/code_block.d.ts.map +1 -1
- package/dist/components/code/code_block/code_block.js +3 -2
- package/dist/components/code/code_block/code_block.test_ids.d.ts +5 -0
- package/dist/components/code/code_block/code_block.test_ids.d.ts.map +1 -0
- package/dist/components/code/code_block/code_block.test_ids.js +5 -0
- package/dist/components/code/code_block/code_block_with_tabs.d.ts.map +1 -1
- package/dist/components/code/code_block/code_block_with_tabs.js +2 -1
- package/dist/components/code/one_line_code/one_line_code.d.ts.map +1 -1
- package/dist/components/code/one_line_code/one_line_code.js +2 -1
- package/dist/components/code/one_line_code/one_line_code.test_ids.d.ts +4 -0
- package/dist/components/code/one_line_code/one_line_code.test_ids.d.ts.map +1 -0
- package/dist/components/code/one_line_code/one_line_code.test_ids.js +4 -0
- package/dist/components/code/prism_highlighter.d.ts.map +1 -1
- package/dist/components/code/prism_highlighter.js +2 -1
- package/dist/components/code/prism_highlighter.test_ids.d.ts +4 -0
- package/dist/components/code/prism_highlighter.test_ids.d.ts.map +1 -0
- package/dist/components/code/prism_highlighter.test_ids.js +4 -0
- package/dist/components/collapsible_card/collapsible_card.d.ts.map +1 -1
- package/dist/components/collapsible_card/collapsible_card.js +4 -2
- package/dist/components/collapsible_card/collapsible_card.test_ids.d.ts +4 -0
- package/dist/components/collapsible_card/collapsible_card.test_ids.d.ts.map +1 -0
- package/dist/components/collapsible_card/collapsible_card.test_ids.js +4 -0
- package/dist/components/dropdown/dropdown.d.ts.map +1 -1
- package/dist/components/dropdown/dropdown.js +3 -2
- package/dist/components/dropdown/dropdown.styled.d.ts.map +1 -1
- package/dist/components/dropdown/dropdown.styled.js +2 -1
- package/dist/components/dropdown/dropdown.test_ids.d.ts +6 -0
- package/dist/components/dropdown/dropdown.test_ids.d.ts.map +1 -0
- package/dist/components/dropdown/dropdown.test_ids.js +8 -0
- package/dist/components/pagination/pagination.d.ts.map +1 -1
- package/dist/components/pagination/pagination.js +5 -4
- package/dist/components/pagination/pagination.test_ids.d.ts +7 -0
- package/dist/components/pagination/pagination.test_ids.d.ts.map +1 -0
- package/dist/components/pagination/pagination.test_ids.js +9 -0
- package/dist/components/select/select.d.ts.map +1 -1
- package/dist/components/select/select.js +10 -1
- package/dist/components/select/select.test_ids.d.ts +2 -0
- package/dist/components/select/select.test_ids.d.ts.map +1 -0
- package/dist/components/select/select.test_ids.js +4 -0
- package/dist/components/store/store_actor_header.d.ts.map +1 -1
- package/dist/components/store/store_actor_header.js +2 -1
- package/dist/components/store/store_actor_header.test_ids.d.ts +4 -0
- package/dist/components/store/store_actor_header.test_ids.d.ts.map +1 -0
- package/dist/components/store/store_actor_header.test_ids.js +4 -0
- package/dist/components/tabs/tab.d.ts.map +1 -1
- package/dist/components/tabs/tab.js +2 -1
- package/dist/components/tabs/tab.test_ids.d.ts +4 -0
- package/dist/components/tabs/tab.test_ids.d.ts.map +1 -0
- package/dist/components/tabs/tab.test_ids.js +4 -0
- package/dist/components/tabs/tabs.d.ts.map +1 -1
- package/dist/components/tabs/tabs.js +2 -1
- package/dist/components/tabs/tabs.test_ids.d.ts +4 -0
- package/dist/components/tabs/tabs.test_ids.d.ts.map +1 -0
- package/dist/components/tabs/tabs.test_ids.js +4 -0
- package/dist/files_hash_at_build.txt +1 -1
- package/dist/src/components/actor_template_card/actor_template_card.d.ts.map +1 -1
- package/dist/src/components/actor_template_card/actor_template_card.js +2 -1
- package/dist/src/components/actor_template_card/actor_template_card.js.map +1 -1
- package/dist/src/components/actor_template_card/actor_template_card.test_ids.d.ts +2 -0
- package/dist/src/components/actor_template_card/actor_template_card.test_ids.d.ts.map +1 -0
- package/dist/src/components/actor_template_card/actor_template_card.test_ids.js +2 -0
- package/dist/src/components/actor_template_card/actor_template_card.test_ids.js.map +1 -0
- package/dist/src/components/card/card.d.ts.map +1 -1
- package/dist/src/components/card/card.js +2 -1
- package/dist/src/components/card/card.js.map +1 -1
- package/dist/src/components/card/card.test_ids.d.ts +9 -0
- package/dist/src/components/card/card.test_ids.d.ts.map +1 -0
- package/dist/src/components/card/card.test_ids.js +9 -0
- package/dist/src/components/card/card.test_ids.js.map +1 -0
- package/dist/src/components/code/action_button.d.ts.map +1 -1
- package/dist/src/components/code/action_button.js +2 -1
- package/dist/src/components/code/action_button.js.map +1 -1
- package/dist/src/components/code/action_button.test_ids.d.ts +4 -0
- package/dist/src/components/code/action_button.test_ids.d.ts.map +1 -0
- package/dist/src/components/code/action_button.test_ids.js +4 -0
- package/dist/src/components/code/action_button.test_ids.js.map +1 -0
- package/dist/src/components/code/code_block/code_block.d.ts.map +1 -1
- package/dist/src/components/code/code_block/code_block.js +3 -2
- package/dist/src/components/code/code_block/code_block.js.map +1 -1
- package/dist/src/components/code/code_block/code_block.test_ids.d.ts +5 -0
- package/dist/src/components/code/code_block/code_block.test_ids.d.ts.map +1 -0
- package/dist/src/components/code/code_block/code_block.test_ids.js +5 -0
- package/dist/src/components/code/code_block/code_block.test_ids.js.map +1 -0
- package/dist/src/components/code/code_block/code_block_with_tabs.d.ts.map +1 -1
- package/dist/src/components/code/code_block/code_block_with_tabs.js +2 -1
- package/dist/src/components/code/code_block/code_block_with_tabs.js.map +1 -1
- package/dist/src/components/code/one_line_code/one_line_code.d.ts.map +1 -1
- package/dist/src/components/code/one_line_code/one_line_code.js +2 -1
- package/dist/src/components/code/one_line_code/one_line_code.js.map +1 -1
- package/dist/src/components/code/one_line_code/one_line_code.test_ids.d.ts +4 -0
- package/dist/src/components/code/one_line_code/one_line_code.test_ids.d.ts.map +1 -0
- package/dist/src/components/code/one_line_code/one_line_code.test_ids.js +4 -0
- package/dist/src/components/code/one_line_code/one_line_code.test_ids.js.map +1 -0
- package/dist/src/components/code/prism_highlighter.d.ts.map +1 -1
- package/dist/src/components/code/prism_highlighter.js +2 -1
- package/dist/src/components/code/prism_highlighter.js.map +1 -1
- package/dist/src/components/code/prism_highlighter.test_ids.d.ts +4 -0
- package/dist/src/components/code/prism_highlighter.test_ids.d.ts.map +1 -0
- package/dist/src/components/code/prism_highlighter.test_ids.js +4 -0
- package/dist/src/components/code/prism_highlighter.test_ids.js.map +1 -0
- package/dist/src/components/collapsible_card/collapsible_card.d.ts.map +1 -1
- package/dist/src/components/collapsible_card/collapsible_card.js +3 -1
- package/dist/src/components/collapsible_card/collapsible_card.js.map +1 -1
- package/dist/src/components/collapsible_card/collapsible_card.test_ids.d.ts +4 -0
- package/dist/src/components/collapsible_card/collapsible_card.test_ids.d.ts.map +1 -0
- package/dist/src/components/collapsible_card/collapsible_card.test_ids.js +4 -0
- package/dist/src/components/collapsible_card/collapsible_card.test_ids.js.map +1 -0
- package/dist/src/components/dropdown/dropdown.d.ts.map +1 -1
- package/dist/src/components/dropdown/dropdown.js +3 -2
- package/dist/src/components/dropdown/dropdown.js.map +1 -1
- package/dist/src/components/dropdown/dropdown.styled.d.ts.map +1 -1
- package/dist/src/components/dropdown/dropdown.styled.js +2 -1
- package/dist/src/components/dropdown/dropdown.styled.js.map +1 -1
- package/dist/src/components/dropdown/dropdown.test_ids.d.ts +6 -0
- package/dist/src/components/dropdown/dropdown.test_ids.d.ts.map +1 -0
- package/dist/src/components/dropdown/dropdown.test_ids.js +6 -0
- package/dist/src/components/dropdown/dropdown.test_ids.js.map +1 -0
- package/dist/src/components/pagination/pagination.d.ts.map +1 -1
- package/dist/src/components/pagination/pagination.js +5 -4
- package/dist/src/components/pagination/pagination.js.map +1 -1
- package/dist/src/components/pagination/pagination.test_ids.d.ts +7 -0
- package/dist/src/components/pagination/pagination.test_ids.d.ts.map +1 -0
- package/dist/src/components/pagination/pagination.test_ids.js +7 -0
- package/dist/src/components/pagination/pagination.test_ids.js.map +1 -0
- package/dist/src/components/select/select.d.ts.map +1 -1
- package/dist/src/components/select/select.js +7 -1
- package/dist/src/components/select/select.js.map +1 -1
- package/dist/src/components/select/select.test_ids.d.ts +2 -0
- package/dist/src/components/select/select.test_ids.d.ts.map +1 -0
- package/dist/src/components/select/select.test_ids.js +3 -0
- package/dist/src/components/select/select.test_ids.js.map +1 -0
- package/dist/src/components/store/store_actor_header.d.ts.map +1 -1
- package/dist/src/components/store/store_actor_header.js +2 -1
- package/dist/src/components/store/store_actor_header.js.map +1 -1
- package/dist/src/components/store/store_actor_header.test_ids.d.ts +4 -0
- package/dist/src/components/store/store_actor_header.test_ids.d.ts.map +1 -0
- package/dist/src/components/store/store_actor_header.test_ids.js +4 -0
- package/dist/src/components/store/store_actor_header.test_ids.js.map +1 -0
- package/dist/src/components/tabs/tab.d.ts.map +1 -1
- package/dist/src/components/tabs/tab.js +2 -1
- package/dist/src/components/tabs/tab.js.map +1 -1
- package/dist/src/components/tabs/tab.test_ids.d.ts +4 -0
- package/dist/src/components/tabs/tab.test_ids.d.ts.map +1 -0
- package/dist/src/components/tabs/tab.test_ids.js +4 -0
- package/dist/src/components/tabs/tab.test_ids.js.map +1 -0
- package/dist/src/components/tabs/tabs.d.ts.map +1 -1
- package/dist/src/components/tabs/tabs.js +2 -1
- package/dist/src/components/tabs/tabs.js.map +1 -1
- package/dist/src/components/tabs/tabs.test_ids.d.ts +4 -0
- package/dist/src/components/tabs/tabs.test_ids.d.ts.map +1 -0
- package/dist/src/components/tabs/tabs.test_ids.js +4 -0
- package/dist/src/components/tabs/tabs.test_ids.js.map +1 -0
- package/dist/src/test_ids.d.ts +13 -0
- package/dist/src/test_ids.d.ts.map +1 -1
- package/dist/src/test_ids.js +15 -1
- package/dist/src/test_ids.js.map +1 -1
- package/dist/test_ids.d.ts +13 -0
- package/dist/test_ids.d.ts.map +1 -1
- package/dist/test_ids.js +14 -1
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +2 -2
- package/src/components/actor_template_card/actor_template_card.test_ids.ts +1 -0
- package/src/components/actor_template_card/actor_template_card.tsx +2 -1
- package/src/components/card/card.test_ids.ts +8 -0
- package/src/components/card/card.tsx +7 -6
- package/src/components/code/action_button.test_ids.ts +3 -0
- package/src/components/code/action_button.tsx +2 -1
- package/src/components/code/code_block/code_block.test_ids.ts +5 -0
- package/src/components/code/code_block/code_block.tsx +3 -2
- package/src/components/code/code_block/code_block_with_tabs.tsx +2 -1
- package/src/components/code/one_line_code/one_line_code.test_ids.ts +3 -0
- package/src/components/code/one_line_code/one_line_code.tsx +2 -1
- package/src/components/code/prism_highlighter.test_ids.ts +3 -0
- package/src/components/code/prism_highlighter.tsx +2 -1
- package/src/components/collapsible_card/collapsible_card.test_ids.ts +3 -0
- package/src/components/collapsible_card/collapsible_card.tsx +4 -2
- package/src/components/dropdown/dropdown.styled.ts +2 -1
- package/src/components/dropdown/dropdown.test_ids.ts +5 -0
- package/src/components/dropdown/dropdown.tsx +3 -2
- package/src/components/pagination/pagination.test_ids.ts +6 -0
- package/src/components/pagination/pagination.tsx +5 -4
- package/src/components/select/select.test_ids.ts +2 -0
- package/src/components/select/select.tsx +16 -1
- package/src/components/store/store_actor_header.test_ids.ts +3 -0
- package/src/components/store/store_actor_header.tsx +2 -1
- package/src/components/tabs/tab.test_ids.ts +3 -0
- package/src/components/tabs/tab.tsx +2 -1
- package/src/components/tabs/tabs.test_ids.ts +3 -0
- package/src/components/tabs/tabs.tsx +2 -1
- package/src/test_ids.ts +15 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@apify/ui-library",
|
|
3
|
-
"version": "1.154.
|
|
3
|
+
"version": "1.154.7",
|
|
4
4
|
"description": "React UI library used by apify.com",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"type": "module",
|
|
@@ -95,5 +95,5 @@
|
|
|
95
95
|
"src",
|
|
96
96
|
"style"
|
|
97
97
|
],
|
|
98
|
-
"gitHead": "
|
|
98
|
+
"gitHead": "6d467ed9ed1c4ec3ff91449e9000a9da1d8a5999"
|
|
99
99
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export const actorTemplateCardTestId = (id: string): string => `actor-template-card-${id}`;
|
|
@@ -5,6 +5,7 @@ import { theme } from '../../design_system/theme';
|
|
|
5
5
|
import { Badge } from '../badge';
|
|
6
6
|
import { TextMarketing } from '../text';
|
|
7
7
|
import { VerticalTile } from '../tile';
|
|
8
|
+
import { actorTemplateCardTestId } from './actor_template_card.test_ids';
|
|
8
9
|
|
|
9
10
|
interface ActorTemplateCardProps {
|
|
10
11
|
id: string;
|
|
@@ -67,7 +68,7 @@ const TemplateCardContentWrapper = styled.div`
|
|
|
67
68
|
|
|
68
69
|
export const ActorTemplateCard: React.FC<ActorTemplateCardProps> = ({ id, label, description, icons, useCases }) => {
|
|
69
70
|
const templateCardContent = (
|
|
70
|
-
<TemplateCardContentWrapper data-test={
|
|
71
|
+
<TemplateCardContentWrapper data-test={actorTemplateCardTestId(id)}>
|
|
71
72
|
<div className={WrapperClasses.TEMPLATE_CARD_IMAGES}>{icons}</div>
|
|
72
73
|
<div className={WrapperClasses.TEMPLATE_CARD_TEXT}>
|
|
73
74
|
<TextMarketing size="regular" weight="bold">
|
|
@@ -8,6 +8,7 @@ import type { WithTransientProps } from '../../type_utils';
|
|
|
8
8
|
import type { BoxProps } from '../box';
|
|
9
9
|
import { Box } from '../box';
|
|
10
10
|
import { Text } from '../text';
|
|
11
|
+
import { cardTestIds } from './card.test_ids';
|
|
11
12
|
|
|
12
13
|
export const cardClassNames = {
|
|
13
14
|
WRAPPER: 'Card',
|
|
@@ -114,36 +115,36 @@ export const Card = forwardRef<HTMLElement, CardProps>(
|
|
|
114
115
|
$shadowless={shadowless}
|
|
115
116
|
forwardedAs={as || 'section'}
|
|
116
117
|
className={clsx(cardClassNames.WRAPPER, className)}
|
|
117
|
-
data-test=
|
|
118
|
+
data-test={cardTestIds.CARD}
|
|
118
119
|
{...rest}
|
|
119
120
|
ref={ref}
|
|
120
121
|
>
|
|
121
122
|
{(!!caption || !!actions) && (
|
|
122
|
-
<header className={cardClassNames.HEADER} data-test=
|
|
123
|
+
<header className={cardClassNames.HEADER} data-test={cardTestIds.HEADER}>
|
|
123
124
|
{caption && (
|
|
124
125
|
<Text
|
|
125
126
|
as="div"
|
|
126
127
|
size="big"
|
|
127
128
|
weight="bold"
|
|
128
129
|
className={cardClassNames.CAPTION}
|
|
129
|
-
data-test=
|
|
130
|
+
data-test={cardTestIds.CAPTION}
|
|
130
131
|
>
|
|
131
132
|
{caption}
|
|
132
133
|
</Text>
|
|
133
134
|
)}
|
|
134
135
|
{actions && (
|
|
135
|
-
<div className={cardClassNames.ACTIONS} data-test=
|
|
136
|
+
<div className={cardClassNames.ACTIONS} data-test={cardTestIds.ACTIONS}>
|
|
136
137
|
{actions}
|
|
137
138
|
</div>
|
|
138
139
|
)}
|
|
139
140
|
</header>
|
|
140
141
|
)}
|
|
141
142
|
{description && (
|
|
142
|
-
<div className={cardClassNames.DESCRIPTION} data-test=
|
|
143
|
+
<div className={cardClassNames.DESCRIPTION} data-test={cardTestIds.DESCRIPTION}>
|
|
143
144
|
{description}
|
|
144
145
|
</div>
|
|
145
146
|
)}
|
|
146
|
-
<div className={cardClassNames.CONTENT} data-test=
|
|
147
|
+
<div className={cardClassNames.CONTENT} data-test={cardTestIds.CONTENT}>
|
|
147
148
|
{children}
|
|
148
149
|
</div>
|
|
149
150
|
</StyledCardWrapper>
|
|
@@ -7,6 +7,7 @@ import { theme } from '../../design_system/theme';
|
|
|
7
7
|
import { useSharedUiDependencies } from '../../ui_dependency_provider';
|
|
8
8
|
import { useCopyToClipboard } from '../../utils';
|
|
9
9
|
import { Text } from '../text';
|
|
10
|
+
import { actionButtonTestIds } from './action_button.test_ids';
|
|
10
11
|
|
|
11
12
|
interface StyledButtonProps {
|
|
12
13
|
$successStyle?: boolean;
|
|
@@ -105,7 +106,7 @@ export const CopyButton = ({ code, ...props }: CopyButtonProps) => {
|
|
|
105
106
|
return (
|
|
106
107
|
<ActionButton
|
|
107
108
|
onClick={async () => copyToClipboard(code)}
|
|
108
|
-
data-test=
|
|
109
|
+
data-test={actionButtonTestIds.COPY_TO_CLIPBOARD}
|
|
109
110
|
aria-label="Copy to clipboard"
|
|
110
111
|
{...props}
|
|
111
112
|
>
|
|
@@ -10,6 +10,7 @@ import type { SharedTextSize } from '../../text/text_shared';
|
|
|
10
10
|
import { ActionButton, CopyButton } from '../action_button';
|
|
11
11
|
import { PrismSyntaxHighlighter } from '../prism_highlighter';
|
|
12
12
|
import { CodeBlockWrapper } from './code_block.styled';
|
|
13
|
+
import { codeBlockTabTestId, codeBlockTestIds } from './code_block.test_ids';
|
|
13
14
|
import { getBashLinePrefixes, getNumberLinePrefixes } from './utils';
|
|
14
15
|
|
|
15
16
|
type CodeTab = {
|
|
@@ -57,7 +58,7 @@ const HeaderDots = () => {
|
|
|
57
58
|
|
|
58
59
|
const Header = ({ tabs, currentTab, showBashHeader, onTabChange, title }: HeaderProps) => {
|
|
59
60
|
return (
|
|
60
|
-
<div className="CodeBlock-Header" data-test=
|
|
61
|
+
<div className="CodeBlock-Header" data-test={codeBlockTestIds.HEADER}>
|
|
61
62
|
{showBashHeader && <HeaderDots />}
|
|
62
63
|
{title && (
|
|
63
64
|
<Text weight="bold" className="CodeBlock-HeaderTitle">
|
|
@@ -69,7 +70,7 @@ const Header = ({ tabs, currentTab, showBashHeader, onTabChange, title }: Header
|
|
|
69
70
|
const selected = tab.key === currentTab?.key;
|
|
70
71
|
const props = {
|
|
71
72
|
className: clsx('CodeBlock-Tab', { selected }),
|
|
72
|
-
'data-test':
|
|
73
|
+
'data-test': codeBlockTabTestId(tab.key),
|
|
73
74
|
onClick: (e: React.MouseEvent) => onTabChange(tab, e),
|
|
74
75
|
title: tab.label,
|
|
75
76
|
id: tab.id ?? tab.key,
|
|
@@ -11,6 +11,7 @@ import { Box, type MarginSpacingProps, type RegularBoxProps } from '../../box';
|
|
|
11
11
|
import { Link, type RegularLinkProps } from '../../link';
|
|
12
12
|
import { HeadingShared } from '../../text/heading_shared';
|
|
13
13
|
import { CodeBlock, type CodeBlockProps } from './code_block';
|
|
14
|
+
import { codeBlockTabTestId } from './code_block.test_ids';
|
|
14
15
|
|
|
15
16
|
export type CodeBlockTabKey = 'cli' | 'http' | 'javascript' | 'mcp' | 'openapi' | 'python' | 'typescript';
|
|
16
17
|
type CodeBlockTabConfig = {
|
|
@@ -224,7 +225,7 @@ export const CodeBlockWithTabs = ({
|
|
|
224
225
|
|
|
225
226
|
const commonProps = {
|
|
226
227
|
className: clsx(CODE_BLOCK_WITH_TABS_CLASSNAMES.TAB, { selected }),
|
|
227
|
-
'data-test':
|
|
228
|
+
'data-test': codeBlockTabTestId(tab.key),
|
|
228
229
|
..._.omit(tab, ['bashCommandsStart', 'content', 'languageOverride']),
|
|
229
230
|
};
|
|
230
231
|
const children = (
|
|
@@ -14,6 +14,7 @@ import type { SyntaxHighlighterBaseStylesWrapperProps } from '../code_block/code
|
|
|
14
14
|
import { SyntaxHighlighterBaseStylesWrapper } from '../code_block/code_block.styled';
|
|
15
15
|
import { getBashLinePrefixes } from '../code_block/utils';
|
|
16
16
|
import { PrismSyntaxHighlighter } from '../prism_highlighter';
|
|
17
|
+
import { oneLineCodeTestIds } from './one_line_code.test_ids';
|
|
17
18
|
|
|
18
19
|
export const oneLineCodeClassNames = {
|
|
19
20
|
gradientWrapper: 'OneLineCode-GradientWrapper',
|
|
@@ -216,7 +217,7 @@ export function OneLineCode({
|
|
|
216
217
|
onClick={() => setShowSecret((prev) => !prev)}
|
|
217
218
|
trackingId={trackingBundle?.secret?.trackingId}
|
|
218
219
|
trackingData={trackingBundle?.secret?.trackingData}
|
|
219
|
-
data-test=
|
|
220
|
+
data-test={oneLineCodeTestIds.TOGGLE_VISIBILITY_BUTTON}
|
|
220
221
|
>
|
|
221
222
|
{showSecret ? <EyeOffIcon size="16" /> : <EyeIcon size="16" />}
|
|
222
223
|
</ActionButton>
|
|
@@ -11,6 +11,7 @@ import { useSharedUiDependencies } from '../../ui_dependency_provider';
|
|
|
11
11
|
import type { SharedTextSize } from '../text';
|
|
12
12
|
import { Text } from '../text';
|
|
13
13
|
import { oneLightTheme } from './one_light_theme';
|
|
14
|
+
import { prismHighlighterTestIds } from './prism_highlighter.test_ids';
|
|
14
15
|
|
|
15
16
|
(typeof global !== 'undefined' ? global : window).Prism = Prism;
|
|
16
17
|
|
|
@@ -208,7 +209,7 @@ export const PrismSyntaxHighlighter = forwardRef<HTMLPreElement, SyntaxHighlight
|
|
|
208
209
|
className={clsx(className, prismClassName)}
|
|
209
210
|
$hasLinePrefixes={hasLinePrefixes}
|
|
210
211
|
$isSingleLine={isSingleLine}
|
|
211
|
-
data-test=
|
|
212
|
+
data-test={prismHighlighterTestIds.CODE}
|
|
212
213
|
ref={ref}
|
|
213
214
|
>
|
|
214
215
|
<Text size={size} type="code" as="code">
|
|
@@ -8,6 +8,8 @@ import { ChevronDownIcon } from '@apify/ui-icons';
|
|
|
8
8
|
import { theme } from '../../design_system/theme';
|
|
9
9
|
import type { WithTransientProps } from '../../type_utils';
|
|
10
10
|
import { Box } from '../box';
|
|
11
|
+
import { cardTestIds } from '../card/card.test_ids';
|
|
12
|
+
import { collapsibleCardTestIds } from './collapsible_card.test_ids';
|
|
11
13
|
|
|
12
14
|
interface TransientWrapperProps {
|
|
13
15
|
hideOuterBorder?: boolean;
|
|
@@ -144,7 +146,7 @@ export const CollapsibleCard = ({
|
|
|
144
146
|
{topSection && (
|
|
145
147
|
<StyledTopSection
|
|
146
148
|
className={collapsibleCardClassNames.TOP_SECTION}
|
|
147
|
-
data-test=
|
|
149
|
+
data-test={collapsibleCardTestIds.TOP_SECTION}
|
|
148
150
|
>
|
|
149
151
|
{topSection}
|
|
150
152
|
</StyledTopSection>
|
|
@@ -168,7 +170,7 @@ export const CollapsibleCard = ({
|
|
|
168
170
|
$noDivider={noDivider}
|
|
169
171
|
className={collapsibleCardClassNames.COLLAPSIBLE_CONTENT_WRAPPER}
|
|
170
172
|
>
|
|
171
|
-
<StyledCardContent className={collapsibleCardClassNames.CONTENT} data-test=
|
|
173
|
+
<StyledCardContent className={collapsibleCardClassNames.CONTENT} data-test={cardTestIds.CONTENT}>
|
|
172
174
|
{children}
|
|
173
175
|
</StyledCardContent>
|
|
174
176
|
</CollapsibleContent>
|
|
@@ -2,6 +2,7 @@ import * as DropdownMenu from '@radix-ui/react-dropdown-menu';
|
|
|
2
2
|
import styled from 'styled-components';
|
|
3
3
|
|
|
4
4
|
import { theme } from '../../design_system/theme';
|
|
5
|
+
import { dropdownTestIds } from './dropdown.test_ids';
|
|
5
6
|
|
|
6
7
|
export const DROPDOWN_ELEMENT_CLASSES = {
|
|
7
8
|
WRAPPER: 'dropdown-wrapper',
|
|
@@ -23,7 +24,7 @@ type StyledContentProps = {
|
|
|
23
24
|
export const StyledContent = styled(DropdownMenu.Content).attrs<
|
|
24
25
|
DropdownMenu.DropdownMenuContentProps & { 'data-test'?: string }
|
|
25
26
|
>((props) => ({
|
|
26
|
-
'data-test':
|
|
27
|
+
'data-test': dropdownTestIds.WRAPPER,
|
|
27
28
|
className: [DROPDOWN_ELEMENT_CLASSES.WRAPPER, props.className].filter(Boolean).join(' '),
|
|
28
29
|
}))<StyledContentProps>`
|
|
29
30
|
background: ${theme.color.neutral.background};
|
|
@@ -26,6 +26,7 @@ import {
|
|
|
26
26
|
StyledSeparator,
|
|
27
27
|
StyledTagWrapper,
|
|
28
28
|
} from './dropdown.styled';
|
|
29
|
+
import { dropdownTestIds } from './dropdown.test_ids';
|
|
29
30
|
import type { BaseDropdownItemProps } from './dropdown.types';
|
|
30
31
|
import { DropdownRoot } from './dropdown_root';
|
|
31
32
|
|
|
@@ -62,7 +63,7 @@ const DropdownItem = ({
|
|
|
62
63
|
disabled={disabled}
|
|
63
64
|
{...props}
|
|
64
65
|
className={clsx(DROPDOWN_ELEMENT_CLASSES.ITEM, className, selected && 'dropdown-item-selected')}
|
|
65
|
-
data-test={disabled ?
|
|
66
|
+
data-test={disabled ? dropdownTestIds.ITEM_DISABLED : dropdownTestIds.ITEM}
|
|
66
67
|
>
|
|
67
68
|
<StyledItemRow>
|
|
68
69
|
{icon && <StyledIconWrapper>{icon}</StyledIconWrapper>}
|
|
@@ -121,7 +122,7 @@ const DropdownCheckboxItem = ({
|
|
|
121
122
|
{...props}
|
|
122
123
|
onCheckedChange={disabled ? undefined : onCheckedChange}
|
|
123
124
|
className={clsx(className)}
|
|
124
|
-
data-test={disabled ?
|
|
125
|
+
data-test={disabled ? dropdownTestIds.ITEM_DISABLED : dropdownTestIds.ITEM}
|
|
125
126
|
>
|
|
126
127
|
<StyledItemRow>
|
|
127
128
|
<StyledCheckboxIconWrapper>
|
|
@@ -7,6 +7,7 @@ import { ChevronLeftIcon, ChevronRightIcon } from '@apify/ui-icons';
|
|
|
7
7
|
import { theme } from '../../design_system/theme';
|
|
8
8
|
import { Box } from '../box';
|
|
9
9
|
import { Button } from '../button';
|
|
10
|
+
import { paginationTestIds } from './pagination.test_ids';
|
|
10
11
|
|
|
11
12
|
const LEADING_THREE_DOTS_PAGE_KEY = -1;
|
|
12
13
|
const TRAILING_THREE_DOTS_PAGE_KEY = -2;
|
|
@@ -76,7 +77,7 @@ export const PaginationButtons: FC<PaginationButtonsProps> = ({ page, totalPages
|
|
|
76
77
|
return (
|
|
77
78
|
<StyledPageSelectionButtons>
|
|
78
79
|
<PaginationButtonBase
|
|
79
|
-
data-test=
|
|
80
|
+
data-test={paginationTestIds.PREV_BUTTON}
|
|
80
81
|
disabled={page <= 0}
|
|
81
82
|
onClick={() => onPageChange(page - 1)}
|
|
82
83
|
trackingId="PaginationPrevPage"
|
|
@@ -101,7 +102,7 @@ export const PaginationButtons: FC<PaginationButtonsProps> = ({ page, totalPages
|
|
|
101
102
|
return (
|
|
102
103
|
<PaginationButtonBase
|
|
103
104
|
key={pageToDisplay}
|
|
104
|
-
data-test=
|
|
105
|
+
data-test={paginationTestIds.CURRENT_PAGE_BUTTON}
|
|
105
106
|
trackingId="PaginationCurrentPage"
|
|
106
107
|
className="currentPage"
|
|
107
108
|
onClick={() => undefined}
|
|
@@ -113,7 +114,7 @@ export const PaginationButtons: FC<PaginationButtonsProps> = ({ page, totalPages
|
|
|
113
114
|
return (
|
|
114
115
|
<PaginationButtonBase
|
|
115
116
|
key={pageToDisplay}
|
|
116
|
-
data-test=
|
|
117
|
+
data-test={paginationTestIds.PAGE_NUMBER_BUTTON}
|
|
117
118
|
onClick={() => onPageChange(pageToDisplay)}
|
|
118
119
|
trackingId="PaginationNumberedPage"
|
|
119
120
|
>
|
|
@@ -122,7 +123,7 @@ export const PaginationButtons: FC<PaginationButtonsProps> = ({ page, totalPages
|
|
|
122
123
|
);
|
|
123
124
|
})}
|
|
124
125
|
<PaginationButtonBase
|
|
125
|
-
data-test=
|
|
126
|
+
data-test={paginationTestIds.NEXT_BUTTON}
|
|
126
127
|
disabled={page >= totalPages - 1}
|
|
127
128
|
onClick={() => onPageChange(page + 1)}
|
|
128
129
|
trackingId="PaginationNextPage"
|
|
@@ -4,6 +4,7 @@ import type {
|
|
|
4
4
|
ClearIndicatorProps,
|
|
5
5
|
DropdownIndicatorProps,
|
|
6
6
|
IndicatorsContainerProps,
|
|
7
|
+
MultiValueGenericProps,
|
|
7
8
|
MultiValueRemoveProps,
|
|
8
9
|
OptionProps,
|
|
9
10
|
StylesConfig,
|
|
@@ -16,6 +17,7 @@ import { CaretDownIcon, CaretUpIcon, CrossIcon, XCircleIcon } from '@apify/ui-ic
|
|
|
16
17
|
import { theme } from '../../design_system/theme';
|
|
17
18
|
import { IconButton } from '../icon_button';
|
|
18
19
|
import { Text } from '../text';
|
|
20
|
+
import { selectClearTestId } from './select.test_ids';
|
|
19
21
|
|
|
20
22
|
const DEFAULT_Z_INDEX_IN_MODAL = 99;
|
|
21
23
|
const DEFAULT_Z_INDEX_OUTSIDE_MODAL = 9;
|
|
@@ -294,7 +296,7 @@ const ClearIndicator: FC<ClearIndicatorProps<SelectOption>> = ({ innerProps, sel
|
|
|
294
296
|
return (
|
|
295
297
|
<IconButton
|
|
296
298
|
Icon={CrossIcon}
|
|
297
|
-
data-test={
|
|
299
|
+
data-test={selectClearTestId(selectProps?.id ?? selectProps?.name)}
|
|
298
300
|
{...(innerProps as React.HTMLAttributes<Element>)}
|
|
299
301
|
/>
|
|
300
302
|
);
|
|
@@ -312,6 +314,18 @@ export const SelectMultiValueRemove: FC<Pick<MultiValueRemoveProps<SelectOption>
|
|
|
312
314
|
<MultiValueRemoveButton Icon={CrossIcon} {...(innerProps as React.HTMLAttributes<Element>)} />
|
|
313
315
|
);
|
|
314
316
|
|
|
317
|
+
const SelectMultiValueLabel: FC<MultiValueGenericProps<SelectOption>> = ({ innerProps, ...rest }) => (
|
|
318
|
+
<selectComponents.MultiValueLabel
|
|
319
|
+
{...rest}
|
|
320
|
+
innerProps={
|
|
321
|
+
{
|
|
322
|
+
...innerProps,
|
|
323
|
+
'data-test': `${rest.selectProps?.id ?? rest.selectProps?.name}--multi-value-label`,
|
|
324
|
+
} as typeof innerProps
|
|
325
|
+
}
|
|
326
|
+
/>
|
|
327
|
+
);
|
|
328
|
+
|
|
315
329
|
const IndicatorSeparator = () => null; // we don't display anything
|
|
316
330
|
|
|
317
331
|
/**
|
|
@@ -384,6 +398,7 @@ export const SelectPrimitive = forwardRef<unknown, SelectPrimitiveProps>(
|
|
|
384
398
|
ClearIndicator,
|
|
385
399
|
IndicatorSeparator,
|
|
386
400
|
MultiValueRemove: SelectMultiValueRemove, // react-select slot name
|
|
401
|
+
MultiValueLabel: SelectMultiValueLabel,
|
|
387
402
|
IndicatorsContainer,
|
|
388
403
|
Option,
|
|
389
404
|
Control: StyledControl,
|
|
@@ -5,6 +5,7 @@ import { StarEmptyIcon, WarningTriangleIcon } from '@apify/ui-icons';
|
|
|
5
5
|
import { Badge, Box, type BoxProps, Text } from '../../components';
|
|
6
6
|
import { theme } from '../../design_system/theme';
|
|
7
7
|
import { ActorAvatar, actorAvatarClassnames } from '../avatar';
|
|
8
|
+
import { storeActorHeaderTestIds } from './store_actor_header.test_ids';
|
|
8
9
|
|
|
9
10
|
const storeActorHeaderClassNames = {
|
|
10
11
|
title: 'ActorStoreItem-title',
|
|
@@ -93,7 +94,7 @@ export const StoreActorHeader: React.FC<StoreActorHeaderProps & BoxProps> = ({
|
|
|
93
94
|
...rest
|
|
94
95
|
}) => {
|
|
95
96
|
return (
|
|
96
|
-
<StyledStoreActorHeader data-test=
|
|
97
|
+
<StyledStoreActorHeader data-test={storeActorHeaderTestIds.HEADER} $compact={compact} {...rest}>
|
|
97
98
|
<ActorAvatarWrapper>
|
|
98
99
|
<ActorAvatar
|
|
99
100
|
size={compact ? 20 : avatarSize}
|
|
@@ -15,6 +15,7 @@ import type { RegularLinkProps } from '../link';
|
|
|
15
15
|
import { Link } from '../link';
|
|
16
16
|
import type { SharedTextSize } from '../text';
|
|
17
17
|
import { Text } from '../text';
|
|
18
|
+
import { tabTestIds } from './tab.test_ids';
|
|
18
19
|
|
|
19
20
|
type SharedTabProps = Omit<RegularBoxProps, 'as' | 'onClick'> &
|
|
20
21
|
MarginSpacingProps &
|
|
@@ -199,7 +200,7 @@ export const Tab = ({
|
|
|
199
200
|
const href = typeof to === 'string' ? to : createPath(to);
|
|
200
201
|
return (
|
|
201
202
|
<TabWrapper
|
|
202
|
-
data-test=
|
|
203
|
+
data-test={tabTestIds.TAB}
|
|
203
204
|
{...props}
|
|
204
205
|
id={id}
|
|
205
206
|
to={to}
|
|
@@ -10,6 +10,7 @@ import type { MarginSpacingProps, RegularBoxProps } from '../box';
|
|
|
10
10
|
import { Box } from '../box';
|
|
11
11
|
import type { TabData, TabVariant } from './tab';
|
|
12
12
|
import { Tab } from './tab';
|
|
13
|
+
import { tabsTestIds } from './tabs.test_ids';
|
|
13
14
|
|
|
14
15
|
type SharedTabsProps = Omit<RegularBoxProps, 'as' | 'onClick'> & MarginSpacingProps;
|
|
15
16
|
export type TabsProps = SharedTabsProps & {
|
|
@@ -154,7 +155,7 @@ export const Tabs = ({ variant = 'default', tabs, activeTab, onSelect, ...props
|
|
|
154
155
|
}, []);
|
|
155
156
|
|
|
156
157
|
return (
|
|
157
|
-
<TabsWrapper {...props} data-test=
|
|
158
|
+
<TabsWrapper {...props} data-test={tabsTestIds.WRAPPER} $variant={variant}>
|
|
158
159
|
<div role="cell" aria-hidden={!overflowState?.left} />
|
|
159
160
|
<div ref={ref} role="tablist" onScroll={scrollHandler}>
|
|
160
161
|
{tabs.map((tab) => (
|
package/src/test_ids.ts
CHANGED
|
@@ -1,3 +1,17 @@
|
|
|
1
1
|
// `./test-ids` subpath barrel. Playwright imports test IDs from here to avoid the
|
|
2
|
-
// React/CSS-heavy root barrel (which breaks non-bundler loaders).
|
|
2
|
+
// React/CSS-heavy root barrel (which breaks non-bundler loaders).
|
|
3
|
+
// Do not edit directly, this file is generated by `pnpm run generate:test-id-barrels`.
|
|
4
|
+
export { actorTemplateCardTestId } from './components/actor_template_card/actor_template_card.test_ids.js';
|
|
5
|
+
export { cardTestIds } from './components/card/card.test_ids.js';
|
|
6
|
+
export { actionButtonTestIds } from './components/code/action_button.test_ids.js';
|
|
7
|
+
export { codeBlockTabTestId, codeBlockTestIds } from './components/code/code_block/code_block.test_ids.js';
|
|
8
|
+
export { oneLineCodeTestIds } from './components/code/one_line_code/one_line_code.test_ids.js';
|
|
9
|
+
export { prismHighlighterTestIds } from './components/code/prism_highlighter.test_ids.js';
|
|
10
|
+
export { collapsibleCardTestIds } from './components/collapsible_card/collapsible_card.test_ids.js';
|
|
11
|
+
export { dropdownTestIds } from './components/dropdown/dropdown.test_ids.js';
|
|
12
|
+
export { paginationTestIds } from './components/pagination/pagination.test_ids.js';
|
|
13
|
+
export { selectClearTestId } from './components/select/select.test_ids.js';
|
|
14
|
+
export { storeActorHeaderTestIds } from './components/store/store_actor_header.test_ids.js';
|
|
3
15
|
export { tableTestIds } from './components/table/table.test_ids.js';
|
|
16
|
+
export { tabTestIds } from './components/tabs/tab.test_ids.js';
|
|
17
|
+
export { tabsTestIds } from './components/tabs/tabs.test_ids.js';
|