5180 fichiers 38.5 Mo 0 téléchargements 202 vues mis à jour il y a 5 heures ui
nitro-v36-with-renderer-v36 / src / css / user-profile / UserProfileAirText.test.ts
UserProfileAirText.test.ts 1.9 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/user-profile/UserProfileView.css'), 'utf8');

describe('user profile text (new_extended_profile)', () => {
    it('is regular Ubuntu with a 12 px bold friend status and a bold hidden-profile notice', () => {
        expect(css).toMatch(/\.octane-extended-profile-window :where\(\*\):not\(svg, svg \*\) \{[^}]*HabboAirUbuntu/);
        expect(css).toMatch(/\.octane-extended-profile__status-text \{[^}]*font-size: 12px/);
        expect(css).toMatch(/\.octane-extended-profile__hidden-notice \{[^}]*font-weight: 700/);
    });

    it('scrolls a long group list inside the panel', () => {
        expect(css).toMatch(/\.octane-extended-profile-groups \{[^}]*grid-template-rows: minmax\(0, 1fr\)/);
        expect(css).toMatch(/\.octane-extended-profile-groups__sidebar \{[^}]*min-height: 0/);
        expect(css).toMatch(/\.octane-extended-profile-groups__list \{[^}]*min-height: 0;[^}]*overflow-y: auto/);
    });

    it('draws addasfriend_button as the grey shiny button with 12 px regular black text', () => {
        expect(css).toMatch(/\*\/\s*\.octane-extended-profile__friend-button \{[^}]*border-image-source: var\(--habbo-skin-shiny\);[^}]*border-radius: 0;[^}]*color: #000000;[^}]*font-size: 12px;[^}]*font-weight: 400;/);
    });

    it('draws the body texts pure black like the layout (status, motto, relationships, rooms, groups)', () => {
        for (const sel of ['__motto', '__meta', '__status-text', '__relationships-label', '__relationship-name', '__summary-button']) {
            expect(css).toMatch(new RegExp(`\\.octane-extended-profile${sel} \\{[^}]*color: #000000;`));
        }
        expect(css).toMatch(/\.octane-extended-profile-group-info__description \{[^}]*color: #000000;/);
        expect(css).toMatch(/\.octane-extended-profile__hidden-notice \{[^}]*color: #555/);
    });
});

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