SHA256
Отключить мультиаккаунтность и уточнить статусы профиля
This commit is contained in:
@@ -3,17 +3,20 @@ import test from 'node:test';
|
||||
import assert from 'node:assert/strict';
|
||||
import fs from 'node:fs';
|
||||
const read = relative => expandRussian(fs.readFileSync(new URL(relative, import.meta.url), 'utf8'));
|
||||
test('выбор тарифа перед шагом 1, всего четыре шага', () => {
|
||||
test('выбор тарифа перед шагом 1, официальный аккаунт имеет дополнительный шаг', () => {
|
||||
const choice = read('../js/pages/registration-choice-view.js');
|
||||
const login = read('../js/pages/register-view.js');
|
||||
const email = read('../js/pages/registration-email-view.js');
|
||||
const payment = read('../js/pages/registration-payment-view.js');
|
||||
assert.doesNotMatch(choice, /createRegistrationStepper\(/);
|
||||
assert.match(login, /createRegistrationStepper\(1\)/);
|
||||
assert.match(login, /createRegistrationStepper\(2\)/);
|
||||
assert.match(login, /createRegistrationStepper\(3\)/);
|
||||
assert.match(email, /createRegistrationStepper\(4\)/);
|
||||
assert.match(payment, /createRegistrationStepper\(4\)/);
|
||||
assert.match(login, /createRegistrationStepper\(1,/);
|
||||
assert.match(login, /createRegistrationStepper\(2,/);
|
||||
assert.match(login, /createRegistrationStepper\(3,/);
|
||||
assert.match(login, /createRegistrationStepper\(4, 5\)/);
|
||||
assert.match(login, /if \(draft.accountType === 1\) showPreviousAccounts\(\)/);
|
||||
assert.match(login, /else if \(draft.accountType === 0\) \{ draft.previousAccounts = \[\]; finishIdentity/);
|
||||
assert.match(email, /createRegistrationStepper\(state\.registrationDraft\.accountType === 1 \? 5 : 4,/);
|
||||
assert.match(payment, /createRegistrationStepper\(state\.registrationDraft\.accountType === 1 \? 5 : 4,/);
|
||||
});
|
||||
test('реальная почта и 256-символьный лимит сохранены', () => {
|
||||
const email = read('../js/pages/registration-email-view.js');
|
||||
|
||||
Reference in New Issue
Block a user