import { describe, it, expect } from 'vitest';
import { readFileSync } from 'fs';
import { resolve } from 'path';

describe('CollaborativeEditor styles', () => {
  it('uses design system color variables for cursor labels', () => {
    const cssPath = resolve(
      __dirname,
      '../../../../../packages/documents/src/components/CollaborativeEditor.module.css'
    );
    const contents = readFileSync(cssPath, 'utf8');

    // The collaboration cursor label class was renamed from
    // `.collaboration-cursor__label` to `.collaboration-caret__label` and now
    // uses the design-system `--color-text-*` token scale rather than the
    // legacy 0/900 endpoints.
    expect(contents).toContain('.collaboration-caret__label');
    expect(contents).toContain('--color-text-');
  });
});
