Skip to content

test(tokens): Automate tests from the release 2.14: tokens group#479

Merged
estefafdez merged 35 commits intomainfrom
estefafdez/task/token-group
Mar 31, 2026
Merged

test(tokens): Automate tests from the release 2.14: tokens group#479
estefafdez merged 35 commits intomainfrom
estefafdez/task/token-group

Conversation

@estefafdez
Copy link
Copy Markdown
Collaborator

@estefafdez estefafdez commented Mar 18, 2026

Done Definition Checks

Taiga URL (optional)

Taiga Ticket: 931

Description

This PR includes the following tests from the release 2.14:

How to test

  • Check the code
  • Update the test case in Qase (Automation Status field or steps changed)
  • It complies with the test conventions
  • There are no missing snapshots for win32 (x3 browsers)
  • The tests run OK

Screenshots 📸 (optional)

image

estefafdez and others added 22 commits March 16, 2026 13:17
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@estefafdez estefafdez self-assigned this Mar 18, 2026
@estefafdez estefafdez marked this pull request as ready for review March 20, 2026 10:22
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds Playwright coverage for Tokens “group/path” behavior introduced in release 2.14, including UI assertions and screenshot baselines for the nested token grouping.

Changes:

  • Added token-group.spec.ts with Qase-linked tests for single-segment tokens and nested group display for shared paths.
  • Extended TokensComponent with helpers/locators to assert single-segment rendering and group/path behavior.
  • Added new screenshot baselines for the nested group rendering (currently linux/chrome + linux/firefox).

Reviewed changes

Copilot reviewed 2 out of 4 changed files in this pull request and generated 2 comments.

File Description
tests/tokens/token-group.spec.ts New tests for token pill rendering and nested grouping, including a screenshot assertion.
pages/workspace/tokens/token-components/tokens-base-component.ts Adds locators and assertion helpers used by the new tests.
tests/tokens/token-group.spec.ts-snapshots/linux/chrome/token-group-primary-nested.png Baseline screenshot for chrome on linux.
tests/tokens/token-group.spec.ts-snapshots/linux/firefox/token-group-primary-nested.png Baseline screenshot for firefox on linux.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread tests/tokens/token-group.spec.ts
Comment thread pages/workspace/tokens/token-components/tokens-base-component.ts
@kilo-code-bot
Copy link
Copy Markdown

kilo-code-bot bot commented Mar 23, 2026

Kilo Code Review could not run — your account is out of credits.

Add credits at app.kilo.ai to enable reviews on this change.

@daniel-herrero daniel-herrero self-requested a review March 27, 2026 13:09
@estefafdez estefafdez removed the request for review from lugarbos March 27, 2026 13:09
Comment thread pages/workspace/tokens/token-components/tokens-base-component.ts
Comment thread pages/workspace/tokens/token-components/tokens-base-component.ts Outdated
Comment thread pages/workspace/tokens/token-components/tokens-base-component.ts Outdated
@estefafdez
Copy link
Copy Markdown
Collaborator Author

estefafdez commented Mar 30, 2026

New things after what we commented on the daily @daniel-herrero:

  • Added TokenGroupData extending BasicTokenData in tokens-base-component.ts:
export interface TokenGroupData extends BasicTokenData {
  parent?: TokenGroupData;
}
  • name holds the group path segment (e.g. 'primary')
  • parent is optional — available for nested hierarchy tests when needed

The POM methods (isTokenGroupVisible, isTokenVisibleInGroup, isLastSegmentVisibleInGroup, isTokenGroupCount) now accept TokenGroupData instead of a plain string, so tests define groups as typed objects:

const primaryGroup: TokenGroupData = { name: 'primary' };

Also removed the duplicate BasicTokenData that existed in tokens-base-page.ts.

@estefafdez
Copy link
Copy Markdown
Collaborator Author

@daniel-herrero both tests are working after the changes :)

image

Comment thread tests/tokens/token-group.spec.ts
Comment thread tests/tokens/token-group.spec.ts Outdated
Comment thread pages/workspace/tokens/token-components/tokens-base-component.ts
Copy link
Copy Markdown
Collaborator

@daniel-herrero daniel-herrero left a comment

Choose a reason for hiding this comment

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

LGTM! Thank you for solving the basis of the token groups and dealing with their locators!

@estefafdez estefafdez merged commit c9cb71e into main Mar 31, 2026
1 check failed
@estefafdez estefafdez deleted the estefafdez/task/token-group branch March 31, 2026 09:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants