Добавлено тестовое заполнение и доработки входа

- Добавлено расширенное тестовое заполнение данных через Seed_TestDataPopulation и SeedDataPopulationHelper (включая базовую схему для пользователей 1, 2, 3, их связи и профили).

- Убраны лишние проверки из тестового заполнения: сид теперь только заполняет данные.

- Исправлен WsTestClient: корректная сборка фрагментированных WS-сообщений до полного JSON.

- На странице входа по логину добавлена подсказка про основные тестовые логины 1, 2, 3 (вход без пароля).
This commit is contained in:
AidarKC
2026-04-17 22:26:37 +03:00
parent 30fcde5744
commit ba3ee4290f
6 changed files with 589 additions and 248 deletions
+9 -5
View File
@@ -29,23 +29,27 @@ export function render({ navigate }) {
passwordInput.className = 'input';
passwordInput.type = 'password';
passwordInput.value = state.loginDraft.password;
passwordInput.placeholder = 'Введите пароль';
passwordInput.placeholder = 'Введите пароль (можно оставить пустым)';
const hint = document.createElement('p');
hint.className = 'meta-muted';
hint.textContent = 'Введите логин и пароль. На следующем шаге сохраните ключи на устройстве.';
hint.textContent = 'Введите логин. Пароль может быть пустым. На следующем шаге сохраните ключи на устройстве.';
const status = document.createElement('p');
status.className = 'status-line is-unavailable';
status.style.display = 'none';
const testLoginsHint = document.createElement('p');
testLoginsHint.className = 'meta-muted';
testLoginsHint.textContent = 'Основные тестовые логины: 1, 2, 3 (вход без пароля).';
form.innerHTML = `
<label class="stack"><span class="field-label">Логин</span></label>
<label class="stack"><span class="field-label">Пароль</span></label>
`;
form.children[0].append(loginInput);
form.children[1].append(passwordInput);
form.append(hint, status);
form.append(hint, status, testLoginsHint);
const actions = document.createElement('div');
actions.className = 'auth-footer-actions';
@@ -65,8 +69,8 @@ export function render({ navigate }) {
state.loginDraft.login = loginInput.value.trim();
state.loginDraft.password = passwordInput.value;
if (!state.loginDraft.login || !state.loginDraft.password) {
status.textContent = 'Введите логин и пароль.';
if (!state.loginDraft.login) {
status.textContent = 'Введите логин.';
status.style.display = '';
return;
}
+1 -7
View File
@@ -23,7 +23,7 @@ export function render({ navigate }) {
passwordInput.className = 'input';
passwordInput.type = 'password';
passwordInput.value = state.registrationDraft.password;
passwordInput.placeholder = 'Введите пароль';
passwordInput.placeholder = 'Введите пароль (можно оставить пустым)';
const statusText = document.createElement('p');
statusText.className = 'meta-muted';
@@ -98,12 +98,6 @@ export function render({ navigate }) {
state.registrationDraft.login = loginInput.value.trim();
state.registrationDraft.password = passwordInput.value;
if (!state.registrationDraft.password) {
formError.textContent = 'Введите пароль.';
formError.style.display = '';
return;
}
navigate('registration-payment-view');
});