Skip to content

Commit 0cf7ca3

Browse files
committed
fix: stabilize extension action e2e
1 parent 9d0efc2 commit 0cf7ca3

2 files changed

Lines changed: 6 additions & 19 deletions

File tree

e2e/extension.spec.cjs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1150,6 +1150,7 @@ test.describe('extension workflow', () => {
11501150
knowledgePain: 'The real sidepanel path is easy to under-test.',
11511151
knowledgeImprove: 'Capture the browser path in automated release checks.',
11521152
});
1153+
await setSidepanelUiMode(creatorProfile.page, 'advanced');
11531154
await waitForDashboardValue(
11541155
creatorProfile.page,
11551156
(dashboard) =>

packages/extension/src/background/handlers/action-executors.ts

Lines changed: 5 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,11 @@ import type {
44
PolicyActionClass,
55
getAuthSession,
66
} from '@coop/shared';
7+
import { buildArchiveExecutors } from './executors/archive';
8+
import { buildErc8004Executors } from './executors/erc8004';
9+
import { buildGreenGoodsExecutors } from './executors/green-goods';
10+
import { buildOnchainExecutors } from './executors/onchain';
11+
import { buildReviewExecutors } from './executors/review';
712

813
/** Context passed from handleExecuteAction into each executor. */
914
export interface ActionExecutorContext {
@@ -20,31 +25,12 @@ export type ExecutorResult = Promise<{ ok: boolean; error?: string; data?: unkno
2025

2126
/**
2227
* Build the action executor map used by `handleExecuteAction`.
23-
*
24-
* Each executor module is loaded on first call rather than eagerly with the
25-
* background bundle. The simple-mode demo only fires a small slice of action
26-
* classes (capture/publish); deferring erc8004, green-goods, and onchain
27-
* executors keeps them out of the SW cold-start path.
2828
*/
2929
export async function buildActionExecutors(
3030
ctx: ActionExecutorContext,
3131
): Promise<
3232
Partial<Record<PolicyActionClass, (payload: Record<string, unknown>) => ExecutorResult>>
3333
> {
34-
const [
35-
{ buildArchiveExecutors },
36-
{ buildReviewExecutors },
37-
{ buildGreenGoodsExecutors },
38-
{ buildErc8004Executors },
39-
{ buildOnchainExecutors },
40-
] = await Promise.all([
41-
import('./executors/archive'),
42-
import('./executors/review'),
43-
import('./executors/green-goods'),
44-
import('./executors/erc8004'),
45-
import('./executors/onchain'),
46-
]);
47-
4834
return {
4935
...buildArchiveExecutors(ctx),
5036
...buildReviewExecutors(ctx),

0 commit comments

Comments
 (0)