Files
superport/test/integration/automated/equipment_test_runner.dart
JiWoong Sul 49b203d366
Some checks failed
Flutter Test & Quality Check / Test on macos-latest (push) Has been cancelled
Flutter Test & Quality Check / Test on ubuntu-latest (push) Has been cancelled
Flutter Test & Quality Check / Build APK (push) Has been cancelled
feat(ui): full‑width ShadTable across app; fix rent dialog width; correct equipment pagination
- ShadTable: ensure full-width via LayoutBuilder+ConstrainedBox minWidth
- BaseListScreen: default data area padding = 0 for table edge-to-edge
- Vendor/Model/User/Company/Inventory/Zipcode: set columnSpanExtent per column
  and add final filler column to absorb remaining width; pin date/status/actions
  widths; ensure date text is single-line
- Equipment: unify card/border style; define fixed column widths + filler;
  increase checkbox column to 56px to avoid overflow
- Rent list: migrate to ShadTable.list with fixed widths + filler column
- Rent form dialog: prevent infinite width by bounding ShadProgress with
  SizedBox and remove Expanded from option rows; add safe selectedOptionBuilder
- Admin list: fix const with non-const argument in table column extents
- Services/Controller: remove hardcoded perPage=10; use BaseListController
  perPage; trust server meta (total/totalPages) in equipment pagination
- widgets/shad_table: ConstrainedBox(minWidth=viewport) so table stretches

Run: flutter analyze → 0 errors (warnings remain).
2025-09-09 22:38:08 +09:00

80 lines
2.9 KiB
Dart

import 'package:test/test.dart';
// import 'screens/equipment/equipment_in_full_test.dart'; // 파일 삭제됨
/// 장비 테스트 실행기
const bool RUN_EXTERNAL_TESTS = bool.fromEnvironment('RUN_EXTERNAL_TESTS');
void main() {
if (!RUN_EXTERNAL_TESTS) {
test('External tests disabled', () {}, skip: 'Enable with --dart-define=RUN_EXTERNAL_TESTS=true');
return;
}
group('장비 화면 자동 테스트', () {
setUpAll(() async {
// 테스트 시작
});
tearDownAll(() async {
// 테스트 종료
});
test('장비 화면 전체 기능 테스트', skip: 'EquipmentInFullTest 파일 삭제됨', () async {
// final equipmentTest = EquipmentInFullTest();
// final results = await equipmentTest.runAllTests();
// 테스트 결과 요약
// 전체 테스트: ${results['totalTests']}개
// 성공: ${results['passedTests']}개
// 실패: ${results['failedTests']}개
// 상세 결과 출력
// final tests = results['tests'] as List;
// for (final testResult in tests) {
// // Process test results
// if (!testResult['passed'] && testResult['error'] != null) {
// // 에러: ${testResult['error']}
// }
// }
// 리포트 생성
// final autoTestSystem = equipmentTest.autoTestSystem;
// final reportCollector = autoTestSystem.reportCollector;
// HTML 리포트 생성
// try {
// final htmlReport = await reportCollector.generateHtmlReport();
// final htmlFile = File('test_reports/equipment_test_report.html');
// await htmlFile.parent.create(recursive: true);
// await htmlFile.writeAsString(htmlReport);
// // HTML 리포트 생성: ${htmlFile.path}
// } catch (e) {
// // HTML 리포트 생성 실패: $e
// }
// Markdown 리포트 생성
// try {
// final mdReport = await reportCollector.generateMarkdownReport();
// final mdFile = File('test_reports/equipment_test_report.md');
// await mdFile.writeAsString(mdReport);
// // Markdown 리포트 생성: ${mdFile.path}
// } catch (e) {
// // Markdown 리포트 생성 실패: $e
// }
// JSON 리포트 생성
// try {
// final jsonReport = await reportCollector.generateJsonReport();
// final jsonFile = File('test_reports/equipment_test_report.json');
// await jsonFile.writeAsString(jsonReport);
// // JSON 리포트 생성: ${jsonFile.path}
// } catch (e) {
// // JSON 리포트 생성 실패: $e
// }
// 실패한 테스트가 있으면 테스트 실패
// expect(results['failedTests'], equals(0),
// reason: '${results['failedTests']}개의 테스트가 실패했습니다.');
}, timeout: Timeout(Duration(minutes: 10)));
});
}