Skip to content

Commit 48901b9

Browse files
authored
Merge pull request #1 from jesusdev98/chore/pnpm-migration-and-dependency-update
chore: migrate to pnpm and update dependencies
2 parents 9fc0a55 + 1fa0240 commit 48901b9

12 files changed

Lines changed: 6293 additions & 10263 deletions

.github/workflows/ci.yml

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,18 +16,23 @@ jobs:
1616
- name: Checkout
1717
uses: actions/checkout@v5
1818

19+
- name: Setup pnpm
20+
uses: pnpm/action-setup@v4
21+
with:
22+
version: 11.5.0
23+
1924
- name: Setup Node
2025
uses: actions/setup-node@v5
2126
with:
2227
node-version: 22
23-
cache: npm
24-
cache-dependency-path: package-lock.json
28+
cache: pnpm
29+
cache-dependency-path: pnpm-lock.yaml
2530

2631
- name: Install dependencies
27-
run: npm ci
32+
run: pnpm install --frozen-lockfile
2833

2934
- name: Run unit tests
30-
run: npm test -- --watch=false
35+
run: pnpm test --watch=false
3136

3237
- name: Build production app
33-
run: npm run build
38+
run: pnpm run build

.github/workflows/deploy-pages.yml

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,21 +24,26 @@ jobs:
2424
- name: Checkout
2525
uses: actions/checkout@v5
2626

27+
- name: Setup pnpm
28+
uses: pnpm/action-setup@v4
29+
with:
30+
version: 11.5.0
31+
2732
- name: Setup Node
2833
uses: actions/setup-node@v5
2934
with:
3035
node-version: 22
31-
cache: npm
32-
cache-dependency-path: package-lock.json
36+
cache: pnpm
37+
cache-dependency-path: pnpm-lock.yaml
3338

3439
- name: Install dependencies
35-
run: npm ci
40+
run: pnpm install --frozen-lockfile
3641

3742
- name: Run unit tests
38-
run: npm test -- --watch=false
43+
run: pnpm test --watch=false
3944

4045
- name: Build Angular app
41-
run: npm run build -- --configuration production --base-href /${{ github.event.repository.name }}/
46+
run: pnpm run build -- --configuration production --base-href /${{ github.event.repository.name }}/
4247

4348
- name: Add SPA fallback
4449
run: cp dist/devbreak-timer/browser/index.html dist/devbreak-timer/browser/404.html

angular.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"$schema": "./node_modules/@angular/cli/lib/config/schema.json",
33
"version": 1,
44
"cli": {
5-
"packageManager": "npm"
5+
"packageManager": "pnpm"
66
},
77
"newProjectRoot": "projects",
88
"projects": {

cypress/e2e/focus-workflow.cy.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,24 +25,24 @@ describe('Focus workflow', () => {
2525

2626
cy.getByTestId('start-button').click();
2727
cy.tick(1_000);
28-
cy.getByTestId('timer-status').should('contain.text', 'running');
28+
cy.getByTestId('timer-status').should('contain.text', 'Running');
2929
cy.getByTestId('timer-display').should('contain.text', '00:59');
3030

3131
cy.getByTestId('pause-button').click();
32-
cy.getByTestId('timer-status').should('contain.text', 'paused');
32+
cy.getByTestId('timer-status').should('contain.text', 'Paused');
3333

3434
cy.getByTestId('start-button').click();
35-
cy.getByTestId('timer-status').should('contain.text', 'running');
35+
cy.getByTestId('timer-status').should('contain.text', 'Running');
3636

3737
cy.getByTestId('reset-button').click();
38-
cy.getByTestId('timer-status').should('contain.text', 'idle');
38+
cy.getByTestId('timer-status').should('contain.text', 'Ready');
3939
cy.getByTestId('timer-display').should('contain.text', '01:00');
4040

4141
cy.getByTestId('start-button').click();
4242
cy.tick(60_000);
4343

44-
cy.getByTestId('timer-status').should('contain.text', 'completed');
45-
cy.contains('.focus-completion', 'Focus Session Completed').should('be.visible');
44+
cy.getByTestId('timer-status').should('contain.text', 'Done');
45+
cy.contains('.focus-completion', 'Focus complete').should('be.visible');
4646
cy.contains('.focus-completion', 'Focus reliability pass').should('be.visible');
4747
});
4848
});

cypress/e2e/kanban-workflow.cy.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@ describe('Kanban core workflow', () => {
1111
});
1212

1313
it('creates, edits, moves, archives, and restores a task', () => {
14-
cy.contains('label', 'New Task').find('input').type('Draft release notes');
14+
cy.contains('label', 'New task').find('input').type('Draft release notes');
1515
cy.contains('label', 'Description').find('textarea').type('Capture launch details');
16-
cy.contains('button', 'Add Task').click();
16+
cy.contains('button', 'Add task').click();
1717

1818
taskCard('Draft release notes').within(() => {
1919
cy.contains('button', 'Edit').click();
@@ -29,7 +29,7 @@ describe('Kanban core workflow', () => {
2929
cy.contains('button', 'Archive').click();
3030
});
3131

32-
cy.contains('summary', 'Archived Tasks').click();
32+
cy.contains('summary', 'Archived').click();
3333
cy.get('.kanban-archive').within(() => {
3434
cy.contains('Finalize release notes').should('be.visible');
3535
cy.contains('button', 'Restore').click();

cypress/e2e/keyboard-accessibility.cy.ts

Lines changed: 17 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ describe('Keyboard and accessibility workflows', () => {
2222
cy.press(Cypress.Keyboard.Keys.TAB);
2323
cy.focused().should('contain.text', 'Active');
2424

25-
cy.contains('label', 'New Task').find('input').focus().type('Keyboard task');
26-
cy.contains('button', 'Add Task').focus();
25+
cy.contains('label', 'New task').find('input').focus().type('Keyboard task');
26+
cy.contains('button', 'Add task').focus();
2727
cy.focused().type('{enter}');
2828
cy.getByTestId('kanban-column-ideas').should('contain.text', 'Keyboard task');
2929

@@ -35,7 +35,7 @@ describe('Keyboard and accessibility workflows', () => {
3535

3636
cy.getByTestId('start-button').focus();
3737
cy.focused().type('{enter}');
38-
cy.getByTestId('timer-status').should('contain.text', 'running');
38+
cy.getByTestId('timer-status').should('contain.text', 'Running');
3939
});
4040

4141
it('restores focus after settings, quick-add, and task edit cancellation', () => {
@@ -50,10 +50,10 @@ describe('Keyboard and accessibility workflows', () => {
5050
cy.focused().should('have.attr', 'data-testid', 'settings-button');
5151

5252
cy.getByTestId('kanban-column-todo').within(() => {
53-
cy.contains('button', '+ Add task').click();
53+
cy.contains('button', '+ Task').click();
5454
cy.get('input[name="quickAddTitle"]').should('be.focused').type('Canceled task');
5555
cy.focused().type('{esc}');
56-
cy.focused().should('contain.text', '+ Add task');
56+
cy.focused().should('contain.text', '+ Task');
5757
});
5858

5959
cy.contains('[data-testid="task-card"]', 'Keyboard audit task').within(() => {
@@ -68,11 +68,11 @@ describe('Keyboard and accessibility workflows', () => {
6868
cy.visit('/');
6969

7070
cy.getByTestId('settings-button').click();
71-
cy.get('[aria-label="Edit shortcut for Search"]').click();
72-
cy.get('[aria-label="Edit shortcut for Search"]').should('contain.text', 'Press keys');
71+
shortcutButton('Search').click();
72+
shortcutButton('Search').should('contain.text', 'Press keys');
7373

7474
cy.focused().type('{esc}');
75-
cy.get('[aria-label="Edit shortcut for Search"]').should('not.contain.text', 'Press keys');
75+
shortcutButton('Search').should('not.contain.text', 'Press keys');
7676
cy.get('.settings-panel').should('be.visible');
7777

7878
cy.get('body').type('{esc}');
@@ -86,10 +86,10 @@ describe('Keyboard and accessibility workflows', () => {
8686
cy.getByTestId('settings-button').click();
8787
cy.focused().should('contain.text', 'Close');
8888

89-
cy.focused().type('{shift+tab}');
89+
cy.focused().trigger('keydown', { key: 'Tab', shiftKey: true });
9090
cy.focused().should('contain.text', 'Apply');
9191

92-
cy.focused().type('{tab}');
92+
cy.focused().trigger('keydown', { key: 'Tab' });
9393
cy.focused().should('contain.text', 'Close');
9494

9595
cy.get('body').type('{esc}');
@@ -106,8 +106,8 @@ describe('Keyboard and accessibility workflows', () => {
106106
},
107107
});
108108

109-
cy.contains('label', 'New Task').find('input').type('Reduced motion task');
110-
cy.contains('button', 'Add Task').click();
109+
cy.contains('label', 'New task').find('input').type('Reduced motion task');
110+
cy.contains('button', 'Add task').click();
111111
cy.getByTestId('kanban-column-ideas').should('contain.text', 'Reduced motion task');
112112

113113
cy.get('.kanban-density').contains('button', 'Compact').click();
@@ -117,10 +117,14 @@ describe('Keyboard and accessibility workflows', () => {
117117

118118
cy.getByTestId('start-button').click();
119119
cy.tick(1_000);
120-
cy.getByTestId('timer-status').should('contain.text', 'running');
120+
cy.getByTestId('timer-status').should('contain.text', 'Running');
121121
});
122122
});
123123

124+
function shortcutButton(label: string): Cypress.Chainable<JQuery<HTMLButtonElement>> {
125+
return cy.contains('.shortcut-row', label).find('button.shortcut-key');
126+
}
127+
124128
function createTask() {
125129
return {
126130
id: 'task-keyboard-e2e',

cypress/e2e/persistence-workflow.cy.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ describe('Persistence restore workflow', () => {
1313
},
1414
});
1515

16-
cy.contains('label', 'New Task').find('input').type('Persistent task');
17-
cy.contains('button', 'Add Task').click();
16+
cy.contains('label', 'New task').find('input').type('Persistent task');
17+
cy.contains('button', 'Add task').click();
1818
cy.reload();
1919

2020
cy.getByTestId('kanban-column-ideas').should('contain.text', 'Persistent task');
@@ -30,7 +30,7 @@ describe('Persistence restore workflow', () => {
3030
cy.reload();
3131
cy.tick(2_000);
3232

33-
cy.getByTestId('timer-status').should('contain.text', 'running');
33+
cy.getByTestId('timer-status').should('contain.text', 'Running');
3434
cy.getByTestId('timer-display').should('contain.text', '04:58');
3535
});
3636

cypress/e2e/timer.cy.ts

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ describe('DevBreak Timer', () => {
1212
cy.getByTestId('start-button').click();
1313
cy.tick(1_000);
1414

15-
cy.getByTestId('timer-status').should('contain.text', 'running');
15+
cy.getByTestId('timer-status').should('contain.text', 'Running');
1616
cy.getByTestId('timer-display').should('contain.text', '24:59');
1717
});
1818

@@ -25,7 +25,7 @@ describe('DevBreak Timer', () => {
2525
cy.reload();
2626
cy.tick(2_000);
2727

28-
cy.getByTestId('timer-status').should('contain.text', 'running');
28+
cy.getByTestId('timer-status').should('contain.text', 'Running');
2929
cy.getByTestId('timer-display').should('contain.text', '04:58');
3030
});
3131

@@ -40,9 +40,11 @@ describe('DevBreak Timer', () => {
4040
cy.tick(1_000);
4141
cy.window().then((win) => win.dispatchEvent(new Event('focus')));
4242

43-
cy.getByTestId('session-title').should('contain.text', 'Short Break');
43+
cy.getByTestId('pomodoro-session-panel')
44+
.should('contain.text', 'Current')
45+
.and('contain.text', 'Short Break');
4446
cy.getByTestId('session-meta').should('contain.text', 'Cycle 2 / 4');
45-
cy.getByTestId('timer-status').should('contain.text', 'running');
47+
cy.getByTestId('timer-status').should('contain.text', 'Running');
4648
cy.get('@notification').should('have.been.calledOnce');
4749
});
4850

@@ -51,7 +53,9 @@ describe('DevBreak Timer', () => {
5153
cy.visit('/');
5254

5355
cy.getByTestId('pomodoro-toggle').click({ force: true });
54-
cy.getByTestId('session-title').should('contain.text', 'Focus Session');
56+
cy.getByTestId('pomodoro-session-panel')
57+
.should('contain.text', 'Current')
58+
.and('contain.text', 'Focus Session');
5559
cy.document().its('documentElement.scrollWidth').should('be.lte', 320);
5660
});
5761

@@ -66,7 +70,7 @@ describe('DevBreak Timer', () => {
6670
cy.tick(1_000);
6771
cy.window().then((win) => win.dispatchEvent(new Event('focus')));
6872

69-
cy.getByTestId('timer-status').should('contain.text', 'completed');
73+
cy.getByTestId('timer-status').should('contain.text', 'Done');
7074
cy.get('@notification').should('not.have.been.called');
7175
});
7276
});

0 commit comments

Comments
 (0)