feat(slack): pinned seed ids and X-OAuth-Scopes on auth.test - #229
Closed
0xChathurinda wants to merge 1 commit into
Closed
feat(slack): pinned seed ids and X-OAuth-Scopes on auth.test#2290xChathurinda wants to merge 1 commit into
0xChathurinda wants to merge 1 commit into
Conversation
Seed users and channels may now carry `user_id` / `channel_id`, so a fixture and the application under test can agree on an id without a lookup at start (a mirror channel id in an env var, a bot user id a client pins). Ids are still generated when omitted, and a pinned id that already exists is left alone rather than duplicated. auth.test now returns the token's scopes in the `X-OAuth-Scopes` response header, as Slack does. SDK setup checks and permission probes read that header to decide which methods they may call; without it every scope looked missing.
Contributor
|
@0xChathurinda is attempting to deploy a commit to the Vercel Labs Team on Vercel. A member of the Team first needs to authorize it. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Two small Slack fidelity additions that test suites pointing a real app at the emulator need:
slack.users[].user_idandslack.channels[].channel_idare now honoured, so a fixture and the application under test can agree on an id without a lookup at start (the mirror channel id an app reads from an env var, the bot user id it pins). Ids are still generated when omitted; a pinned id that already exists is left alone rather than duplicated.X-OAuth-Scopesonauth.test. Slack reports the token's granted scopes in that response header, and SDKs and setup checks read it to decide which methods they may call. The emulator sent no header, so every scope looked missing.Testing
src/__tests__/seed-ids.test.tscovers pinned vs generated ids,users.lookupByEmailresolving the pinned user, duplicate-id protection, and the scopes header.pnpm --filter @emulators/slack test,type-checkandlintpass. Seed examples in the package and root READMEs show the new keys.