// Auto-generated by: pnpm test:stylesheets:update import { join } from 'node:path'; import { compileLessWithTokens } from '../../../scripts/testStylesheets/compileLessWithTokens'; import { DEFAULT_LESS_PRELUDES, DEFAULT_TOKEN_CSS_FILES } from '../../../scripts/testStylesheets/config'; describe('components/Loader/Loader.less stylesheet snapshot', () => { it('compiled CSS with tokens inlined', async () => { const css = await compileLessWithTokens(join(__dirname, 'Loader.less'), DEFAULT_TOKEN_CSS_FILES, { lessPreludes: DEFAULT_LESS_PRELUDES, }); expect(css).toMatchTokensInlineSnapshot(` .loader, .shoptet-icon.loader.loader { --loader-size: 20px; display: inline-flex; align-items: center; justify-content: center; width: var(--loader-size); height: var(--loader-size); vertical-align: middle; } .loader::before, .shoptet-icon.loader.loader::before { content: ''; display: inline-block; width: calc(var(--loader-size) - 4px); height: calc(var(--loader-size) - 4px); border: 2px solid oklch(0.8749 0.0739 232.8465); border-top-color: oklch(0.7247 0.1478 233.0429); border-radius: 50%; animation: loader-animation 0.6s linear infinite; } .loader--sm { --loader-size: 16px; } .loader--md { --loader-size: 24px; } .loader--lg { --loader-size: 48px; } .loaderArea--screen { position: fixed; z-index: 12000; top: 0; left: 0; width: 100%; height: 100%; text-align: center; background: oklch(1 0 none / 0.3); } .loaderArea--screen .loader { position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%); } .table__cell--actions { position: relative; min-width: 48px; } /* the .loader dimensions mimics \`shp-visible\` icon button, because currently the icon button is not correcly aligned inside the boundary box */ .shoptet-icon.loader.loader { --loader-size: 24px; } .shoptet-icon.loader.loader::before { position: unset; transform: unset; background: none; } @keyframes loader-animation { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } } /* All loaders in Smarty world are hidden by default, but mostly living in DOM */ .loaderArea.hidden, .loader.hidden { display: none; } `); }); });