forked from baron/baron-sso
테스트 오류 수정
This commit is contained in:
@@ -30,7 +30,7 @@ test.describe("Tenants Management", () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
test("should list tenants", async ({ page }) => {
|
test("should list tenants", async ({ page }) => {
|
||||||
await page.route("**/api/v1/admin/tenants*", async (route) => {
|
await page.route("**/api/v1/admin/tenants**", async (route) => {
|
||||||
await route.fulfill({
|
await route.fulfill({
|
||||||
json: {
|
json: {
|
||||||
items: [
|
items: [
|
||||||
@@ -57,7 +57,7 @@ test.describe("Tenants Management", () => {
|
|||||||
|
|
||||||
test("should create a new tenant", async ({ page }) => {
|
test("should create a new tenant", async ({ page }) => {
|
||||||
// Mock GET for list (empty) and for parents
|
// Mock GET for list (empty) and for parents
|
||||||
await page.route("**/api/v1/admin/tenants*", async (route) => {
|
await page.route("**/api/v1/admin/tenants**", async (route) => {
|
||||||
if (route.request().method() === "GET") {
|
if (route.request().method() === "GET") {
|
||||||
await route.fulfill({
|
await route.fulfill({
|
||||||
json: { items: [], total: 0, limit: 100, offset: 0 },
|
json: { items: [], total: 0, limit: 100, offset: 0 },
|
||||||
@@ -120,7 +120,7 @@ test.describe("Tenants Management", () => {
|
|||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
await page.route("**/api/v1/admin/tenants*", async (route) => {
|
await page.route("**/api/v1/admin/tenants**", async (route) => {
|
||||||
await route.fulfill({
|
await route.fulfill({
|
||||||
json: {
|
json: {
|
||||||
items: mockTenants,
|
items: mockTenants,
|
||||||
|
|||||||
@@ -86,8 +86,11 @@ class _ProfilePageState extends ConsumerState<ProfilePage> {
|
|||||||
void _onNameFocusChange() {
|
void _onNameFocusChange() {
|
||||||
if (!mounted) return;
|
if (!mounted) return;
|
||||||
if (!_nameFocus.hasFocus && _nameTouched) {
|
if (!_nameFocus.hasFocus && _nameTouched) {
|
||||||
final profile = ref.read(profileProvider).value ?? _cachedProfile;
|
Future.microtask(() {
|
||||||
if (profile != null) _autoSaveIfEditing(profile, 'name');
|
if (!mounted) return;
|
||||||
|
final profile = ref.read(profileProvider).value ?? _cachedProfile;
|
||||||
|
if (profile != null) _autoSaveIfEditing(profile, 'name');
|
||||||
|
});
|
||||||
} else if (_nameFocus.hasFocus) {
|
} else if (_nameFocus.hasFocus) {
|
||||||
_nameTouched = true;
|
_nameTouched = true;
|
||||||
}
|
}
|
||||||
@@ -101,8 +104,11 @@ class _ProfilePageState extends ConsumerState<ProfilePage> {
|
|||||||
hasFocus: _departmentFocus.hasFocus,
|
hasFocus: _departmentFocus.hasFocus,
|
||||||
);
|
);
|
||||||
if (!_departmentFocus.hasFocus && _departmentTouched) {
|
if (!_departmentFocus.hasFocus && _departmentTouched) {
|
||||||
final profile = ref.read(profileProvider).value ?? _cachedProfile;
|
Future.microtask(() {
|
||||||
if (profile != null) _autoSaveIfEditing(profile, 'department');
|
if (!mounted) return;
|
||||||
|
final profile = ref.read(profileProvider).value ?? _cachedProfile;
|
||||||
|
if (profile != null) _autoSaveIfEditing(profile, 'department');
|
||||||
|
});
|
||||||
} else if (_departmentFocus.hasFocus) {
|
} else if (_departmentFocus.hasFocus) {
|
||||||
_departmentTouched = true;
|
_departmentTouched = true;
|
||||||
}
|
}
|
||||||
@@ -111,8 +117,11 @@ class _ProfilePageState extends ConsumerState<ProfilePage> {
|
|||||||
void _onPhoneFocusChange() {
|
void _onPhoneFocusChange() {
|
||||||
if (!mounted) return;
|
if (!mounted) return;
|
||||||
if (!_phoneFocus.hasFocus && _phoneTouched) {
|
if (!_phoneFocus.hasFocus && _phoneTouched) {
|
||||||
final profile = ref.read(profileProvider).value ?? _cachedProfile;
|
Future.microtask(() {
|
||||||
if (profile != null) _handlePhoneFocusChange(profile);
|
if (!mounted) return;
|
||||||
|
final profile = ref.read(profileProvider).value ?? _cachedProfile;
|
||||||
|
if (profile != null) _handlePhoneFocusChange(profile);
|
||||||
|
});
|
||||||
} else if (_phoneFocus.hasFocus) {
|
} else if (_phoneFocus.hasFocus) {
|
||||||
_phoneTouched = true;
|
_phoneTouched = true;
|
||||||
}
|
}
|
||||||
@@ -121,8 +130,11 @@ class _ProfilePageState extends ConsumerState<ProfilePage> {
|
|||||||
void _onPhoneCodeFocusChange() {
|
void _onPhoneCodeFocusChange() {
|
||||||
if (!mounted) return;
|
if (!mounted) return;
|
||||||
if (!_phoneCodeFocus.hasFocus && _phoneCodeTouched) {
|
if (!_phoneCodeFocus.hasFocus && _phoneCodeTouched) {
|
||||||
final profile = ref.read(profileProvider).value ?? _cachedProfile;
|
Future.microtask(() {
|
||||||
if (profile != null) _handlePhoneFocusChange(profile);
|
if (!mounted) return;
|
||||||
|
final profile = ref.read(profileProvider).value ?? _cachedProfile;
|
||||||
|
if (profile != null) _handlePhoneFocusChange(profile);
|
||||||
|
});
|
||||||
} else if (_phoneCodeFocus.hasFocus) {
|
} else if (_phoneCodeFocus.hasFocus) {
|
||||||
_phoneCodeTouched = true;
|
_phoneCodeTouched = true;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user