import 'package:flutter_test/flutter_test.dart'; import 'package:pipelines_app/features/artifacts/domain/artifact_preview_failure.dart'; void main() { test('fetch failures read as plain language, never raw errors', () { expect( artifactPreviewFailureMessage(), 'The preview could not be loaded. Check the connection and try again.', ); expect( artifactPreviewFailureMessage(status: 404), 'This file is no longer on the server.', ); expect( artifactPreviewFailureMessage(status: 403), 'The server did not allow this file to be opened.', ); expect( artifactPreviewFailureMessage(status: 502), 'The server could not send this file right now.', ); expect( artifactPreviewFailureMessage(status: 418), 'The preview could not be loaded (status 418).', ); }); }