Skip to content

Commit

Permalink
test(material/dialog): add tokens test (angular#27343)
Browse files Browse the repository at this point in the history
Adds a test for the dialog tokens since one wasn't added when the dialog was converted to tokens.
  • Loading branch information
crisbeto authored Jun 22, 2023
1 parent 53242fe commit 798634e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/material/core/tokens/m2/mdc/_dialog.scss
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ $prefix: (mdc, dialog);
headline-size: null,
headline-tracking: null,
headline-weight: null,
z-index: null,
);
}

Expand Down
7 changes: 7 additions & 0 deletions src/material/core/tokens/tests/test-validate-tokens.scss
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
@use '@material/tab/tab-theme' as mdc-tab-theme;
@use '@material/snackbar/snackbar-theme' as mdc-snackbar-theme;
@use '@material/chips/chip-theme' as mdc-chips-theme;
@use '@material/dialog/dialog-theme' as mdc-dialog-theme;
@use '@material/theme/validate' as mdc-validate;

@use '../m2/mdc/circular-progress' as tokens-mdc-circular-progress;
Expand All @@ -31,6 +32,7 @@
@use '../m2/mdc/tab' as tokens-mdc-tab;
@use '../m2/mdc/snack-bar' as tokens-mdc-snack-bar;
@use '../m2/mdc/chip' as tokens-mdc-chip;
@use '../m2/mdc/dialog' as tokens-mdc-dialog;

@mixin validate-slots($component, $slots, $reference) {
@debug 'Validating #{$component}...';
Expand Down Expand Up @@ -114,3 +116,8 @@
$slots: tokens-mdc-chip.get-token-slots(),
$reference: mdc-chips-theme.$light-theme
);
@include validate-slots(
$component: 'm2.mdc.dialog',
$slots: tokens-mdc-dialog.get-token-slots(),
$reference: mdc-dialog-theme.$light-theme
);

0 comments on commit 798634e

Please sign in to comment.