Skip to content

Commit 3ec6236

Browse files
authored
Merge pull request #1401 from AppQuality/UN-1615-Aggiungere-attributi-dashboard-per-userpilot
Un 1615 aggiungere attributi dashboard per userpilot
2 parents aa900e7 + 9d47d7a commit 3ec6236

File tree

21 files changed

+60
-22
lines changed

21 files changed

+60
-22
lines changed

src/common/components/inviteUsers/campaignSettings.tsx

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ import {
4141
} from './styled';
4242
import { UserItem } from './userItem';
4343

44-
export const CampaignSettings = () => {
44+
export const CampaignSettings = ({ dataQa }: { dataQa?: string }) => {
4545
const { permissionSettingsTitle, campaignId } = useAppSelector(
4646
(state) => state.navigation
4747
);
@@ -265,7 +265,11 @@ export const CampaignSettings = () => {
265265

266266
return (
267267
<>
268-
<Button onClick={() => setIsModalOpen(true)} isBasic>
268+
<Button
269+
onClick={() => setIsModalOpen(true)}
270+
isBasic
271+
data-qa={dataQa || 'pageHeader_shareButton'}
272+
>
269273
<Button.StartIcon>
270274
<UsersIcon style={{ height: appTheme.iconSizes.lg }} />
271275
</Button.StartIcon>

src/common/components/inviteUsers/projectSettings.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -239,7 +239,11 @@ export const ProjectSettings = () => {
239239

240240
return (
241241
<>
242-
<Button onClick={() => setIsModalOpen(true)} isBasic>
242+
<Button
243+
onClick={() => setIsModalOpen(true)}
244+
isBasic
245+
data-qa="project_pageHeader_shareButton"
246+
>
243247
<Button.StartIcon>
244248
<UsersIcon />
245249
</Button.StartIcon>

src/common/components/navigation/header/brandLogo.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,10 @@ export const BrandLogo = ({
4141
if (size === 'full') return <LogoFullComponent onClick={handleLogoClick} />;
4242
return (
4343
<LogoIconContainer hasLogo>
44-
<HeaderItemIcon onClick={handleLogoClick}>
44+
<HeaderItemIcon
45+
onClick={handleLogoClick}
46+
data-qa="global_header_navItem_logo"
47+
>
4548
<Logo type="icon" size={150} />
4649
</HeaderItemIcon>
4750
</LogoIconContainer>

src/common/components/navigation/header/header.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,9 @@ export const Header = ({
5050
)}
5151
<div style={{ order: '1', display: 'flex' }}>
5252
<Changelog />
53-
{loggedIn && <ProfileAvatar />}
53+
{loggedIn && (
54+
<ProfileAvatar data-qa="global_header_navItem_profile_avatar" />
55+
)}
5456
</div>
5557
</UgHeader>
5658
);

src/common/components/navigation/sidebar/index.tsx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,7 @@ export const AppSidebar = (props: PropsWithChildren<SidebarProps>) => {
159159
isExpanded={isSidebarOpen}
160160
isCurrent={route === ''}
161161
onClick={() => navigateTo('home')}
162+
data-qa="global_sidebar_navItem_myActivities"
162163
>
163164
<NavItemIcon>
164165
{route === '' ? <CampaignsIconActive /> : <CampaignsIcon />}
@@ -178,6 +179,7 @@ export const AppSidebar = (props: PropsWithChildren<SidebarProps>) => {
178179
defaultExpandedSections={[0]}
179180
isExpanded={isSidebarOpen}
180181
isAnimated={false}
182+
data-qa="global_sidebar_navItem_projects"
181183
>
182184
<NavAccordionItem.Section>
183185
<NavAccordionItem.Header>
@@ -228,6 +230,7 @@ export const AppSidebar = (props: PropsWithChildren<SidebarProps>) => {
228230
isExpanded={isSidebarOpen}
229231
isCurrent={route === 'templates'}
230232
onClick={() => navigateTo('templates')}
233+
data-qa="global_sidebar_navItem_templates"
231234
>
232235
<NavItemIcon>
233236
{route === 'templates' ? (
@@ -250,6 +253,7 @@ export const AppSidebar = (props: PropsWithChildren<SidebarProps>) => {
250253
isCurrent={route === `projects/${archiveId}`}
251254
onClick={() => navigateTo(`projects/${archiveId}`)}
252255
style={{ marginBottom: '16px' }}
256+
data-qa="global_sidebar_navItem_archive"
253257
>
254258
<NavItemIcon isStyled>
255259
{route === `projects/${archiveId}` ? (

src/common/components/navigation/workspacesDropdown/index.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,12 +118,15 @@ export const WorkspacesDropdown = () => {
118118
if (!activeWorkspace) return null;
119119

120120
if (isSingle)
121-
return <BrandName>{`${activeWorkspace?.company}'s Workspace`}</BrandName>;
121+
return (
122+
<BrandName data-qa="global_header_navItem_workspace_name">{`${activeWorkspace?.company}'s Workspace`}</BrandName>
123+
);
122124

123125
return (
124126
<Wrapper ref={ref} isExpanded={isExpanded}>
125127
<DropdownFieldNew>
126128
<Autocomplete
129+
data-qa="global_header_navItem_workspace_dropdown"
127130
onClick={() => {
128131
setIsExpanded(!isExpanded);
129132
}}

src/pages/Campaign/pageHeader/Meta/index.tsx

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ export const Metas = ({
148148
return (
149149
<>
150150
<FooterContainer>
151-
<PageMeta>
151+
<PageMeta data-qa="campaign_pageHeader_meta">
152152
<StatusMeta status={family.name.toLowerCase() as CampaignStatus}>
153153
{type.name}
154154
</StatusMeta>
@@ -167,7 +167,9 @@ export const Metas = ({
167167
) : null}
168168
</PageMeta>
169169
<ButtonWrapper>
170-
{!isArchived && hasWorkspaceAccess && <CampaignSettings />}
170+
{!isArchived && hasWorkspaceAccess && (
171+
<CampaignSettings dataQa="campaign_pageHeader_shareButton" />
172+
)}
171173
{outputs?.includes('bugs') && (
172174
<Link to={functionalDashboardRoute}>
173175
<Button id="button-bugs-list-header" isPrimary isAccent>
@@ -225,7 +227,10 @@ export const Metas = ({
225227
}
226228
}}
227229
label={(props) => (
228-
<IconButton data-qa="extra-actions-menu" {...props}>
230+
<IconButton
231+
data-qa="campaign_pageHeader_kebabMenu"
232+
{...props}
233+
>
229234
<DotsIcon />
230235
</IconButton>
231236
)}

src/pages/Campaign/pageHeader/index.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ const CampaignPageHeader = ({ campaignId }: { campaignId: number }) => {
5454
)}
5555
<LayoutWrapper>
5656
<PageHeader>
57-
<PageHeader.Breadcrumbs>
57+
<PageHeader.Breadcrumbs data-qa="campaign_pageHeader_breadCrumb">
5858
{project.hasAccess ? (
5959
<Anchor
6060
id="breadcrumb-parent"
@@ -67,7 +67,7 @@ const CampaignPageHeader = ({ campaignId }: { campaignId: number }) => {
6767
)}
6868
</PageHeader.Breadcrumbs>
6969
<PageHeader.Main mainTitle={campaign.customer_title}>
70-
<PageHeader.Title>
70+
<PageHeader.Title data-qa="campaign_pageHeader_title">
7171
<EditableTitle campaignId={campaignId} />
7272
</PageHeader.Title>
7373
<PageHeader.Meta>

src/pages/Dashboard/Counters.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ export const Counters = () => {
6565
return isLoading || isFetching ? (
6666
<Skeleton width="30%" height="32px" />
6767
) : (
68-
<PageMeta>
68+
<PageMeta data-qa="project_pageHeader_counters">
6969
<StatusMeta counter={completed} status="completed" />
7070
<StatusMeta counter={running} status="running" />
7171
<StatusMeta counter={inComing} status="incoming" />

src/pages/Dashboard/projectPageHeader.tsx

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,10 @@ export const ProjectPageHeader = ({ projectId }: { projectId: number }) => {
9494
<LayoutWrapper>
9595
<PageHeader>
9696
<PageHeader.Main mainTitle={project?.name || ''}>
97-
<PageHeader.Title style={{ minHeight: '62px' }}>
97+
<PageHeader.Title
98+
style={{ minHeight: '62px' }}
99+
data-qa="project_pageHeader_title"
100+
>
98101
{isLoading ||
99102
isLoadingPlans ||
100103
isFetching ||
@@ -105,7 +108,10 @@ export const ProjectPageHeader = ({ projectId }: { projectId: number }) => {
105108
titleContent
106109
)}
107110
</PageHeader.Title>
108-
<PageHeader.Description style={{ width: '100%' }}>
111+
<PageHeader.Description
112+
style={{ width: '100%' }}
113+
data-qa="project_pageHeader_description"
114+
>
109115
{isLoading ||
110116
isLoadingPlans ||
111117
isFetching ||

0 commit comments

Comments
 (0)