From c60866d7164a54c9cd70a1b94172a5c3b03e8a70 Mon Sep 17 00:00:00 2001 From: Adam Kudrna Date: Thu, 4 Apr 2024 15:04:15 +0200 Subject: [PATCH] fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! Feat(web): Introduce stacking of the `Toast` queue --- .../tools/__tests__/_dictionaries.test.scss | 35 +++++++++++++++++-- 1 file changed, 32 insertions(+), 3 deletions(-) diff --git a/packages/web/src/scss/tools/__tests__/_dictionaries.test.scss b/packages/web/src/scss/tools/__tests__/_dictionaries.test.scss index 185fc6e951..7787ec7ae6 100644 --- a/packages/web/src/scss/tools/__tests__/_dictionaries.test.scss +++ b/packages/web/src/scss/tools/__tests__/_dictionaries.test.scss @@ -9,9 +9,11 @@ @include true.assert { @include true.output { @include dictionaries.generate-colors( - 'Test', - ('primary'), - ( + $class-name: 'Test', + $dictionary-values: ( + 'primary', + ), + $config: ( color: 'default', ) ); @@ -26,6 +28,33 @@ } } } + + @include true.it('should generate correct color classes and data attributes based on a dictionary') { + @include true.assert { + @include true.output { + @include dictionaries.generate-colors( + $class-name: 'Test', + $dictionary-values: ( + 'primary', + ), + $config: ( + color: 'default', + ), + $child-selector: ' > .Test__box', + $generate-data-attribute: true + ); + } + + @include true.expect { + .Test--primary > .Test__box, + .Test[data-spirit-color='primary'] > .Test__box { + --test-color: #29616f; + + color: var(--test-color); + } + } + } + } } @include true.describe('generate-link-colors mixin') {