github-issue-tower-defence-management 1.183.0 → 1.184.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +13 -0
- package/README.md +4 -4
- package/bin/adapter/entry-points/cli/index.js +1 -2
- package/bin/adapter/entry-points/cli/index.js.map +1 -1
- package/bin/adapter/entry-points/cli/projectConfig.js +3 -3
- package/bin/adapter/entry-points/cli/projectConfig.js.map +1 -1
- package/bin/adapter/entry-points/console/consoleGithubTokenResolver.js +20 -6
- package/bin/adapter/entry-points/console/consoleGithubTokenResolver.js.map +1 -1
- package/bin/adapter/entry-points/console/ui-dist/assets/{index-Cc2LSARI.js → index-CMrnEYO1.js} +1 -1
- package/bin/adapter/entry-points/console/ui-dist/index.html +1 -1
- package/bin/adapter/entry-points/handlers/HandleScheduledEventUseCaseHandler.js +1 -0
- package/bin/adapter/entry-points/handlers/HandleScheduledEventUseCaseHandler.js.map +1 -1
- package/bin/adapter/entry-points/handlers/consoleListsWriter.js +1 -0
- package/bin/adapter/entry-points/handlers/consoleListsWriter.js.map +1 -1
- package/bin/domain/usecases/console/GenerateConsoleListsUseCase.js +5 -1
- package/bin/domain/usecases/console/GenerateConsoleListsUseCase.js.map +1 -1
- package/eslint.config.mjs +9 -0
- package/package.json +1 -1
- package/src/adapter/ci/workflowRunCancellation.test.ts +0 -46
- package/src/adapter/entry-points/cli/index.ts +2 -3
- package/src/adapter/entry-points/cli/projectConfig.test.ts +58 -0
- package/src/adapter/entry-points/cli/projectConfig.ts +6 -6
- package/src/adapter/entry-points/console/consoleGithubTokenResolver.test.ts +77 -28
- package/src/adapter/entry-points/console/consoleGithubTokenResolver.ts +25 -6
- package/src/adapter/entry-points/console/ui/e2e/consoleScenario.spec.ts +9 -0
- package/src/adapter/entry-points/console/ui/e2e/consoleTestHarness.ts +3 -0
- package/src/adapter/entry-points/console/ui/src/features/console/components/list/ConsoleStoryList.stories.tsx +23 -2
- package/src/adapter/entry-points/console/ui/src/features/console/components/list/ConsoleStoryList.test.tsx +60 -0
- package/src/adapter/entry-points/console/ui/src/features/console/components/list/ConsoleStoryList.tsx +25 -9
- package/src/adapter/entry-points/console/ui/src/features/console/logic/types.ts +1 -0
- package/src/adapter/entry-points/console/ui-dist/assets/{index-Cc2LSARI.js → index-CMrnEYO1.js} +1 -1
- package/src/adapter/entry-points/console/ui-dist/index.html +1 -1
- package/src/adapter/entry-points/handlers/HandleScheduledEventUseCaseHandler.ts +1 -0
- package/src/adapter/entry-points/handlers/consoleListsWriter.ts +2 -0
- package/src/domain/usecases/StartPreparationUseCase.test.ts +2 -2
- package/src/domain/usecases/console/GenerateConsoleListsUseCase.test.ts +53 -0
- package/src/domain/usecases/console/GenerateConsoleListsUseCase.ts +7 -0
- package/types/adapter/entry-points/cli/index.d.ts.map +1 -1
- package/types/adapter/entry-points/cli/projectConfig.d.ts +1 -1
- package/types/adapter/entry-points/cli/projectConfig.d.ts.map +1 -1
- package/types/adapter/entry-points/console/consoleGithubTokenResolver.d.ts +1 -1
- package/types/adapter/entry-points/console/consoleGithubTokenResolver.d.ts.map +1 -1
- package/types/adapter/entry-points/handlers/HandleScheduledEventUseCaseHandler.d.ts.map +1 -1
- package/types/adapter/entry-points/handlers/consoleListsWriter.d.ts +1 -0
- package/types/adapter/entry-points/handlers/consoleListsWriter.d.ts.map +1 -1
- package/types/domain/usecases/console/GenerateConsoleListsUseCase.d.ts +2 -0
- package/types/domain/usecases/console/GenerateConsoleListsUseCase.d.ts.map +1 -1
|
@@ -399,10 +399,19 @@ test('renders the stories tab with non-gray stories, their open item counts, and
|
|
|
399
399
|
tdpmRow.locator('.console-op-button', { hasText: 'Add task' }),
|
|
400
400
|
).toBeVisible();
|
|
401
401
|
|
|
402
|
+
const tdpmLink = tdpmRow.locator('a.console-storytag');
|
|
403
|
+
await expect(tdpmLink).toBeVisible();
|
|
404
|
+
await expect(tdpmLink).toHaveAttribute(
|
|
405
|
+
'href',
|
|
406
|
+
'https://github.com/orgs/HiromiShikata/projects/6/views/1?sliceBy%5Bvalue%5D=TDPM%20Console%20port',
|
|
407
|
+
);
|
|
408
|
+
|
|
402
409
|
const publishRow = page.locator('.console-story-list-row', {
|
|
403
410
|
hasText: 'Publish product documentation site',
|
|
404
411
|
});
|
|
405
412
|
await expect(publishRow.locator('.console-story-count')).toHaveText('1');
|
|
413
|
+
await expect(publishRow.locator('a.console-storytag')).toHaveCount(0);
|
|
414
|
+
await expect(publishRow.locator('span.console-storytag')).toBeVisible();
|
|
406
415
|
|
|
407
416
|
await expect(
|
|
408
417
|
page.locator('.console-story-list-row', {
|
|
@@ -282,12 +282,15 @@ const CONSOLE_E2E_STORIES_SNAPSHOT = {
|
|
|
282
282
|
storyOptionId: '1491051e',
|
|
283
283
|
color: 'BLUE',
|
|
284
284
|
openItemCount: 4,
|
|
285
|
+
storyViewUrl:
|
|
286
|
+
'https://github.com/orgs/HiromiShikata/projects/6/views/1?sliceBy%5Bvalue%5D=TDPM%20Console%20port',
|
|
285
287
|
},
|
|
286
288
|
{
|
|
287
289
|
storyName: 'Publish product documentation site',
|
|
288
290
|
storyOptionId: 'f7cd5cbc',
|
|
289
291
|
color: 'GREEN',
|
|
290
292
|
openItemCount: 1,
|
|
293
|
+
storyViewUrl: null,
|
|
291
294
|
},
|
|
292
295
|
{
|
|
293
296
|
storyName: 'regular / WORKFLOW BLOCKER',
|
|
@@ -1,39 +1,52 @@
|
|
|
1
1
|
import type { Meta, StoryObj } from '@storybook/react-vite';
|
|
2
2
|
import { ConsoleStoryList } from './ConsoleStoryList';
|
|
3
3
|
|
|
4
|
-
const
|
|
4
|
+
const storiesWithoutUrl = [
|
|
5
5
|
{
|
|
6
6
|
storyName: 'TDPM Console port',
|
|
7
7
|
storyOptionId: '1491051e',
|
|
8
8
|
color: 'BLUE' as const,
|
|
9
9
|
openItemCount: 12,
|
|
10
|
+
storyViewUrl: null,
|
|
10
11
|
},
|
|
11
12
|
{
|
|
12
13
|
storyName: 'Publish product documentation site',
|
|
13
14
|
storyOptionId: 'f7cd5cbc',
|
|
14
15
|
color: 'GREEN' as const,
|
|
15
16
|
openItemCount: 3,
|
|
17
|
+
storyViewUrl: null,
|
|
16
18
|
},
|
|
17
19
|
{
|
|
18
20
|
storyName: 'Move to Okinawa',
|
|
19
21
|
storyOptionId: '564803ee',
|
|
20
22
|
color: 'PURPLE' as const,
|
|
21
23
|
openItemCount: 0,
|
|
24
|
+
storyViewUrl: null,
|
|
22
25
|
},
|
|
23
26
|
{
|
|
24
27
|
storyName: 'regular / regular payment invoice tax',
|
|
25
28
|
storyOptionId: 'd7cdcb61',
|
|
26
29
|
color: 'YELLOW' as const,
|
|
27
30
|
openItemCount: 7,
|
|
31
|
+
storyViewUrl: null,
|
|
28
32
|
},
|
|
29
33
|
{
|
|
30
34
|
storyName: 'regular / WORKFLOW BLOCKER',
|
|
31
35
|
storyOptionId: 'e35b3da2',
|
|
32
36
|
color: 'RED' as const,
|
|
33
37
|
openItemCount: 2,
|
|
38
|
+
storyViewUrl: null,
|
|
34
39
|
},
|
|
35
40
|
];
|
|
36
41
|
|
|
42
|
+
const BASE_VIEW_URL =
|
|
43
|
+
'https://github.com/orgs/HiromiShikata/projects/6/views/1';
|
|
44
|
+
|
|
45
|
+
const storiesWithUrl = storiesWithoutUrl.map((s) => ({
|
|
46
|
+
...s,
|
|
47
|
+
storyViewUrl: `${BASE_VIEW_URL}?sliceBy%5Bvalue%5D=${encodeURI(s.storyName).replace(/#/g, '%23').replace(/&/g, '%26')}`,
|
|
48
|
+
}));
|
|
49
|
+
|
|
37
50
|
const meta: Meta<typeof ConsoleStoryList> = {
|
|
38
51
|
title: 'Console/ConsoleStoryList',
|
|
39
52
|
component: ConsoleStoryList,
|
|
@@ -46,7 +59,15 @@ type Story = StoryObj<typeof ConsoleStoryList>;
|
|
|
46
59
|
|
|
47
60
|
export const WithStories: Story = {
|
|
48
61
|
args: {
|
|
49
|
-
stories,
|
|
62
|
+
stories: storiesWithoutUrl,
|
|
63
|
+
isLoading: false,
|
|
64
|
+
error: null,
|
|
65
|
+
},
|
|
66
|
+
};
|
|
67
|
+
|
|
68
|
+
export const WithStoriesLinked: Story = {
|
|
69
|
+
args: {
|
|
70
|
+
stories: storiesWithUrl,
|
|
50
71
|
isLoading: false,
|
|
51
72
|
error: null,
|
|
52
73
|
},
|
|
@@ -8,12 +8,14 @@ const storyEntries: ConsoleStoryEntry[] = [
|
|
|
8
8
|
storyOptionId: '1491051e',
|
|
9
9
|
color: 'BLUE',
|
|
10
10
|
openItemCount: 12,
|
|
11
|
+
storyViewUrl: null,
|
|
11
12
|
},
|
|
12
13
|
{
|
|
13
14
|
storyName: 'Move to Okinawa',
|
|
14
15
|
storyOptionId: '564803ee',
|
|
15
16
|
color: 'PURPLE',
|
|
16
17
|
openItemCount: 0,
|
|
18
|
+
storyViewUrl: null,
|
|
17
19
|
},
|
|
18
20
|
];
|
|
19
21
|
|
|
@@ -193,4 +195,62 @@ describe('ConsoleStoryList', () => {
|
|
|
193
195
|
expect(getByRole('alert')).toBeInTheDocument();
|
|
194
196
|
expect(getByText(/HTTP 503/)).toBeInTheDocument();
|
|
195
197
|
});
|
|
198
|
+
|
|
199
|
+
it('renders story name as a span when storyViewUrl is absent (old JSON format)', () => {
|
|
200
|
+
const oldFormatEntry = {
|
|
201
|
+
storyName: 'TDPM Console port',
|
|
202
|
+
storyOptionId: '1491051e',
|
|
203
|
+
color: 'BLUE',
|
|
204
|
+
openItemCount: 4,
|
|
205
|
+
} as unknown as ConsoleStoryEntry;
|
|
206
|
+
const { getByText } = render(
|
|
207
|
+
<ConsoleStoryList
|
|
208
|
+
stories={[oldFormatEntry]}
|
|
209
|
+
isLoading={false}
|
|
210
|
+
error={null}
|
|
211
|
+
onCreateIssue={() => Promise.resolve()}
|
|
212
|
+
/>,
|
|
213
|
+
);
|
|
214
|
+
const nameEl = getByText('TDPM Console port');
|
|
215
|
+
expect(nameEl.tagName).toBe('SPAN');
|
|
216
|
+
});
|
|
217
|
+
|
|
218
|
+
it('renders story name as a span when storyViewUrl is null', () => {
|
|
219
|
+
const { getByText } = render(
|
|
220
|
+
<ConsoleStoryList
|
|
221
|
+
stories={storyEntries}
|
|
222
|
+
isLoading={false}
|
|
223
|
+
error={null}
|
|
224
|
+
onCreateIssue={() => Promise.resolve()}
|
|
225
|
+
/>,
|
|
226
|
+
);
|
|
227
|
+
const nameEl = getByText('TDPM Console port');
|
|
228
|
+
expect(nameEl.tagName).toBe('SPAN');
|
|
229
|
+
});
|
|
230
|
+
|
|
231
|
+
it('renders story name as an anchor when storyViewUrl is non-null', () => {
|
|
232
|
+
const entriesWithUrl: ConsoleStoryEntry[] = [
|
|
233
|
+
{
|
|
234
|
+
...storyEntries[0],
|
|
235
|
+
storyViewUrl:
|
|
236
|
+
'https://github.com/orgs/demo/projects/1/views/1?sliceBy%5Bvalue%5D=TDPM%20Console%20port',
|
|
237
|
+
},
|
|
238
|
+
];
|
|
239
|
+
const { getByText } = render(
|
|
240
|
+
<ConsoleStoryList
|
|
241
|
+
stories={entriesWithUrl}
|
|
242
|
+
isLoading={false}
|
|
243
|
+
error={null}
|
|
244
|
+
onCreateIssue={() => Promise.resolve()}
|
|
245
|
+
/>,
|
|
246
|
+
);
|
|
247
|
+
const nameEl = getByText('TDPM Console port');
|
|
248
|
+
expect(nameEl.tagName).toBe('A');
|
|
249
|
+
expect(nameEl).toHaveAttribute(
|
|
250
|
+
'href',
|
|
251
|
+
'https://github.com/orgs/demo/projects/1/views/1?sliceBy%5Bvalue%5D=TDPM%20Console%20port',
|
|
252
|
+
);
|
|
253
|
+
expect(nameEl).toHaveAttribute('target', '_blank');
|
|
254
|
+
expect(nameEl).toHaveAttribute('rel', 'noopener noreferrer');
|
|
255
|
+
});
|
|
196
256
|
});
|
|
@@ -129,16 +129,32 @@ export const ConsoleStoryList = ({
|
|
|
129
129
|
return (
|
|
130
130
|
<li key={entry.storyOptionId} className="console-story-list-row">
|
|
131
131
|
<div className="console-story-list-row-main">
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
132
|
+
{entry.storyViewUrl ? (
|
|
133
|
+
<a
|
|
134
|
+
href={entry.storyViewUrl}
|
|
135
|
+
target="_blank"
|
|
136
|
+
rel="noopener noreferrer"
|
|
137
|
+
className="console-storytag"
|
|
138
|
+
style={{ color: palette.fg, borderColor: palette.border }}
|
|
139
|
+
>
|
|
140
|
+
<span
|
|
141
|
+
className="console-story-dot"
|
|
142
|
+
style={{ backgroundColor: palette.dot }}
|
|
143
|
+
/>
|
|
144
|
+
{entry.storyName}
|
|
145
|
+
</a>
|
|
146
|
+
) : (
|
|
136
147
|
<span
|
|
137
|
-
className="console-
|
|
138
|
-
style={{
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
148
|
+
className="console-storytag"
|
|
149
|
+
style={{ color: palette.fg, borderColor: palette.border }}
|
|
150
|
+
>
|
|
151
|
+
<span
|
|
152
|
+
className="console-story-dot"
|
|
153
|
+
style={{ backgroundColor: palette.dot }}
|
|
154
|
+
/>
|
|
155
|
+
{entry.storyName}
|
|
156
|
+
</span>
|
|
157
|
+
)}
|
|
142
158
|
<span className="console-story-count">{entry.openItemCount}</span>
|
|
143
159
|
<button
|
|
144
160
|
type="button"
|