Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[876] Add tests for Tokens Studio sync #2756

Merged
merged 1 commit into from
May 17, 2024

Conversation

georgebuciuman
Copy link

Why does this PR exist?

Closes https://github.com/tokens-studio/studio-app/issues/876

What does this pull request do?

  • Adds tests for all Tokens Studio sync flows
  • Fixes a bug when moving a theme to a new group
  • Removes logic to resolve dynamic sets since we get the tokens from BE now

@georgebuciuman georgebuciuman requested a review from six7 May 15, 2024 08:08
@georgebuciuman georgebuciuman self-assigned this May 15, 2024
Copy link

changeset-bot bot commented May 15, 2024

⚠️ No Changeset found

Latest commit: 67465ea

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Copy link
Collaborator

@six7 six7 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just a clarifying question, otherwise feel free to merge!

jest.clearAllMocks();
});

it.each([
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TIL!

Comment on lines -76 to -87
let tokenSets = data.data.project.sets as TokenSet[];

const dynamicTokenSets = tokenSets.filter((tokenSet) => tokenSet.type === 'DYNAMIC');
const dynamicTokenSetData = await Promise.all(
dynamicTokenSets.map(async (tokenSet) => {
if (!tokenSet.generatorUrn) {
return null;
}
const tokens = await fetchDynamicTokenSetData(tokenSet.generatorUrn);
return { ...tokenSet, tokens };
}),
);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just out of interest, is this no longer needed? or was this never needed?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it's no longer needed as Pop implemented resolving on backend. It was needed before that

@georgebuciuman georgebuciuman merged commit 1579c67 into release-139 May 17, 2024
5 of 6 checks passed
@georgebuciuman georgebuciuman deleted the 876-tokens-studio-sync-tests branch May 17, 2024 10:25
@six7 six7 added the 2.0-rc6 label May 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants