Skip to content

test(e2e): comprehensive local suite resolves stale published packages instead of workspace source #257

Description

@ikenyal

Problem

On current main, the comprehensive local E2E suite type-checks its backend against nested published dependencies under test-apps/comprehensive/node_modules/@aws-blocks/*, rather than the workspace packages being tested.

This makes the suite unusable for API changes that have not yet been released. For example, after #38 added AuthCognito.admin, the current comprehensive backend enables admin: {} and calls authC.admin.*, while the nested published @aws-blocks/bb-auth-cognito@0.1.5 does not contain that getter.

Reproduction

From a clean checkout at current main with a lockfile install:

  1. Run npm ci.
  2. Run npm run build:packages.
  3. Run npm run test:e2e:local.

Actual: the backend type check fails with an error equivalent to:

Property 'admin' does not exist on type 'AuthCognito<...>'.

Using tsc --traceResolution shows the import chain resolving to:

test-apps/comprehensive/node_modules/@aws-blocks/blocks/dist/index.d.ts
test-apps/comprehensive/node_modules/@aws-blocks/bb-auth-cognito/dist/index.d.ts

rather than the corresponding packages under packages/*.

Expected behavior

The repository's local E2E suite should use the current workspace packages, so it validates the code on the branch instead of a previously published release.

Scope

This is independent of #233, which changes only the Amplify overlay and does not touch AuthCognito or the comprehensive test application. #38 surfaced the problem because it changed the source and comprehensive backend together before a newly published package version was available.

A fix likely needs to make the local E2E setup resolve workspace artifacts consistently, but the preferred mechanism (linking, packaging, or another test setup change) is a maintainer design decision.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingpending-maintainer-responseWaiting on a response from the maintainers

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions