arc/hesabixUI/hesabix_ui/test/pay_page_poster_url_test.dart
Babak Alizadeh 089fe7706d
Some checks failed
Flutter Windows / verify-windows (push) Has been cancelled
feat(pay-page): send locked pay links from dashboard and menu
Businesses can share a tokenized public link with an optional locked amount and SMS, shown only when the pay page is enabled. Admins can also set the public pay-link domain.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-11-07 15:12:44 +03:30

27 lines
776 B
Dart

import 'package:flutter_test/flutter_test.dart';
import 'package:hesabix_ui/pages/business/pay_page_poster_pdf.dart';
void main() {
test('poster display URL drops http(s) but keeps /u/ for typing', () {
expect(
payPagePosterDisplayUrl('https://hesabix.ir/u/hesabixacc'),
'hesabix.ir/u/hesabixacc',
);
expect(
payPagePosterDisplayUrl('http://hesabix.ir/u/shop-ali'),
'hesabix.ir/u/shop-ali',
);
expect(
payPagePosterDisplayUrl('HTTPS://hesabix.ir/u/shop-ali/'),
'hesabix.ir/u/shop-ali',
);
expect(
payPagePosterDisplayUrl('hesabix.ir/u/shop-ali'),
'hesabix.ir/u/shop-ali',
);
expect(
payPagePosterDisplayUrl('https://hesabix.ir/shop-ali'),
'hesabix.ir/shop-ali',
);
});
}