feat: refactor user registration steps into modular functions and implement step registry

- Replaced individual step imports with a centralized step registry in background.js
- Created separate modules for each registration step: open-chatgpt, submit-signup-email, fill-password, fetch-signup-code, fill-profile, oauth-login, fetch-login-code, confirm-oauth, platform-verify
- Updated tests to reflect changes in step imports and added new tests for step registry functionality
This commit is contained in:
QLHazyCoder
2026-04-16 23:56:57 +08:00
parent 4f12d67d9f
commit 33c5f759d9
14 changed files with 91 additions and 32 deletions
+1 -1
View File
@@ -2,7 +2,7 @@ const assert = require('assert');
const fs = require('fs');
const helperSource = fs.readFileSync('background.js', 'utf8');
const step8ModuleSource = fs.readFileSync('background/steps/step8.js', 'utf8');
const step8ModuleSource = fs.readFileSync('background/steps/confirm-oauth.js', 'utf8');
function extractFunction(source, name) {
const markers = [`async function ${name}(`, `function ${name}(`];