Skip to content

Commit

Permalink
feat: added data-testid for E2E tests (#155)
Browse files Browse the repository at this point in the history
  • Loading branch information
gnekoz authored Nov 23, 2022
1 parent caff759 commit 3042aa6
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/shell/boards/board-container.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,12 @@ export const BoardContainer: FC = () => {
if (isEmpty(boards) || !current) return null;
return (
<BoardContainerComp expanded={expanded} minimized={minimized}>
<Board background="gray6" crossAlignment="unset" expanded={expanded}>
<Board
data-testid="NewItemContainer"
background="gray6"
crossAlignment="unset"
expanded={expanded}
>
<BoardHeader background="gray5">
<Padding all="extrasmall">
<Tooltip label={t('board.hide', 'Hide board')} placement="top">
Expand Down
2 changes: 2 additions & 0 deletions src/shell/creation-button.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ export const CreationButtonComponent: FC<{ activeRoute: AppRoute; location: Loca
return primaryAction ? (
<Container minWidth="80px">
<MultiButton
data-testid="NewItemButton"
size="extralarge"
background="primary"
label={primaryAction?.label ?? t('new', 'New')}
Expand All @@ -68,6 +69,7 @@ export const CreationButtonComponent: FC<{ activeRoute: AppRoute; location: Loca
) : (
<Dropdown items={secondaryActions} onClose={onClose} onOpen={onOpen}>
<Button
data-testid="NewItemButton"
size="extralarge"
backgroundColor="primary"
label={t('new', 'New')}
Expand Down
2 changes: 2 additions & 0 deletions src/shell/shell-header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ const ShellHeader: FC<{
const searchEnabled = useAppStore((s) => s.views.search.length > 0);
return (
<Container
data-testid="MainHeaderContainer"
orientation="horizontal"
background="gray3"
width="fill"
Expand All @@ -84,6 +85,7 @@ const ShellHeader: FC<{
maxWidth="75%"
mainAlignment="flex-start"
minWidth="fit-content"
data-testid="HeaderMainLogoContainer"
>
<Responsive mode="mobile">
<Padding right="small">
Expand Down
1 change: 1 addition & 0 deletions src/shell/shell-primary-bar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,7 @@ const ShellPrimaryBarComponent: FC<{ activeRoute: AppRoute }> = ({ activeRoute }
orientation="vertical"
mainAlignment="flex-start"
crossAlignment="flex-start"
data-testid="SideMenuContainer"
>
<Row
mainAlignment="flex-start"
Expand Down
1 change: 1 addition & 0 deletions src/shell/shell-secondary-bar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ const ShellSecondaryBarComponent: FC<{ activeRoute: AppRoute }> = ({ activeRoute
return disabled ? null : (
<>
<SidebarContainer
data-testid="SideSecondaryBarContainer"
sidebarIsOpen={isOpen}
role="menu"
height="fill"
Expand Down

0 comments on commit 3042aa6

Please sign in to comment.