import { describe, expect, it } from 'vitest';

import { formatStageSkipReason, getPlaceholderMessage } from '@/pages/searchResultsMessages';

describe('searchResultsMessages', () => {
  it('renders captcha interception placeholders as user-friendly text', () => {
    expect(getPlaceholderMessage('captcha_intercept')).toBe('历史记录：1688 滑块验证未通过，当时已跳过当前阶段');
  });

  it('keeps historical round_failed values readable', () => {
    expect(getPlaceholderMessage('round_failed')).toBe('当前阶段执行失败，已跳过');
    expect(formatStageSkipReason('round_failed')).toBe('当前阶段执行失败，已跳过');
  });
});