5180 fichiers 38.5 Mo 0 téléchargements 242 vues mis à jour il y a 5 heures ui
nitro-v36-with-renderer-v36 / src / css / hc-center / HcCenterAirText.test.ts
HcCenterAirText.test.ts 2.2 Ko Télécharger le fichier
import { readFileSync } from 'node:fs';
import { join } from 'node:path';
import { describe, expect, it } from 'vitest';

const css = readFileSync(join(process.cwd(), 'src/css/hc-center/HcCenterView.css'), 'utf8');
const view = readFileSync(join(process.cwd(), 'src/components/hc-center/HcCenterView.tsx'), 'utf8');

describe('HC center text (hc_center)', () => {
    it('is regular Ubuntu on its own window class', () => {
        expect(view).toContain('octane-hc-center-window');
        expect(view).toContain("import '../../css/hc-center/HcCenterView.css'");
        expect(css).toMatch(/\.octane-hc-center-window :where\(\*\):not\(svg, svg \*\) \{[^}]*HabboAirUbuntu, UbuntuRegular/);
    });

    it('uses the AIR sizes and colours', () => {
        expect(css).toMatch(/\.octane-hc-center__status-title \{[^}]*font-size: 12px;[^}]*font-weight: 700/);
        expect(css).toMatch(/\.octane-hc-center__title \{[^}]*font-size: 16px;[^}]*font-weight: 700/);
        expect(css).toMatch(/\.octane-hc-center__title--blue \{[^}]*color: #4a8eb1/);
        expect(css).toMatch(/\.octane-hc-center__postit-content \{[^}]*color: #683203;[^}]*font-size: 16px;[^}]*font-weight: 400/);
        expect(css).toMatch(/\.octane-hc-center__link--blue \{[^}]*color: #4a8eb1/);
    });

    it('tints btn_buy 0x54c32e and btn_gift 0x3399cc as AIR, with white bold captions', () => {
        expect(view).toContain('octane-hc-center__buy');
        expect(view).toContain('octane-hc-center__gifts');
        expect(css).toMatch(
            /@layer base \{[\s\S]*\.octane-hc-center__buy\.habbo-btn-primary \{\s*border-image-source: var\(--habbo-skin-shiny-thick-tint-54c32e\) !important;/
        );
        expect(css).toMatch(/\.octane-hc-center__gifts\.habbo-btn-primary \{\s*border-image-source: var\(--habbo-skin-shiny-thick-tint-3399cc\) !important;/);
        expect(css).toMatch(/\.octane-hc-center__gifts\.habbo-btn-primary:hover \{\s*border-image-source: var\(--habbo-skin-shiny-thick-tint-3399cc-hover\)/);
        expect(css).toMatch(
            /:where\(\.octane-hc-center__buy, \.octane-hc-center__gifts\)\.habbo-btn-primary \{[^}]*color: #ffffff !important;[^}]*font-size: 12px !important;[^}]*font-weight: 700 !important/
        );
    });
});
15Sujets
1Dépôts
20Membres
2En ligne
Profile
Inscrit
Dernière visite
Messages
0
Votes positifs
0
Votes négatifs
0

Nous utilisons des cookies pour assurer le bon fonctionnement du site et améliorer votre expérience. en savoir plus

Autoriser