Skip to content
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: 4 additions & 0 deletions ui/src/views/Sidebar/Sidebar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -99,8 +99,12 @@ const SideBarFooter = () => (
const Sidebar = (): JSX.Element => {
return (
<Flex
<<<<<<< HEAD
position='relative'
as='section'
=======
data-testid='app-sidebar'
>>>>>>> f4a938794 (chore(CE): data-testid attributes to the main sidebar and workspace UI (#1781))
minH='100vh'
bg='bg.canvas'
borderRightWidth='1px'
Expand Down
5 changes: 4 additions & 1 deletion ui/src/views/Sidebar/Workspace/CreateWorkspace.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ const CreateWorkspace = ({

return (
<form onSubmit={formik.handleSubmit}>
<ModalContent>
<ModalContent data-testid='create-workspace-modal'>
<ModalHeader paddingX='24px' paddingY='20px'>
<Text fontWeight={700} size='xl' color='black.500' letterSpacing='-0.2px'>
Create a new workspace
Expand All @@ -97,6 +97,7 @@ const CreateWorkspace = ({
Workspace Name
</Text>
<Input
data-testid='create-workspace-name-input'
backgroundColor='gray.100'
onChange={formik.handleChange}
value={formik.values.name}
Expand All @@ -123,6 +124,7 @@ const CreateWorkspace = ({
</Box>

<Textarea
data-testid='create-workspace-description-input'
name='description'
value={formik.values.description}
placeholder='Enter a description'
Expand Down Expand Up @@ -191,6 +193,7 @@ const CreateWorkspace = ({
Cancel
</Button>
<Button
data-testid='create-workspace-submit'
variant='solid'
color='white'
rounded='lg'
Expand Down
1 change: 1 addition & 0 deletions ui/src/views/Sidebar/Workspace/ManageWorkspaceModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ const ManageWorkspaceModal = ({
return (
<>
<Box
data-testid='manage-workspaces'
_hover={{ bgColor: 'gray.300' }}
w='100%'
py='8px'
Expand Down
15 changes: 15 additions & 0 deletions ui/src/views/Sidebar/Workspace/Workspace.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,22 @@ const Workspace = () => {
<>
<Popover closeOnEsc isOpen={isPopOverOpen} onClose={() => setIsPopOverOpen(false)}>
<PopoverTrigger>
<<<<<<< HEAD
<Box cursor='pointer'>
=======
<Box
data-testid='workspace-selector-trigger'
bgColor='gray.200'
px={2}
py={2}
rounded='lg'
_hover={{ bgColor: 'gray.300' }}
borderWidth='1px'
borderColor='gray.400'
borderStyle='solid'
cursor='pointer'
>
>>>>>>> f4a938794 (chore(CE): data-testid attributes to the main sidebar and workspace UI (#1781))
<Box
bgColor='gray.300'
px={2}
Expand Down
18 changes: 17 additions & 1 deletion ui/src/views/Sidebar/Workspace/WorkspaceList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ const WorkspaceList = ({
organizationName,
}: WorkspacListProps) => {
return (
<ModalContent>
<ModalContent data-testid='workspace-select-modal'>
<ModalHeader paddingX='24px' paddingY='20px'>
<Text fontWeight={700} size='xl' color='black.500' letterSpacing='-0.2px'>
Select a workspace
Expand Down Expand Up @@ -102,6 +102,7 @@ const WorkspaceList = ({
>
Cancel
</Button>
<<<<<<< HEAD
<Button
variant='solid'
color='white'
Expand All @@ -112,6 +113,21 @@ const WorkspaceList = ({
>
Create New Workspace
</Button>
=======
<RoleAccess location='workspace' type='item' action={UserActions.Create}>
<Button
data-testid='create-new-workspace'
variant='solid'
color='white'
rounded='lg'
onClick={handleCreateNewWorkspace}
minWidth={0}
width='auto'
>
Create New Workspace
</Button>
</RoleAccess>
>>>>>>> f4a938794 (chore(CE): data-testid attributes to the main sidebar and workspace UI (#1781))
</Flex>
</Box>
</ModalFooter>
Expand Down
Loading