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

fix: resolve css subentry path in extract-style #1314

Merged
merged 2 commits into from
Feb 6, 2024

Update packages/@o3r/styling/scss/theming/_mixins.scss

51bbdc8
Select commit
Loading
Failed to load commit list.
Sign in for the full log view
Merged

fix: resolve css subentry path in extract-style #1314

Update packages/@o3r/styling/scss/theming/_mixins.scss
51bbdc8
Select commit
Loading
Failed to load commit list.
GitHub Actions / UT Tests report-windows-latest succeeded Feb 6, 2024 in 1s

119 passed, 0 failed and 0 skipped

Tests passed successfully

Report Passed Failed Skipped Time
apps/showcase/dist-test/ut-report.xml 25✅ 54s
packages/@o3r/design/dist-test/ut-report.xml 39✅ 24s
packages/@o3r/storybook/dist-test/ut-report.xml 23✅ 15s
packages/@o3r/styling/dist-test/ut-report.xml 32✅ 41s

✅ apps/showcase/dist-test/ut-report.xml

25 tests were completed in 54s with 25 passed, 0 failed and 0 skipped.

Test suite Passed Failed Skipped Time
AppComponent 1✅ 2s
BasicPresComponent 1✅ 1s
ComponentReplacementComponent 1✅ 3s
ComponentReplacementPresComponent 1✅ 2s
ConfigurationComponent 1✅ 5s
ConfigurationPresComponent 1✅ 1s
CopyTextPresComponent 1✅ 612ms
DatePickerHebrewInputPresComponent 1✅ 1s
DatePickerInputPresComponent 1✅ 1s
DesignTokenComponent 1✅ 2s
DesignTokenPresComponent 1✅ 1s
DynamicContentComponent 1✅ 2s
DynamicContentPresComponent 1✅ 1s
HomeComponent 1✅ 2s
InPageNavPresComponent 1✅ 1s
LocalizationComponent 1✅ 7s
LocalizationPresComponent 1✅ 17s
OtterPickerPresComponent 1✅ 1s
RulesEngineComponent 1✅ 25s
RulesEnginePresComponent 1✅ 19s
RunAppLocallyComponent 1✅ 2s
ScrollBackTopPresComponent 1✅ 660ms
SdkComponent 1✅ 2s
SdkPresComponent 1✅ 2s
SidenavPresComponent 1✅ 1s

✅ AppComponent

AppComponent should create the app
  ✅ AppComponent should create the app

✅ BasicPresComponent

BasicPresComponent should create
  ✅ BasicPresComponent should create

✅ ComponentReplacementComponent

ComponentReplacementComponent should create
  ✅ ComponentReplacementComponent should create

✅ ComponentReplacementPresComponent

ComponentReplacementPresComponent should create
  ✅ ComponentReplacementPresComponent should create

✅ ConfigurationComponent

ConfigurationComponent should create
  ✅ ConfigurationComponent should create

✅ ConfigurationPresComponent

ConfigurationPresComponent should create
  ✅ ConfigurationPresComponent should create

✅ CopyTextPresComponent

CopyTextPresComponent should create
  ✅ CopyTextPresComponent should create

✅ DatePickerHebrewInputPresComponent

DatePickerHebrewInputPresComponent should create
  ✅ DatePickerHebrewInputPresComponent should create

✅ DatePickerInputPresComponent

DatePickerInputPresComponent should create
  ✅ DatePickerInputPresComponent should create

✅ DesignTokenComponent

DesignTokenComponent should create
  ✅ DesignTokenComponent should create

✅ DesignTokenPresComponent

DesignTokenPresComponent should create
  ✅ DesignTokenPresComponent should create

✅ DynamicContentComponent

DynamicContentComponent should create
  ✅ DynamicContentComponent should create

✅ DynamicContentPresComponent

DynamicContentPresComponent should create
  ✅ DynamicContentPresComponent should create

✅ HomeComponent

HomeComponent should create
  ✅ HomeComponent should create

✅ InPageNavPresComponent

InPageNavPresComponent should create
  ✅ InPageNavPresComponent should create

✅ LocalizationComponent

LocalizationComponent should create
  ✅ LocalizationComponent should create

✅ LocalizationPresComponent

LocalizationPresComponent should create
  ✅ LocalizationPresComponent should create

✅ OtterPickerPresComponent

OtterPickerPresComponent should create
  ✅ OtterPickerPresComponent should create

✅ RulesEngineComponent

RulesEngineComponent should create
  ✅ RulesEngineComponent should create

✅ RulesEnginePresComponent

RulesEnginePresComponent should create
  ✅ RulesEnginePresComponent should create

✅ RunAppLocallyComponent

RunAppLocallyComponent should create
  ✅ RunAppLocallyComponent should create

✅ ScrollBackTopPresComponent

ScrollBackTopPresComponent should create
  ✅ ScrollBackTopPresComponent should create

✅ SdkComponent

SdkComponent should create
  ✅ SdkComponent should create

✅ SdkPresComponent

SdkPresComponent should create
  ✅ SdkPresComponent should create

✅ SidenavPresComponent

SidenavPresComponent should create
  ✅ SidenavPresComponent should create

✅ packages/@o3r/design/dist-test/ut-report.xml

39 tests were completed in 24s with 39 passed, 0 failed and 0 skipped.

Test suite Passed Failed Skipped Time
Add Design Token to component 3✅ 21s
Design Token generator 6✅ 10s
Design Token Parser 5✅ 2s
Design Token Renderer 4✅ 290ms
Extract Token schematic 2✅ 17s
getCssStyleContentUpdater 3✅ 254ms
getCssTokenValueRenderer 4✅ 4s
getMetadataStyleContentUpdater 1✅ 264ms
getMetadataTokenDefinitionRenderer 2✅ 580ms
getMetadataTokenDefinitionRenderer 2✅ 577ms
getMetadataTokenValueRenderer 2✅ 282ms
getSassTokenDefinitionRenderer 2✅ 282ms
isO3rPrivateVariable 3✅ 2s

✅ Add Design Token to component

Add Design Token to component should create the design token file
  ✅ Add Design Token to component should create the design token file
Add Design Token to component should create the design token file and target styling file
  ✅ Add Design Token to component should create the design token file and target styling file
Add Design Token to component should create the design token file with correct name
  ✅ Add Design Token to component should create the design token file with correct name

✅ Design Token generator

Design Token generator CSS renderer should render variable in CSS
  ✅ Design Token generator CSS renderer should render variable in CSS
Design Token generator CSS renderer should render variable with important flag
  ✅ Design Token generator CSS renderer should render variable with important flag
Design Token generator CSS renderer should render variable with prefix
  ✅ Design Token generator CSS renderer should render variable with prefix
Design Token generator CSS renderer should render variable in existing CSS
  ✅ Design Token generator CSS renderer should render variable in existing CSS
Design Token generator CSS renderer should render private variable to sass if requested
  ✅ Design Token generator CSS renderer should render private variable to sass if requested
Design Token generator Metadata Renderer should render valid metadata
  ✅ Design Token generator Metadata Renderer should render valid metadata

✅ Design Token Parser

Design Token Parser parseDesignToken generate a simple type variable
  ✅ Design Token Parser parseDesignToken generate a simple type variable
Design Token Parser parseDesignToken generate an alias variable
  ✅ Design Token Parser parseDesignToken generate an alias variable
Design Token Parser parseDesignToken generate a complex variable
  ✅ Design Token Parser parseDesignToken generate a complex variable
Design Token Parser parseDesignTokenFile should read the file according to the reader
  ✅ Design Token Parser parseDesignTokenFile should read the file according to the reader
Design Token Parser parseDesignTokenFile should throw if invalid JSON Token
  ✅ Design Token Parser parseDesignTokenFile should throw if invalid JSON Token

✅ Design Token Renderer

Design Token Renderer computeFileToUpdatePath should return default file if not specified
  ✅ Design Token Renderer computeFileToUpdatePath should return default file if not specified
Design Token Renderer computeFileToUpdatePath should return file specified by the token
  ✅ Design Token Renderer computeFileToUpdatePath should return file specified by the token
Design Token Renderer renderDesignTokens should call the process for all variables
  ✅ Design Token Renderer renderDesignTokens should call the process for all variables
Design Token Renderer renderDesignTokens should update all the files
  ✅ Design Token Renderer renderDesignTokens should update all the files

✅ Extract Token schematic

Extract Token schematic should correctly extract the Design Token
  ✅ Extract Token schematic should correctly extract the Design Token
Extract Token schematic should Update the original file
  ✅ Extract Token schematic should Update the original file

✅ getCssStyleContentUpdater

getCssStyleContentUpdater should render CSS Values
  ✅ getCssStyleContentUpdater should render CSS Values
getCssStyleContentUpdater should add tags to new file
  ✅ getCssStyleContentUpdater should add tags to new file
getCssStyleContentUpdater should only update within tag part
  ✅ getCssStyleContentUpdater should only update within tag part

✅ getCssTokenValueRenderer

getCssTokenValueRenderer should render valid CSS value
  ✅ getCssTokenValueRenderer should render valid CSS value
getCssTokenValueRenderer should render valid CSS var
  ✅ getCssTokenValueRenderer should render valid CSS var
getCssTokenValueRenderer should render valid CSS var of not print value
  ✅ getCssTokenValueRenderer should render valid CSS var of not print value
getCssTokenValueRenderer should render invalid reference and raise warning
  ✅ getCssTokenValueRenderer should render invalid reference and raise warning

✅ getMetadataStyleContentUpdater

getMetadataStyleContentUpdater should render valid JSON object
  ✅ getMetadataStyleContentUpdater should render valid JSON object

✅ getMetadataTokenDefinitionRenderer

getMetadataTokenDefinitionRenderer should rely on given tokenValueRenderer
  ✅ getMetadataTokenDefinitionRenderer should rely on given tokenValueRenderer
getMetadataTokenDefinitionRenderer should render valid JSON object
  ✅ getMetadataTokenDefinitionRenderer should render valid JSON object

✅ getMetadataTokenDefinitionRenderer

getMetadataTokenDefinitionRenderer should rely on given tokenValueRenderer
  ✅ getMetadataTokenDefinitionRenderer should rely on given tokenValueRenderer
getMetadataTokenDefinitionRenderer should use private renderer for private variable
  ✅ getMetadataTokenDefinitionRenderer should use private renderer for private variable

✅ getMetadataTokenValueRenderer

getMetadataTokenValueRenderer should rely on given cssValueRenderer
  ✅ getMetadataTokenValueRenderer should rely on given cssValueRenderer
getMetadataTokenValueRenderer should render valid JSON object
  ✅ getMetadataTokenValueRenderer should render valid JSON object

✅ getSassTokenDefinitionRenderer

getSassTokenDefinitionRenderer should rely on given tokenValueRenderer
  ✅ getSassTokenDefinitionRenderer should rely on given tokenValueRenderer
getSassTokenDefinitionRenderer should prefix private variable
  ✅ getSassTokenDefinitionRenderer should prefix private variable

✅ isO3rPrivateVariable

isO3rPrivateVariable should determine the variable as ignored
  ✅ isO3rPrivateVariable should determine the variable as ignored
isO3rPrivateVariable should determine the variable as not ignored
  ✅ isO3rPrivateVariable should determine the variable as not ignored
isO3rPrivateVariable should determine the alias variable as not ignored
  ✅ isO3rPrivateVariable should determine the alias variable as not ignored

✅ packages/@o3r/storybook/dist-test/ut-report.xml

23 tests were completed in 15s with 23 passed, 0 failed and 0 skipped.

Test suite Passed Failed Skipped Time
Configuration Metadata setup 5✅ 9s
generateThemeCss 2✅ 979ms
generateThemeCss 2✅ 3s
Localization Metadata setup 4✅ 11s
Styling Metadata setup 10✅ 10s

✅ Configuration Metadata setup

Configuration Metadata setup should register the metadata
  ✅ Configuration Metadata setup should register the metadata
Configuration Metadata setup should retrieve the metadata
  ✅ Configuration Metadata setup should retrieve the metadata
Configuration helper extractConfiguration should extract description from metadata
  ✅ Configuration helper extractConfiguration should extract description from metadata
Configuration helper retrieveConfigFromProps should extract only config properties
  ✅ Configuration helper retrieveConfigFromProps should extract only config properties
Configuration helper retrieveConfigFromProps should return empty object if no config property found
  ✅ Configuration helper retrieveConfigFromProps should return empty object if no config property found

✅ generateThemeCss

generateThemeCss should generate a css file
  ✅ generateThemeCss should generate a css file
generateThemeCss should generate a css file from diff
  ✅ generateThemeCss should generate a css file from diff

✅ generateThemeCss

generateThemeCss should generate a css file
  ✅ generateThemeCss should generate a css file
generateThemeCss should generate a css file from diff
  ✅ generateThemeCss should generate a css file from diff

✅ Localization Metadata setup

Localization Metadata setup should register the metadata
  ✅ Localization Metadata setup should register the metadata
Localization Metadata setup should retrieve the metadata
  ✅ Localization Metadata setup should retrieve the metadata
Localization helper extractLocalization should extract description from metadata
  ✅ Localization helper extractLocalization should extract description from metadata
Localization helper getLocalizations should extract key/value from metadata
  ✅ Localization helper getLocalizations should extract key/value from metadata

✅ Styling Metadata setup

Styling Metadata setup should register the metadata
  ✅ Styling Metadata setup should register the metadata
Styling Metadata setup should retrieve the metadata
  ✅ Styling Metadata setup should retrieve the metadata
Styling Helpers setCssVariable should create a new style element
  ✅ Styling Helpers setCssVariable should create a new style element
Styling Helpers setCssVariable should edit an existing variable
  ✅ Styling Helpers setCssVariable should edit an existing variable
Styling Helpers getTypeAndValue should return a color editor for color
  ✅ Styling Helpers getTypeAndValue should return a color editor for color
Styling Helpers getTypeAndValue should return a text editor for color
  ✅ Styling Helpers getTypeAndValue should return a text editor for color
Styling Helpers extractStyling should extract component variable
  ✅ Styling Helpers extractStyling should extract component variable
Styling Helpers extractStyling should not extract incorrect variable
  ✅ Styling Helpers extractStyling should not extract incorrect variable
Styling Helpers extractStyling should return the final value of the referenced variable
  ✅ Styling Helpers extractStyling should return the final value of the referenced variable
Styling Helpers getThemeVariables should extract theme variable only
  ✅ Styling Helpers getThemeVariables should extract theme variable only

✅ packages/@o3r/styling/dist-test/ut-report.xml

32 tests were completed in 41s with 32 passed, 0 failed and 0 skipped.

Test suite Passed Failed Skipped Time
Add Theming 2✅ 19s
CSS Variable extractor 2✅ 12s
Styling Extractor Builder 1✅ 19s
Theming functions 2✅ 9s
Theming functions 2✅ 981ms
Theming mixins 3✅ 10s
Theming mixins 3✅ 796ms
undefined 1✅ 69ms
Update Styling imports 1✅ 2s
Update v10 7✅ 5s
Utils function 4✅ 9s
Utils function 4✅ 821ms

✅ Add Theming

Add Theming should create the theming file and update the style file
  ✅ Add Theming should create the theming file and update the style file
Add Theming should throw if we add theming to a component that already has it
  ✅ Add Theming should throw if we add theming to a component that already has it

✅ CSS Variable extractor

CSS Variable extractor Sass file content parsing should correctly extract variable details
  ✅ CSS Variable extractor Sass file content parsing should correctly extract variable details
CSS Variable extractor Sass file content parsing should override variable details
  ✅ CSS Variable extractor Sass file content parsing should override variable details

✅ Styling Extractor Builder

Styling Extractor Builder should extract css variables
  ✅ Styling Extractor Builder should extract css variables

✅ Theming functions

Theming functions var should define new variable
  ✅ Theming functions var should define new variable
Theming functions var should define new complex variable
  ✅ Theming functions var should define new complex variable

✅ Theming functions

Theming functions var should define new variable
  ✅ Theming functions var should define new variable
Theming functions var should define new complex variable
  ✅ Theming functions var should define new complex variable

✅ Theming mixins

Theming mixins var should define new variable
  ✅ Theming mixins var should define new variable
Theming mixins var should override previous metadata
  ✅ Theming mixins var should override previous metadata
Theming mixins var should not generate null variable
  ✅ Theming mixins var should not generate null variable

✅ Theming mixins

Theming mixins var should define new variable
  ✅ Theming mixins var should define new variable
Theming mixins var should override previous metadata
  ✅ Theming mixins var should override previous metadata
Theming mixins var should not generate null variable
  ✅ Theming mixins var should not generate null variable

✅ undefined

 should be removed as soon as we have one test in this package
  ✅ should be removed as soon as we have one test in this package

✅ Update Styling imports

Update Styling imports should update otter imports and scoped functions/variables in scss files
  ✅ Update Styling imports should update otter imports and scoped functions/variables in scss files

✅ Update v10

Update v10 Update SCSS Import should not update a TS file
  ✅ Update v10 Update SCSS Import should not update a TS file
Update v10 Update SCSS Import should not update a file without Otter dependency
  ✅ Update v10 Update SCSS Import should not update a file without Otter dependency
Update v10 Update SCSS Import should not update a file with Otter import with theme function only
  ✅ Update v10 Update SCSS Import should not update a file with Otter import with theme function only
Update v10 Update SCSS Import should update a file with Otter theme usage
  ✅ Update v10 Update SCSS Import should update a file with Otter theme usage
Update v10 Update SCSS Import should update a file with Otter theme usage with non-standard alias
  ✅ Update v10 Update SCSS Import should update a file with Otter theme usage with non-standard alias
Update v10 Update SCSS Import should update a file with Otter theme usage and clean previous dep
  ✅ Update v10 Update SCSS Import should update a file with Otter theme usage and clean previous dep
Update v10 Update SCSS Import should update a file with Otter theme usage without removing the import to the previous dep
  ✅ Update v10 Update SCSS Import should update a file with Otter theme usage without removing the import to the previous dep

✅ Utils function

Utils function multi-map-merge should merge the list of map into one map
  ✅ Utils function multi-map-merge should merge the list of map into one map
Utils function multi-map-merge should return empty if called without arguments
  ✅ Utils function multi-map-merge should return empty if called without arguments
Utils function get-mandatory should return the requested key value
  ✅ Utils function get-mandatory should return the requested key value
Utils function get-mandatory should fail if the key is no included in the map
  ✅ Utils function get-mandatory should fail if the key is no included in the map

✅ Utils function

Utils function multi-map-merge should merge the list of map into one map
  ✅ Utils function multi-map-merge should merge the list of map into one map
Utils function multi-map-merge should return empty if called without arguments
  ✅ Utils function multi-map-merge should return empty if called without arguments
Utils function get-mandatory should return the requested key value
  ✅ Utils function get-mandatory should return the requested key value
Utils function get-mandatory should fail if the key is no included in the map
  ✅ Utils function get-mandatory should fail if the key is no included in the map