index.ts 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. /**
  2. * @d8d/e2e-test-utils
  3. *
  4. * E2E 测试工具集 - 专门用于测试 Radix UI 组件的 Playwright 工具函数
  5. *
  6. * @packageDocumentation
  7. *
  8. * @module @d8d/e2e-test-utils
  9. *
  10. * @description
  11. * 此包提供了一套强大且易于使用的 E2E 测试工具函数,
  12. * 专门针对 Radix UI 无障碍组件进行优化。
  13. *
  14. * @example
  15. * ```typescript
  16. * import { BaseOptions, E2ETestError, DEFAULT_TIMEOUTS } from '@d8d/e2e-test-utils';
  17. *
  18. * // 使用类型定义
  19. * const options: BaseOptions = {
  20. * timeout: DEFAULT_TIMEOUTS.static
  21. * };
  22. *
  23. * // 使用错误类
  24. * throw new E2ETestError({
  25. * operation: 'selectOption',
  26. * target: 'dropdown',
  27. * suggestion: '检查选择器是否正确'
  28. * });
  29. * ```
  30. *
  31. * @see {@link https://github.com/your-org/e2e-test-utils#readme|完整文档}
  32. *
  33. * @author 多八多云端开发团队
  34. * @version 1.0.0
  35. * @license MIT
  36. */
  37. // 导出类型定义
  38. export * from './types';
  39. // 导出错误类
  40. export * from './errors';
  41. // 导出常量
  42. export * from './constants';
  43. // Radix UI Select 工具
  44. export {
  45. selectRadixOption,
  46. selectRadixOptionAsync
  47. } from './radix-select';
  48. // 省市区级联选择工具
  49. export {
  50. selectCascade,
  51. selectProvinceCity,
  52. type CascadeSelectOptions
  53. } from './cascade-select';
  54. // 文件上传工具
  55. export {
  56. uploadFileToField
  57. } from './file-upload';