generated from ttipo/project-base
fix(flutter): 대구 밖 현재 위치는 대구 도심으로 대신하고 안내함
CI (Flutter) / Flutter (analyze · test) (pull_request) Successful in 21m51s
CI / Backend (lint · test · e2e · build) (pull_request) Successful in 12m40s
CI / Frontend (lint · type-check · test) (pull_request) Successful in 22m59s
CI / 에러 코드 SSOT 동기화 검사 (pull_request) Successful in 11m23s
CI (Flutter) / Flutter (analyze · test) (pull_request) Successful in 21m51s
CI / Backend (lint · test · e2e · build) (pull_request) Successful in 12m40s
CI / Frontend (lint · type-check · test) (pull_request) Successful in 22m59s
CI / 에러 코드 SSOT 동기화 검사 (pull_request) Successful in 11m23s
현재 위치를 그대로 쓰면 대구 밖(서울 등)에서는 모든 칸이 "근처에 아직 없어요"로 비었다(2026-11-04 회귀 점검). 서비스 지역(대구, 군위 포함 — 백엔드 geo.ts 와 같은 영역) 밖이면 대구 도심을 기준으로 쓰고, 홈에서 "아직 대구 지역만 볼 수 있어요"를 한 번 알린다. 위치를 받지 못해 대신하는 경우도 지금까지는 기준만 조용히 바뀌었는데, 같은 방식으로 알린다. 대신한 이유는 BasePoint.fallback 에 남는다. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
import 'package:flutter_test/flutter_test.dart';
|
||||
import 'package:wandergo/features/location/domain/base_location.dart';
|
||||
|
||||
void main() {
|
||||
group('isInServiceArea', () {
|
||||
test('대구 동네·군위군·경산 경계는 서비스 지역 안이다', () {
|
||||
for (final n in Neighborhood.values) {
|
||||
expect(isInServiceArea(n.point), isTrue, reason: n.name);
|
||||
}
|
||||
expect(isInServiceArea((lat: 36.2427, lng: 128.5728)), isTrue); // 군위군청
|
||||
expect(isInServiceArea((lat: 35.8251, lng: 128.7415)), isTrue); // 경산시청
|
||||
});
|
||||
|
||||
test('서울·부산·포항은 서비스 지역 밖이다', () {
|
||||
expect(isInServiceArea((lat: 37.5663, lng: 126.9779)), isFalse);
|
||||
expect(isInServiceArea((lat: 35.1796, lng: 129.0756)), isFalse);
|
||||
expect(isInServiceArea((lat: 36.0190, lng: 129.3435)), isFalse);
|
||||
});
|
||||
});
|
||||
}
|
||||
Reference in New Issue
Block a user