5180 fichiers 38.5 Mo 0 téléchargements 297 vues mis à jour il y a 6 heures ui
nitro-v36-with-renderer-v36 / src / components / navigator / views / tagSearchLink.test.ts
tagSearchLink.test.ts 892 o Télécharger le fichier
import { readFileSync } from 'node:fs';
import { join } from 'node:path';
import { describe, expect, it } from 'vitest';

// A tag click goes through the navigator/tag link only: the navigator store then runs the one search. A second,
// direct NavigatorSearchComposer with another filter raced it and the results of either could win.
describe('tag clicks', () => {
    const files = [
        join(__dirname, 'NavigatorRoomInfoView.tsx'),
        join(__dirname, '../../room/widgets/avatar-info/infostand/InfoStandWidgetUserTagsView.tsx')
    ];

    it.each(files)('%s opens the tag link and sends no search of its own', (file) => {
        const source = readFileSync(file, 'utf8');

        expect(source).toContain('CreateLinkEvent(`navigator/tag/');
        expect(source).not.toContain('NavigatorSearchComposer');
        expect(source).not.toContain('navigator/search/');
    });
});
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