Skip to content

Commit e49e117

Browse files
Rajgupta36arkid15rkasya
committed
UI/ux mentorship admin (#2288)
* Improve UI/UX * update button padding * fix unit test cases * fix suggestions * Update docker-compose/local.yaml * UI/ux mentorship program update (#2244) * fix ui bugs * update format * fix test cases * fix test cases * update UI * update UI * update line clamp property * fix test case * Update styling --------- Co-authored-by: Kate Golovanova <[email protected]> Co-authored-by: Arkadii Yakovets <[email protected]> * fix conflicts * update ui * fix bugs * updated focus ring * format fix * Update docker-compose/local.yaml * UI/ux mentorship program update (#2244) * fix ui bugs * update format * fix test cases * fix test cases * update UI * update UI * update line clamp property * fix test case * Update styling --------- Co-authored-by: Kate Golovanova <[email protected]> Co-authored-by: Arkadii Yakovets <[email protected]> * fix params and remove refresh params (#2287) * Update docker-compose/local.yaml * UI/ux mentorship program update (#2244) * fix ui bugs * update format * fix test cases * fix test cases * update UI * update UI * update line clamp property * fix test case * Update styling --------- Co-authored-by: Kate Golovanova <[email protected]> Co-authored-by: Arkadii Yakovets <[email protected]> * fix params and remove refresh params * update direct cache * fix test cases * better exception caching * update logic Update docker-compose/local.yaml UI/ux mentorship program update (#2244) * fix ui bugs * update format * fix test cases * fix test cases * update UI * update UI * update line clamp property * fix test case * Update styling --------- Co-authored-by: Kate Golovanova <[email protected]> Co-authored-by: Arkadii Yakovets <[email protected]> * Update apollo cache logic on updating programs and modules * restore files * fix test cases * fix test cases * update button to link * fix type --------- Co-authored-by: Arkadii Yakovets <[email protected]> Co-authored-by: Kate Golovanova <[email protected]> Co-authored-by: Arkadii Yakovets <[email protected]> * update button --------- Co-authored-by: Arkadii Yakovets <[email protected]> Co-authored-by: Kate Golovanova <[email protected]> Co-authored-by: Arkadii Yakovets <[email protected]>
1 parent 74b1a23 commit e49e117

File tree

16 files changed

+373
-142
lines changed

16 files changed

+373
-142
lines changed

frontend/__tests__/unit/components/ProgramActions.test.tsx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ describe('ProgramActions', () => {
4242
})
4343

4444
test('renders and toggles dropdown', () => {
45-
render(<ProgramActions status="DRAFT" setStatus={setStatus} />)
45+
render(<ProgramActions programKey="test-program" status="DRAFT" setStatus={setStatus} />)
4646
const button = screen.getByTestId('program-actions-button')
4747
fireEvent.click(button)
4848
expect(screen.getByText('Add Module')).toBeInTheDocument()
@@ -52,7 +52,7 @@ describe('ProgramActions', () => {
5252
})
5353

5454
test('handles Add Module action', () => {
55-
render(<ProgramActions status="DRAFT" setStatus={setStatus} />)
55+
render(<ProgramActions programKey="test-program" status="DRAFT" setStatus={setStatus} />)
5656
const button = screen.getByTestId('program-actions-button')
5757
fireEvent.click(button)
5858
fireEvent.click(screen.getByRole('menuitem', { name: /add module/i }))
@@ -61,7 +61,7 @@ describe('ProgramActions', () => {
6161
})
6262

6363
test('handles Publish action', () => {
64-
render(<ProgramActions status="DRAFT" setStatus={setStatus} />)
64+
render(<ProgramActions programKey="test-program" status="DRAFT" setStatus={setStatus} />)
6565
const button = screen.getByTestId('program-actions-button')
6666
fireEvent.click(button)
6767
fireEvent.click(screen.getByRole('menuitem', { name: /publish program/i }))
@@ -70,15 +70,15 @@ describe('ProgramActions', () => {
7070
})
7171

7272
test('handles Move to Draft action', () => {
73-
render(<ProgramActions status="PUBLISHED" setStatus={setStatus} />)
73+
render(<ProgramActions programKey="test-program" status="PUBLISHED" setStatus={setStatus} />)
7474
const button = screen.getByTestId('program-actions-button')
7575
fireEvent.click(button)
7676
fireEvent.click(screen.getByRole('menuitem', { name: /move to draft/i }))
7777
expect(setStatus).toHaveBeenCalledWith('DRAFT')
7878
})
7979

8080
test('handles Mark as Completed action', () => {
81-
render(<ProgramActions status="PUBLISHED" setStatus={setStatus} />)
81+
render(<ProgramActions programKey="test-program" status="PUBLISHED" setStatus={setStatus} />)
8282
const button = screen.getByTestId('program-actions-button')
8383
fireEvent.click(button)
8484
fireEvent.click(screen.getByRole('menuitem', { name: /mark as completed/i }))
@@ -88,7 +88,7 @@ describe('ProgramActions', () => {
8888
test('dropdown closes on outside click', () => {
8989
render(
9090
<div>
91-
<ProgramActions status="DRAFT" setStatus={setStatus} />
91+
<ProgramActions programKey="test-program" status="DRAFT" setStatus={setStatus} />
9292
<button data-testid="outside">Outside</button>
9393
</div>
9494
)

0 commit comments

Comments
 (0)