@qlover/create-app 1.1.0 → 2.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +32 -0
- package/dist/index.cjs +9 -9
- package/dist/index.js +9 -9
- package/package.json +5 -4
- package/dist/configs/_common/.editorconfig +0 -23
- package/dist/configs/_common/.env.template +0 -13
- package/dist/configs/_common/.gitattributes +0 -2
- package/dist/configs/_common/.github/workflows/general-check.yml +0 -41
- package/dist/configs/_common/.github/workflows/release.yml +0 -81
- package/dist/configs/_common/.gitignore.template +0 -64
- package/dist/configs/_common/.husky/commit-msg +0 -3
- package/dist/configs/_common/.husky/pre-commit +0 -3
- package/dist/configs/_common/.prettierignore +0 -17
- package/dist/configs/_common/.prettierrc.js +0 -7
- package/dist/configs/_common/.vscode/extensions.json +0 -9
- package/dist/configs/_common/.vscode/react.code-snippets +0 -19
- package/dist/configs/_common/.vscode/settings.json +0 -16
- package/dist/configs/_common/commitlint.config.js +0 -10
- package/dist/configs/_common/package.json.template +0 -75
- package/dist/configs/node-lib/eslint.config.js +0 -50
- package/dist/templates/next-app/.env.template +0 -25
- package/dist/templates/next-app/.prettierignore +0 -58
- package/dist/templates/next-app/README.en.md +0 -130
- package/dist/templates/next-app/README.md +0 -130
- package/dist/templates/next-app/config/IOCIdentifier.ts +0 -74
- package/dist/templates/next-app/config/Identifier/api.ts +0 -41
- package/dist/templates/next-app/config/Identifier/common/admint.table.ts +0 -69
- package/dist/templates/next-app/config/Identifier/common/common.ts +0 -90
- package/dist/templates/next-app/config/Identifier/common/index.ts +0 -3
- package/dist/templates/next-app/config/Identifier/common/validators.ts +0 -34
- package/dist/templates/next-app/config/Identifier/index.ts +0 -3
- package/dist/templates/next-app/config/Identifier/pages/index.ts +0 -7
- package/dist/templates/next-app/config/Identifier/pages/page.about.ts +0 -20
- package/dist/templates/next-app/config/Identifier/pages/page.admin.home.ts +0 -27
- package/dist/templates/next-app/config/Identifier/pages/page.admin.locales.ts +0 -266
- package/dist/templates/next-app/config/Identifier/pages/page.admin.user.ts +0 -293
- package/dist/templates/next-app/config/Identifier/pages/page.home.ts +0 -56
- package/dist/templates/next-app/config/Identifier/pages/page.login.ts +0 -159
- package/dist/templates/next-app/config/Identifier/pages/page.register.ts +0 -177
- package/dist/templates/next-app/config/adminNavs.ts +0 -19
- package/dist/templates/next-app/config/common.ts +0 -43
- package/dist/templates/next-app/config/cookies.ts +0 -23
- package/dist/templates/next-app/config/i18n/AboutI18n.ts +0 -14
- package/dist/templates/next-app/config/i18n/HomeI18n.ts +0 -24
- package/dist/templates/next-app/config/i18n/PageI18nInterface.ts +0 -51
- package/dist/templates/next-app/config/i18n/admin18n.ts +0 -75
- package/dist/templates/next-app/config/i18n/i18nConfig.ts +0 -16
- package/dist/templates/next-app/config/i18n/i18nKeyScheam.ts +0 -36
- package/dist/templates/next-app/config/i18n/index.ts +0 -7
- package/dist/templates/next-app/config/i18n/loginI18n.ts +0 -50
- package/dist/templates/next-app/config/i18n/register18n.ts +0 -44
- package/dist/templates/next-app/config/route.ts +0 -9
- package/dist/templates/next-app/config/theme.ts +0 -28
- package/dist/templates/next-app/docs/en/api.md +0 -387
- package/dist/templates/next-app/docs/en/component.md +0 -544
- package/dist/templates/next-app/docs/en/database.md +0 -496
- package/dist/templates/next-app/docs/en/development-guide.md +0 -727
- package/dist/templates/next-app/docs/en/env.md +0 -563
- package/dist/templates/next-app/docs/en/i18n.md +0 -287
- package/dist/templates/next-app/docs/en/index.md +0 -165
- package/dist/templates/next-app/docs/en/page.md +0 -457
- package/dist/templates/next-app/docs/en/project-structure.md +0 -176
- package/dist/templates/next-app/docs/en/router.md +0 -427
- package/dist/templates/next-app/docs/en/theme.md +0 -532
- package/dist/templates/next-app/docs/en/validator.md +0 -478
- package/dist/templates/next-app/docs/zh/api.md +0 -387
- package/dist/templates/next-app/docs/zh/component.md +0 -544
- package/dist/templates/next-app/docs/zh/database.md +0 -496
- package/dist/templates/next-app/docs/zh/development-guide.md +0 -727
- package/dist/templates/next-app/docs/zh/env.md +0 -563
- package/dist/templates/next-app/docs/zh/i18n.md +0 -287
- package/dist/templates/next-app/docs/zh/index.md +0 -165
- package/dist/templates/next-app/docs/zh/page.md +0 -457
- package/dist/templates/next-app/docs/zh/project-structure.md +0 -176
- package/dist/templates/next-app/docs/zh/router.md +0 -427
- package/dist/templates/next-app/docs/zh/theme.md +0 -532
- package/dist/templates/next-app/docs/zh/validator.md +0 -476
- package/dist/templates/next-app/eslint.config.mjs +0 -285
- package/dist/templates/next-app/make/generateLocales.ts +0 -32
- package/dist/templates/next-app/migrations/schema/LocalesSchema.ts +0 -15
- package/dist/templates/next-app/migrations/schema/UserSchema.ts +0 -38
- package/dist/templates/next-app/migrations/sql/1694244000000.sql +0 -21
- package/dist/templates/next-app/next.config.ts +0 -25
- package/dist/templates/next-app/package.json +0 -87
- package/dist/templates/next-app/postcss.config.mjs +0 -5
- package/dist/templates/next-app/public/favicon.ico +0 -0
- package/dist/templates/next-app/public/file.svg +0 -1
- package/dist/templates/next-app/public/globe.svg +0 -1
- package/dist/templates/next-app/public/locales/en.json +0 -182
- package/dist/templates/next-app/public/locales/zh.json +0 -182
- package/dist/templates/next-app/public/next.svg +0 -1
- package/dist/templates/next-app/public/vercel.svg +0 -1
- package/dist/templates/next-app/public/window.svg +0 -1
- package/dist/templates/next-app/src/app/[locale]/admin/AdminI18nProvider.tsx +0 -37
- package/dist/templates/next-app/src/app/[locale]/admin/layout.tsx +0 -42
- package/dist/templates/next-app/src/app/[locale]/admin/locales/page.tsx +0 -153
- package/dist/templates/next-app/src/app/[locale]/admin/page.tsx +0 -20
- package/dist/templates/next-app/src/app/[locale]/admin/users/page.tsx +0 -67
- package/dist/templates/next-app/src/app/[locale]/auth/layout.tsx +0 -18
- package/dist/templates/next-app/src/app/[locale]/auth/login/LoginForm.tsx +0 -126
- package/dist/templates/next-app/src/app/[locale]/auth/login/page.tsx +0 -90
- package/dist/templates/next-app/src/app/[locale]/auth/page.tsx +0 -8
- package/dist/templates/next-app/src/app/[locale]/auth/register/RegisterForm.tsx +0 -197
- package/dist/templates/next-app/src/app/[locale]/auth/register/page.tsx +0 -90
- package/dist/templates/next-app/src/app/[locale]/layout.tsx +0 -63
- package/dist/templates/next-app/src/app/[locale]/not-found.tsx +0 -24
- package/dist/templates/next-app/src/app/[locale]/page.tsx +0 -98
- package/dist/templates/next-app/src/app/api/admin/locales/create/route.ts +0 -13
- package/dist/templates/next-app/src/app/api/admin/locales/import/route.ts +0 -13
- package/dist/templates/next-app/src/app/api/admin/locales/route.ts +0 -20
- package/dist/templates/next-app/src/app/api/admin/locales/update/route.ts +0 -13
- package/dist/templates/next-app/src/app/api/admin/users/route.ts +0 -20
- package/dist/templates/next-app/src/app/api/ai/completions/route.ts +0 -32
- package/dist/templates/next-app/src/app/api/auth/callback/route.ts +0 -11
- package/dist/templates/next-app/src/app/api/callback/route.ts +0 -49
- package/dist/templates/next-app/src/app/api/locales/json/route.ts +0 -33
- package/dist/templates/next-app/src/app/api/user/login/route.ts +0 -10
- package/dist/templates/next-app/src/app/api/user/logout/route.ts +0 -8
- package/dist/templates/next-app/src/app/api/user/register/route.ts +0 -11
- package/dist/templates/next-app/src/app/manifest.ts +0 -16
- package/dist/templates/next-app/src/app/robots.txt +0 -2
- package/dist/templates/next-app/src/base/cases/AdminPageManager.ts +0 -28
- package/dist/templates/next-app/src/base/cases/AppConfig.ts +0 -40
- package/dist/templates/next-app/src/base/cases/Datetime.ts +0 -18
- package/dist/templates/next-app/src/base/cases/DialogErrorPlugin.ts +0 -57
- package/dist/templates/next-app/src/base/cases/DialogHandler.ts +0 -116
- package/dist/templates/next-app/src/base/cases/InversifyContainer.ts +0 -45
- package/dist/templates/next-app/src/base/cases/NavigateBridge.ts +0 -32
- package/dist/templates/next-app/src/base/cases/RequestEncryptPlugin.ts +0 -77
- package/dist/templates/next-app/src/base/cases/ResourceState.ts +0 -17
- package/dist/templates/next-app/src/base/cases/RouterService.ts +0 -52
- package/dist/templates/next-app/src/base/cases/StringEncryptor.ts +0 -73
- package/dist/templates/next-app/src/base/cases/TranslateI18nUtil.ts +0 -53
- package/dist/templates/next-app/src/base/cases/ZodColumnBuilder.ts +0 -212
- package/dist/templates/next-app/src/base/port/AdminLayoutInterface.ts +0 -26
- package/dist/templates/next-app/src/base/port/AppApiInterface.ts +0 -36
- package/dist/templates/next-app/src/base/port/AppUserApiInterface.ts +0 -27
- package/dist/templates/next-app/src/base/port/I18nServiceInterface.ts +0 -25
- package/dist/templates/next-app/src/base/port/IOCInterface.ts +0 -33
- package/dist/templates/next-app/src/base/port/RouterInterface.ts +0 -11
- package/dist/templates/next-app/src/base/port/UserServiceInterface.ts +0 -25
- package/dist/templates/next-app/src/base/port/ZodBuilderInterface.ts +0 -8
- package/dist/templates/next-app/src/base/services/AdminPageEvent.ts +0 -26
- package/dist/templates/next-app/src/base/services/AdminPageScheduler.ts +0 -42
- package/dist/templates/next-app/src/base/services/AppApiRequester.ts +0 -67
- package/dist/templates/next-app/src/base/services/AppUserGateway.ts +0 -110
- package/dist/templates/next-app/src/base/services/I18nService.ts +0 -87
- package/dist/templates/next-app/src/base/services/ResourceService.ts +0 -139
- package/dist/templates/next-app/src/base/services/UserService.ts +0 -68
- package/dist/templates/next-app/src/base/services/adminApi/AdminLocalesApi.ts +0 -106
- package/dist/templates/next-app/src/base/services/adminApi/AdminUserApi.ts +0 -87
- package/dist/templates/next-app/src/base/services/appApi/AppApiPlugin.ts +0 -110
- package/dist/templates/next-app/src/base/services/appApi/AppUserApiBootstrap.ts +0 -52
- package/dist/templates/next-app/src/base/types/AppPageRouter.ts +0 -12
- package/dist/templates/next-app/src/base/types/PagesRouter.ts +0 -9
- package/dist/templates/next-app/src/core/bootstraps/BootstrapClient.ts +0 -76
- package/dist/templates/next-app/src/core/bootstraps/BootstrapServer.ts +0 -125
- package/dist/templates/next-app/src/core/bootstraps/BootstrapsRegistry.ts +0 -50
- package/dist/templates/next-app/src/core/bootstraps/IocIdentifierTest.ts +0 -26
- package/dist/templates/next-app/src/core/bootstraps/PrintBootstrap.ts +0 -18
- package/dist/templates/next-app/src/core/clientIoc/ClientIOC.ts +0 -68
- package/dist/templates/next-app/src/core/clientIoc/ClientIOCRegister.ts +0 -100
- package/dist/templates/next-app/src/core/globals.ts +0 -28
- package/dist/templates/next-app/src/core/serverIoc/ServerIOC.ts +0 -80
- package/dist/templates/next-app/src/core/serverIoc/ServerIOCRegister.ts +0 -66
- package/dist/templates/next-app/src/i18n/loadMessages.ts +0 -103
- package/dist/templates/next-app/src/i18n/request.ts +0 -31
- package/dist/templates/next-app/src/i18n/routing.ts +0 -35
- package/dist/templates/next-app/src/lib/supabase/client.ts +0 -8
- package/dist/templates/next-app/src/lib/supabase/conts.ts +0 -2
- package/dist/templates/next-app/src/lib/supabase/proxy.ts +0 -84
- package/dist/templates/next-app/src/lib/supabase/server.ts +0 -38
- package/dist/templates/next-app/src/pages/[locale]/about.tsx +0 -61
- package/dist/templates/next-app/src/pages/_app.tsx +0 -50
- package/dist/templates/next-app/src/pages/_document.tsx +0 -13
- package/dist/templates/next-app/src/proxy.ts +0 -33
- package/dist/templates/next-app/src/server/AppErrorApi.ts +0 -10
- package/dist/templates/next-app/src/server/AppPageRouteParams.ts +0 -110
- package/dist/templates/next-app/src/server/AppSuccessApi.ts +0 -7
- package/dist/templates/next-app/src/server/NextApiServer.ts +0 -61
- package/dist/templates/next-app/src/server/PagesRouteParams.ts +0 -145
- package/dist/templates/next-app/src/server/PasswordEncrypt.ts +0 -18
- package/dist/templates/next-app/src/server/ServerAuth.ts +0 -81
- package/dist/templates/next-app/src/server/SupabaseBridge.ts +0 -262
- package/dist/templates/next-app/src/server/UserCredentialToken.ts +0 -53
- package/dist/templates/next-app/src/server/controllers/AdminLocalesController.ts +0 -86
- package/dist/templates/next-app/src/server/controllers/AdminUserController.ts +0 -42
- package/dist/templates/next-app/src/server/controllers/LocalesController.ts +0 -36
- package/dist/templates/next-app/src/server/controllers/UserController.ts +0 -91
- package/dist/templates/next-app/src/server/port/AIControllerInterface.ts +0 -8
- package/dist/templates/next-app/src/server/port/AdminLocalesControllerInterface.ts +0 -21
- package/dist/templates/next-app/src/server/port/AdminUserControllerInterface.ts +0 -11
- package/dist/templates/next-app/src/server/port/CrentialTokenInterface.ts +0 -5
- package/dist/templates/next-app/src/server/port/DBBridgeInterface.ts +0 -36
- package/dist/templates/next-app/src/server/port/DBTableInterface.ts +0 -12
- package/dist/templates/next-app/src/server/port/LocalesControllerInterface.ts +0 -10
- package/dist/templates/next-app/src/server/port/LocalesRepositoryInterface.ts +0 -43
- package/dist/templates/next-app/src/server/port/PaginationInterface.ts +0 -6
- package/dist/templates/next-app/src/server/port/RouteParamsnHandlerInterface.ts +0 -18
- package/dist/templates/next-app/src/server/port/ServerAuthInterface.ts +0 -15
- package/dist/templates/next-app/src/server/port/ServerInterface.ts +0 -23
- package/dist/templates/next-app/src/server/port/UserRepositoryInterface.ts +0 -15
- package/dist/templates/next-app/src/server/port/UserServiceInterface.ts +0 -14
- package/dist/templates/next-app/src/server/port/ValidatorInterface.ts +0 -23
- package/dist/templates/next-app/src/server/repositorys/LocalesRepository.ts +0 -216
- package/dist/templates/next-app/src/server/repositorys/UserRepository.ts +0 -102
- package/dist/templates/next-app/src/server/services/AIService.ts +0 -45
- package/dist/templates/next-app/src/server/services/AdminAuthPlugin.ts +0 -21
- package/dist/templates/next-app/src/server/services/AdminLocalesService.ts +0 -20
- package/dist/templates/next-app/src/server/services/ApiLocaleService.ts +0 -137
- package/dist/templates/next-app/src/server/services/ApiUserService.ts +0 -29
- package/dist/templates/next-app/src/server/services/UserService.ts +0 -134
- package/dist/templates/next-app/src/server/validators/ExtendedExecutorError.ts +0 -6
- package/dist/templates/next-app/src/server/validators/LocalesValidator.ts +0 -145
- package/dist/templates/next-app/src/server/validators/LoginValidator.ts +0 -82
- package/dist/templates/next-app/src/server/validators/PaginationValidator.ts +0 -70
- package/dist/templates/next-app/src/server/validators/SignupVerifyValidator.ts +0 -68
- package/dist/templates/next-app/src/styles/css/antd-themes/_common/_default.css +0 -280
- package/dist/templates/next-app/src/styles/css/antd-themes/_common/dark.css +0 -233
- package/dist/templates/next-app/src/styles/css/antd-themes/_common/index.css +0 -3
- package/dist/templates/next-app/src/styles/css/antd-themes/_common/pink.css +0 -246
- package/dist/templates/next-app/src/styles/css/antd-themes/index.css +0 -4
- package/dist/templates/next-app/src/styles/css/antd-themes/menu/_default.css +0 -108
- package/dist/templates/next-app/src/styles/css/antd-themes/menu/dark.css +0 -67
- package/dist/templates/next-app/src/styles/css/antd-themes/menu/index.css +0 -3
- package/dist/templates/next-app/src/styles/css/antd-themes/menu/pink.css +0 -67
- package/dist/templates/next-app/src/styles/css/antd-themes/no-context.css +0 -34
- package/dist/templates/next-app/src/styles/css/antd-themes/pagination/_default.css +0 -34
- package/dist/templates/next-app/src/styles/css/antd-themes/pagination/dark.css +0 -31
- package/dist/templates/next-app/src/styles/css/antd-themes/pagination/index.css +0 -3
- package/dist/templates/next-app/src/styles/css/antd-themes/pagination/pink.css +0 -36
- package/dist/templates/next-app/src/styles/css/antd-themes/table/_default.css +0 -44
- package/dist/templates/next-app/src/styles/css/antd-themes/table/dark.css +0 -43
- package/dist/templates/next-app/src/styles/css/antd-themes/table/index.css +0 -3
- package/dist/templates/next-app/src/styles/css/antd-themes/table/pink.css +0 -43
- package/dist/templates/next-app/src/styles/css/index.css +0 -6
- package/dist/templates/next-app/src/styles/css/page.css +0 -20
- package/dist/templates/next-app/src/styles/css/scrollbar.css +0 -34
- package/dist/templates/next-app/src/styles/css/tailwind.css +0 -5
- package/dist/templates/next-app/src/styles/css/themes/_default.css +0 -30
- package/dist/templates/next-app/src/styles/css/themes/dark.css +0 -30
- package/dist/templates/next-app/src/styles/css/themes/index.css +0 -3
- package/dist/templates/next-app/src/styles/css/themes/pink.css +0 -30
- package/dist/templates/next-app/src/styles/css/zIndex.css +0 -9
- package/dist/templates/next-app/src/uikit/components/AdminLayout.tsx +0 -150
- package/dist/templates/next-app/src/uikit/components/BootstrapsProvider.tsx +0 -39
- package/dist/templates/next-app/src/uikit/components/ClientRootProvider.tsx +0 -64
- package/dist/templates/next-app/src/uikit/components/ClientSeo.tsx +0 -36
- package/dist/templates/next-app/src/uikit/components/ClinetRenderProvider.tsx +0 -42
- package/dist/templates/next-app/src/uikit/components/EditableCell.tsx +0 -118
- package/dist/templates/next-app/src/uikit/components/FeatureItem.tsx +0 -13
- package/dist/templates/next-app/src/uikit/components/IOCProvider.tsx +0 -34
- package/dist/templates/next-app/src/uikit/components/LocaleLink.tsx +0 -50
- package/dist/templates/next-app/src/uikit/components/With.tsx +0 -17
- package/dist/templates/next-app/src/uikit/components/localesImportButton/LocalesImportButton.tsx +0 -62
- package/dist/templates/next-app/src/uikit/components/localesImportButton/LocalesImportEvent.ts +0 -28
- package/dist/templates/next-app/src/uikit/components/localesImportButton/import.module.css +0 -6
- package/dist/templates/next-app/src/uikit/components-app/AdminButton.tsx +0 -29
- package/dist/templates/next-app/src/uikit/components-app/AppBridge.tsx +0 -17
- package/dist/templates/next-app/src/uikit/components-app/AppRoutePage.tsx +0 -105
- package/dist/templates/next-app/src/uikit/components-app/AuthButton.tsx +0 -20
- package/dist/templates/next-app/src/uikit/components-app/LanguageSwitcher.tsx +0 -75
- package/dist/templates/next-app/src/uikit/components-app/LogoutButton.tsx +0 -45
- package/dist/templates/next-app/src/uikit/components-app/ThemeSwitcher.tsx +0 -144
- package/dist/templates/next-app/src/uikit/components-pages/LanguageSwitcher.tsx +0 -98
- package/dist/templates/next-app/src/uikit/components-pages/PagesRoutePage.tsx +0 -93
- package/dist/templates/next-app/src/uikit/context/IOCContext.ts +0 -25
- package/dist/templates/next-app/src/uikit/hook/useI18nInterface.ts +0 -22
- package/dist/templates/next-app/src/uikit/hook/useIOC.ts +0 -37
- package/dist/templates/next-app/src/uikit/hook/useStrictEffect.ts +0 -32
- package/dist/templates/next-app/src/uikit/hook/useWarnTranslations.ts +0 -11
- package/dist/templates/next-app/src/uikit/utils/getHashParams.ts +0 -8
- package/dist/templates/next-app/src/uikit/utils/getHashVerifyEmailParams.ts +0 -42
- package/dist/templates/next-app/tailwind.config.ts +0 -8
- package/dist/templates/next-app/tsconfig.json +0 -39
- package/dist/templates/node-lib/__tests__/readJson.test.ts +0 -26
- package/dist/templates/node-lib/bin/test.js +0 -30
- package/dist/templates/node-lib/package.json +0 -66
- package/dist/templates/node-lib/rollup.config.js +0 -79
- package/dist/templates/node-lib/src/index.ts +0 -7
- package/dist/templates/node-lib/src/readJson.ts +0 -12
- package/dist/templates/node-lib/tsconfig.json +0 -23
- package/dist/templates/pack-app/README.md +0 -108
- package/dist/templates/pack-app/eslint.config.js +0 -97
- package/dist/templates/pack-app/fe-config.json +0 -35
- package/dist/templates/pack-app/package.json +0 -86
- package/dist/templates/pack-app/pnpm-workspace.yaml +0 -2
- package/dist/templates/pack-app/tsconfig.json +0 -9
- package/dist/templates/pack-app/tsconfig.test.json +0 -10
- package/dist/templates/pack-app/vite.config.ts +0 -14
- package/dist/templates/react-app/.env.template +0 -22
- package/dist/templates/react-app/.prettierignore +0 -17
- package/dist/templates/react-app/README.en.md +0 -274
- package/dist/templates/react-app/README.md +0 -273
- package/dist/templates/react-app/__tests__/__mocks__/BootstrapTest.ts +0 -16
- package/dist/templates/react-app/__tests__/__mocks__/MockAppConfig.ts +0 -48
- package/dist/templates/react-app/__tests__/__mocks__/MockDialogHandler.ts +0 -17
- package/dist/templates/react-app/__tests__/__mocks__/MockLogger.ts +0 -14
- package/dist/templates/react-app/__tests__/__mocks__/components/TestApp.tsx +0 -38
- package/dist/templates/react-app/__tests__/__mocks__/components/TestBootstrapsProvider.tsx +0 -53
- package/dist/templates/react-app/__tests__/__mocks__/components/TestRouter.tsx +0 -46
- package/dist/templates/react-app/__tests__/__mocks__/components/index.ts +0 -12
- package/dist/templates/react-app/__tests__/__mocks__/createMockGlobals.ts +0 -96
- package/dist/templates/react-app/__tests__/__mocks__/i18nextHttpBackend.ts +0 -110
- package/dist/templates/react-app/__tests__/__mocks__/testIOC/TestIOC.ts +0 -55
- package/dist/templates/react-app/__tests__/__mocks__/testIOC/TestIOCRegister.ts +0 -74
- package/dist/templates/react-app/__tests__/setup/index.ts +0 -1
- package/dist/templates/react-app/__tests__/setup/setupGlobal.ts +0 -64
- package/dist/templates/react-app/__tests__/src/App.structure.test.tsx +0 -115
- package/dist/templates/react-app/__tests__/src/base/cases/AppConfig.test.ts +0 -288
- package/dist/templates/react-app/__tests__/src/base/cases/DialogHandler.test.ts +0 -226
- package/dist/templates/react-app/__tests__/src/base/cases/I18nKeyErrorPlugin.test.ts +0 -178
- package/dist/templates/react-app/__tests__/src/base/cases/InversifyContainer.test.ts +0 -181
- package/dist/templates/react-app/__tests__/src/base/cases/PublicAssetsPath.test.ts +0 -61
- package/dist/templates/react-app/__tests__/src/base/cases/RequestLogger.test.ts +0 -177
- package/dist/templates/react-app/__tests__/src/base/cases/RequestStatusCatcher.test.ts +0 -191
- package/dist/templates/react-app/__tests__/src/base/cases/RouterLoader.test.ts +0 -245
- package/dist/templates/react-app/__tests__/src/base/services/I18nService.test.ts +0 -240
- package/dist/templates/react-app/__tests__/src/core/IOC.test.ts +0 -242
- package/dist/templates/react-app/__tests__/src/core/bootstraps/BootstrapClient.test.ts +0 -135
- package/dist/templates/react-app/__tests__/src/core/bootstraps/BootstrapsApp.test.ts +0 -74
- package/dist/templates/react-app/__tests__/src/main.test.tsx +0 -46
- package/dist/templates/react-app/__tests__/src/uikit/components/BaseHeader.test.tsx +0 -97
- package/dist/templates/react-app/__tests__/src/uikit/components/chatMessage/ChatRoot.test.tsx +0 -274
- package/dist/templates/react-app/config/IOCIdentifier.ts +0 -91
- package/dist/templates/react-app/config/Identifier/common/common.error.ts +0 -34
- package/dist/templates/react-app/config/Identifier/common/common.ts +0 -62
- package/dist/templates/react-app/config/Identifier/common/index.ts +0 -2
- package/dist/templates/react-app/config/Identifier/components/component.chatMessage.ts +0 -56
- package/dist/templates/react-app/config/Identifier/components/component.messageBaseList.ts +0 -103
- package/dist/templates/react-app/config/Identifier/index.ts +0 -2
- package/dist/templates/react-app/config/Identifier/pages/index.ts +0 -9
- package/dist/templates/react-app/config/Identifier/pages/page.about.ts +0 -189
- package/dist/templates/react-app/config/Identifier/pages/page.executor.ts +0 -275
- package/dist/templates/react-app/config/Identifier/pages/page.home.ts +0 -71
- package/dist/templates/react-app/config/Identifier/pages/page.identifiter.ts +0 -102
- package/dist/templates/react-app/config/Identifier/pages/page.jsonStorage.ts +0 -77
- package/dist/templates/react-app/config/Identifier/pages/page.login.ts +0 -162
- package/dist/templates/react-app/config/Identifier/pages/page.message.ts +0 -20
- package/dist/templates/react-app/config/Identifier/pages/page.register.ts +0 -159
- package/dist/templates/react-app/config/Identifier/pages/page.request.ts +0 -169
- package/dist/templates/react-app/config/app.router.ts +0 -338
- package/dist/templates/react-app/config/common.ts +0 -85
- package/dist/templates/react-app/config/feapi.mock.json +0 -34
- package/dist/templates/react-app/config/i18n/PageI18nInterface.ts +0 -53
- package/dist/templates/react-app/config/i18n/aboutI18n.ts +0 -42
- package/dist/templates/react-app/config/i18n/chatMessageI18n.ts +0 -17
- package/dist/templates/react-app/config/i18n/executorI18n.ts +0 -51
- package/dist/templates/react-app/config/i18n/homeI18n.ts +0 -24
- package/dist/templates/react-app/config/i18n/i18nConfig.ts +0 -30
- package/dist/templates/react-app/config/i18n/identifiter18n.ts +0 -30
- package/dist/templates/react-app/config/i18n/jsonStorage18n.ts +0 -27
- package/dist/templates/react-app/config/i18n/login18n.ts +0 -42
- package/dist/templates/react-app/config/i18n/messageBaseListI18n.ts +0 -22
- package/dist/templates/react-app/config/i18n/messageI18n.ts +0 -14
- package/dist/templates/react-app/config/i18n/notFoundI18n.ts +0 -34
- package/dist/templates/react-app/config/i18n/register18n.ts +0 -40
- package/dist/templates/react-app/config/i18n/request18n.ts +0 -41
- package/dist/templates/react-app/config/theme.ts +0 -21
- package/dist/templates/react-app/docs/en/bootstrap.md +0 -1891
- package/dist/templates/react-app/docs/en/components/chat-message-component.md +0 -320
- package/dist/templates/react-app/docs/en/components/chat-message-refactor.md +0 -283
- package/dist/templates/react-app/docs/en/components/message-base-list-component.md +0 -171
- package/dist/templates/react-app/docs/en/development-guide.md +0 -1199
- package/dist/templates/react-app/docs/en/env.md +0 -1336
- package/dist/templates/react-app/docs/en/global.md +0 -509
- package/dist/templates/react-app/docs/en/i18n.md +0 -979
- package/dist/templates/react-app/docs/en/index.md +0 -802
- package/dist/templates/react-app/docs/en/ioc.md +0 -1365
- package/dist/templates/react-app/docs/en/playwright/e2e-tests.md +0 -321
- package/dist/templates/react-app/docs/en/playwright/index.md +0 -19
- package/dist/templates/react-app/docs/en/playwright/installation-summary.md +0 -332
- package/dist/templates/react-app/docs/en/playwright/overview.md +0 -222
- package/dist/templates/react-app/docs/en/playwright/quickstart.md +0 -325
- package/dist/templates/react-app/docs/en/playwright/reorganization-notes.md +0 -340
- package/dist/templates/react-app/docs/en/playwright/setup-complete.md +0 -290
- package/dist/templates/react-app/docs/en/playwright/testing-guide.md +0 -565
- package/dist/templates/react-app/docs/en/request.md +0 -423
- package/dist/templates/react-app/docs/en/router.md +0 -404
- package/dist/templates/react-app/docs/en/store.md +0 -1331
- package/dist/templates/react-app/docs/en/test-guide.md +0 -976
- package/dist/templates/react-app/docs/en/theme.md +0 -424
- package/dist/templates/react-app/docs/en/typescript-guide.md +0 -473
- package/dist/templates/react-app/docs/en/why-no-globals.md +0 -797
- package/dist/templates/react-app/docs/zh/bootstrap.md +0 -1891
- package/dist/templates/react-app/docs/zh/components/chat-message-component.md +0 -320
- package/dist/templates/react-app/docs/zh/components/chat-message-refactor.md +0 -283
- package/dist/templates/react-app/docs/zh/components/message-base-list-component.md +0 -171
- package/dist/templates/react-app/docs/zh/development-guide.md +0 -1199
- package/dist/templates/react-app/docs/zh/env.md +0 -1336
- package/dist/templates/react-app/docs/zh/global.md +0 -511
- package/dist/templates/react-app/docs/zh/i18n.md +0 -979
- package/dist/templates/react-app/docs/zh/index.md +0 -786
- package/dist/templates/react-app/docs/zh/ioc.md +0 -1364
- package/dist/templates/react-app/docs/zh/playwright/e2e-tests.md +0 -321
- package/dist/templates/react-app/docs/zh/playwright/index.md +0 -19
- package/dist/templates/react-app/docs/zh/playwright/installation-summary.md +0 -332
- package/dist/templates/react-app/docs/zh/playwright/overview.md +0 -222
- package/dist/templates/react-app/docs/zh/playwright/quickstart.md +0 -325
- package/dist/templates/react-app/docs/zh/playwright/reorganization-notes.md +0 -340
- package/dist/templates/react-app/docs/zh/playwright/setup-complete.md +0 -290
- package/dist/templates/react-app/docs/zh/playwright/testing-guide.md +0 -565
- package/dist/templates/react-app/docs/zh/request.md +0 -427
- package/dist/templates/react-app/docs/zh/router.md +0 -408
- package/dist/templates/react-app/docs/zh/store.md +0 -1329
- package/dist/templates/react-app/docs/zh/test-guide.md +0 -976
- package/dist/templates/react-app/docs/zh/theme.md +0 -424
- package/dist/templates/react-app/docs/zh/typescript-guide.md +0 -473
- package/dist/templates/react-app/docs/zh/why-no-globals.md +0 -797
- package/dist/templates/react-app/e2e/App.spec.ts +0 -319
- package/dist/templates/react-app/e2e/fixtures/base.fixture.ts +0 -40
- package/dist/templates/react-app/e2e/main.spec.ts +0 -20
- package/dist/templates/react-app/e2e/utils/test-helpers.ts +0 -19
- package/dist/templates/react-app/eslint.config.mjs +0 -325
- package/dist/templates/react-app/index.html +0 -13
- package/dist/templates/react-app/makes/generateTs2LocalesOptions.ts +0 -26
- package/dist/templates/react-app/package.json +0 -125
- package/dist/templates/react-app/playwright.config.ts +0 -79
- package/dist/templates/react-app/postcss.config.js +0 -5
- package/dist/templates/react-app/public/locales/en/common.json +0 -235
- package/dist/templates/react-app/public/locales/zh/common.json +0 -235
- package/dist/templates/react-app/public/logo.svg +0 -1
- package/dist/templates/react-app/public/router-root/logo.svg +0 -1
- package/dist/templates/react-app/src/App.tsx +0 -35
- package/dist/templates/react-app/src/assets/react.svg +0 -1
- package/dist/templates/react-app/src/base/apis/AiApi.ts +0 -68
- package/dist/templates/react-app/src/base/apis/feApi/FeApi.ts +0 -29
- package/dist/templates/react-app/src/base/apis/feApi/FeApiAdapter.ts +0 -14
- package/dist/templates/react-app/src/base/apis/feApi/FeApiBootstarp.ts +0 -86
- package/dist/templates/react-app/src/base/apis/feApi/FeApiType.ts +0 -21
- package/dist/templates/react-app/src/base/apis/userApi/UserApi.ts +0 -142
- package/dist/templates/react-app/src/base/apis/userApi/UserApiAdapter.ts +0 -14
- package/dist/templates/react-app/src/base/apis/userApi/UserApiBootstarp.ts +0 -86
- package/dist/templates/react-app/src/base/apis/userApi/UserApiType.ts +0 -70
- package/dist/templates/react-app/src/base/cases/AppConfig.ts +0 -123
- package/dist/templates/react-app/src/base/cases/DialogHandler.ts +0 -115
- package/dist/templates/react-app/src/base/cases/I18nKeyErrorPlugin.ts +0 -64
- package/dist/templates/react-app/src/base/cases/InversifyContainer.ts +0 -45
- package/dist/templates/react-app/src/base/cases/PublicAssetsPath.ts +0 -23
- package/dist/templates/react-app/src/base/cases/RequestLanguages.ts +0 -55
- package/dist/templates/react-app/src/base/cases/RequestLogger.ts +0 -80
- package/dist/templates/react-app/src/base/cases/RequestStatusCatcher.ts +0 -40
- package/dist/templates/react-app/src/base/cases/ResourceState.ts +0 -23
- package/dist/templates/react-app/src/base/cases/RouterLoader.ts +0 -173
- package/dist/templates/react-app/src/base/cases/TranslateI18nInterface.ts +0 -26
- package/dist/templates/react-app/src/base/port/ExecutorPageBridgeInterface.ts +0 -23
- package/dist/templates/react-app/src/base/port/I18nServiceInterface.ts +0 -10
- package/dist/templates/react-app/src/base/port/IOCInterface.ts +0 -38
- package/dist/templates/react-app/src/base/port/JSONStoragePageBridgeInterface.ts +0 -21
- package/dist/templates/react-app/src/base/port/RequestPageBridgeInterface.ts +0 -23
- package/dist/templates/react-app/src/base/port/RequestStatusInterface.ts +0 -5
- package/dist/templates/react-app/src/base/port/RouteServiceInterface.ts +0 -29
- package/dist/templates/react-app/src/base/port/UserServiceInterface.ts +0 -20
- package/dist/templates/react-app/src/base/services/BaseLayoutService.ts +0 -61
- package/dist/templates/react-app/src/base/services/I18nService.ts +0 -146
- package/dist/templates/react-app/src/base/services/IdentifierService.ts +0 -162
- package/dist/templates/react-app/src/base/services/RouteService.ts +0 -115
- package/dist/templates/react-app/src/base/services/UserBootstrap.ts +0 -45
- package/dist/templates/react-app/src/base/services/UserService.ts +0 -88
- package/dist/templates/react-app/src/base/types/Page.ts +0 -47
- package/dist/templates/react-app/src/base/types/deprecated-antd.d.ts +0 -60
- package/dist/templates/react-app/src/base/types/global.d.ts +0 -8
- package/dist/templates/react-app/src/core/IOC.ts +0 -28
- package/dist/templates/react-app/src/core/bootstraps/BootstrapClient.ts +0 -108
- package/dist/templates/react-app/src/core/bootstraps/BootstrapsRegistry.ts +0 -54
- package/dist/templates/react-app/src/core/bootstraps/IocIdentifierTest.ts +0 -26
- package/dist/templates/react-app/src/core/bootstraps/PrintBootstrap.ts +0 -14
- package/dist/templates/react-app/src/core/bootstraps/SaveAppInfo.ts +0 -28
- package/dist/templates/react-app/src/core/clientIoc/ClientIOC.ts +0 -47
- package/dist/templates/react-app/src/core/clientIoc/ClientIOCRegister.ts +0 -142
- package/dist/templates/react-app/src/core/globals.ts +0 -47
- package/dist/templates/react-app/src/main.tsx +0 -19
- package/dist/templates/react-app/src/pages/404.tsx +0 -19
- package/dist/templates/react-app/src/pages/500.tsx +0 -18
- package/dist/templates/react-app/src/pages/NoRouteFound.tsx +0 -5
- package/dist/templates/react-app/src/pages/auth/Layout.tsx +0 -27
- package/dist/templates/react-app/src/pages/auth/LoginPage.tsx +0 -166
- package/dist/templates/react-app/src/pages/auth/RegisterPage.tsx +0 -226
- package/dist/templates/react-app/src/pages/base/AboutPage.tsx +0 -123
- package/dist/templates/react-app/src/pages/base/ExecutorPage.tsx +0 -467
- package/dist/templates/react-app/src/pages/base/HomePage.tsx +0 -81
- package/dist/templates/react-app/src/pages/base/IdentifierPage.tsx +0 -117
- package/dist/templates/react-app/src/pages/base/JSONStoragePage.tsx +0 -132
- package/dist/templates/react-app/src/pages/base/Layout.tsx +0 -20
- package/dist/templates/react-app/src/pages/base/MessagePage.tsx +0 -71
- package/dist/templates/react-app/src/pages/base/RedirectPathname.tsx +0 -18
- package/dist/templates/react-app/src/pages/base/RequestPage.tsx +0 -193
- package/dist/templates/react-app/src/styles/css/antd-themes/_common/_default.css +0 -280
- package/dist/templates/react-app/src/styles/css/antd-themes/_common/dark.css +0 -233
- package/dist/templates/react-app/src/styles/css/antd-themes/_common/index.css +0 -3
- package/dist/templates/react-app/src/styles/css/antd-themes/_common/pink.css +0 -246
- package/dist/templates/react-app/src/styles/css/antd-themes/index.css +0 -4
- package/dist/templates/react-app/src/styles/css/antd-themes/menu/_default.css +0 -108
- package/dist/templates/react-app/src/styles/css/antd-themes/menu/dark.css +0 -67
- package/dist/templates/react-app/src/styles/css/antd-themes/menu/index.css +0 -3
- package/dist/templates/react-app/src/styles/css/antd-themes/menu/pink.css +0 -67
- package/dist/templates/react-app/src/styles/css/antd-themes/no-context.css +0 -34
- package/dist/templates/react-app/src/styles/css/antd-themes/pagination/_default.css +0 -34
- package/dist/templates/react-app/src/styles/css/antd-themes/pagination/dark.css +0 -31
- package/dist/templates/react-app/src/styles/css/antd-themes/pagination/index.css +0 -3
- package/dist/templates/react-app/src/styles/css/antd-themes/pagination/pink.css +0 -36
- package/dist/templates/react-app/src/styles/css/antd-themes/table/_default.css +0 -44
- package/dist/templates/react-app/src/styles/css/antd-themes/table/dark.css +0 -43
- package/dist/templates/react-app/src/styles/css/antd-themes/table/index.css +0 -3
- package/dist/templates/react-app/src/styles/css/antd-themes/table/pink.css +0 -43
- package/dist/templates/react-app/src/styles/css/index.css +0 -6
- package/dist/templates/react-app/src/styles/css/page.css +0 -20
- package/dist/templates/react-app/src/styles/css/scrollbar.css +0 -34
- package/dist/templates/react-app/src/styles/css/tailwind.css +0 -5
- package/dist/templates/react-app/src/styles/css/themes/_default.css +0 -30
- package/dist/templates/react-app/src/styles/css/themes/dark.css +0 -30
- package/dist/templates/react-app/src/styles/css/themes/index.css +0 -3
- package/dist/templates/react-app/src/styles/css/themes/pink.css +0 -30
- package/dist/templates/react-app/src/styles/css/zIndex.css +0 -9
- package/dist/templates/react-app/src/uikit/bridges/ExecutorPageBridge.ts +0 -72
- package/dist/templates/react-app/src/uikit/bridges/JSONStoragePageBridge.ts +0 -41
- package/dist/templates/react-app/src/uikit/bridges/NavigateBridge.ts +0 -22
- package/dist/templates/react-app/src/uikit/bridges/RequestPageBridge.ts +0 -136
- package/dist/templates/react-app/src/uikit/components/AppRouterProvider.tsx +0 -35
- package/dist/templates/react-app/src/uikit/components/BaseHeader.tsx +0 -51
- package/dist/templates/react-app/src/uikit/components/BaseLayoutProvider.tsx +0 -44
- package/dist/templates/react-app/src/uikit/components/BaseRouteProvider.tsx +0 -21
- package/dist/templates/react-app/src/uikit/components/BaseRouteSeo.tsx +0 -18
- package/dist/templates/react-app/src/uikit/components/BootstrapsProvider.tsx +0 -11
- package/dist/templates/react-app/src/uikit/components/ClientSeo.tsx +0 -62
- package/dist/templates/react-app/src/uikit/components/ComboProvider.tsx +0 -38
- package/dist/templates/react-app/src/uikit/components/LanguageSwitcher.tsx +0 -78
- package/dist/templates/react-app/src/uikit/components/Loading.tsx +0 -49
- package/dist/templates/react-app/src/uikit/components/LocaleLink.tsx +0 -43
- package/dist/templates/react-app/src/uikit/components/LogoutButton.tsx +0 -58
- package/dist/templates/react-app/src/uikit/components/MessageBaseList.tsx +0 -258
- package/dist/templates/react-app/src/uikit/components/RouterRenderComponent.tsx +0 -19
- package/dist/templates/react-app/src/uikit/components/ThemeSwitcher.tsx +0 -137
- package/dist/templates/react-app/src/uikit/components/With.tsx +0 -17
- package/dist/templates/react-app/src/uikit/components/chatMessage/ChatMessageBridge.ts +0 -205
- package/dist/templates/react-app/src/uikit/components/chatMessage/ChatRoot.tsx +0 -21
- package/dist/templates/react-app/src/uikit/components/chatMessage/FocusBar.tsx +0 -108
- package/dist/templates/react-app/src/uikit/components/chatMessage/MessageApi.ts +0 -282
- package/dist/templates/react-app/src/uikit/components/chatMessage/MessageItem.tsx +0 -102
- package/dist/templates/react-app/src/uikit/components/chatMessage/MessagesList.tsx +0 -86
- package/dist/templates/react-app/src/uikit/contexts/BaseRouteContext.ts +0 -42
- package/dist/templates/react-app/src/uikit/contexts/IOCContext.ts +0 -13
- package/dist/templates/react-app/src/uikit/hooks/useAppTranslation.ts +0 -26
- package/dist/templates/react-app/src/uikit/hooks/useI18nInterface.ts +0 -25
- package/dist/templates/react-app/src/uikit/hooks/useIOC.ts +0 -35
- package/dist/templates/react-app/src/uikit/hooks/useNavigateBridge.ts +0 -21
- package/dist/templates/react-app/src/uikit/hooks/useRouterI18nGuard.ts +0 -25
- package/dist/templates/react-app/src/uikit/hooks/useStrictEffect.ts +0 -31
- package/dist/templates/react-app/src/vite-env.d.ts +0 -1
- package/dist/templates/react-app/tailwind.config.js +0 -4
- package/dist/templates/react-app/tsconfig.app.json +0 -36
- package/dist/templates/react-app/tsconfig.e2e.json +0 -24
- package/dist/templates/react-app/tsconfig.json +0 -22
- package/dist/templates/react-app/tsconfig.node.json +0 -27
- package/dist/templates/react-app/tsconfig.test.json +0 -18
- package/dist/templates/react-app/vite.config.ts +0 -144
|
@@ -1,340 +0,0 @@
|
|
|
1
|
-
# 📚 文档重组完成(最终版)
|
|
2
|
-
|
|
3
|
-
## ✅ 完成的工作
|
|
4
|
-
|
|
5
|
-
所有 Playwright 相关文档已经**完全**集中到 `docs/en/playwright/` 和 `docs/zh/playwright/` 目录中,实现了真正的按语言分类管理。
|
|
6
|
-
|
|
7
|
-
## 📂 最终文档结构
|
|
8
|
-
|
|
9
|
-
```
|
|
10
|
-
docs/
|
|
11
|
-
├── README.md # 📖 文档总目录
|
|
12
|
-
├── REORGANIZATION.md # 📝 本文档 - 重组说明
|
|
13
|
-
├── en/ # 🇬🇧 英文文档
|
|
14
|
-
│ ├── index.md # 英文文档入口
|
|
15
|
-
│ ├── playwright/ # ⭐ Playwright 英文文档(完整)
|
|
16
|
-
│ │ ├── README.md # Playwright 文档中心
|
|
17
|
-
│ │ ├── overview.md # 概述 ✨ 新增
|
|
18
|
-
│ │ ├── quickstart.md # 快速入门
|
|
19
|
-
│ │ ├── testing-guide.md # 详细测试指南
|
|
20
|
-
│ │ ├── setup-complete.md # 设置完成指南
|
|
21
|
-
│ │ ├── installation-summary.md # 安装摘要
|
|
22
|
-
│ │ └── e2e-tests.md # E2E 测试代码文档
|
|
23
|
-
│ ├── bootstrap.md
|
|
24
|
-
│ ├── development-guide.md
|
|
25
|
-
│ └── ... (其他英文文档)
|
|
26
|
-
└── zh/ # 🇨🇳 中文文档
|
|
27
|
-
├── playwright/ # ⭐ Playwright 中文文档(完整)
|
|
28
|
-
│ ├── README.md # Playwright 文档中心
|
|
29
|
-
│ ├── overview.md # 概述 ✨ 新增
|
|
30
|
-
│ ├── quickstart.md # 快速入门
|
|
31
|
-
│ ├── testing-guide.md # 详细测试指南
|
|
32
|
-
│ ├── setup-complete.md # 设置完成指南
|
|
33
|
-
│ ├── installation-summary.md # 安装摘要
|
|
34
|
-
│ └── e2e-tests.md # E2E 测试代码文档
|
|
35
|
-
├── bootstrap.md
|
|
36
|
-
├── development-guide.md
|
|
37
|
-
└── ... (其他中文文档)
|
|
38
|
-
```
|
|
39
|
-
|
|
40
|
-
## 🔄 完整变更详情
|
|
41
|
-
|
|
42
|
-
### 新建/移动的文件
|
|
43
|
-
|
|
44
|
-
#### Playwright 英文文档(docs/en/playwright/)- 7 个文件
|
|
45
|
-
|
|
46
|
-
1. **README.md** - 文档导航中心(新建)
|
|
47
|
-
2. **overview.md** - Playwright 概述 ✨(从 `docs/en/playwright-testing.md` 移动)
|
|
48
|
-
3. **quickstart.md** - 快速入门指南(从根目录移动)
|
|
49
|
-
4. **testing-guide.md** - 详细测试指南(新建,6000+ 字)
|
|
50
|
-
5. **setup-complete.md** - 设置完成指南(从根目录移动)
|
|
51
|
-
6. **installation-summary.md** - 安装摘要(从根目录移动)
|
|
52
|
-
7. **e2e-tests.md** - E2E 测试代码文档(从 `e2e/README.md` 复制)
|
|
53
|
-
|
|
54
|
-
#### Playwright 中文文档(docs/zh/playwright/)- 7 个文件
|
|
55
|
-
|
|
56
|
-
1. **README.md** - 文档导航中心(新建)
|
|
57
|
-
2. **overview.md** - Playwright 概述 ✨(从 `docs/zh/playwright-testing.md` 移动)
|
|
58
|
-
3. **quickstart.md** - 快速入门指南(复制自英文版)
|
|
59
|
-
4. **testing-guide.md** - 详细测试指南(复制自英文版)
|
|
60
|
-
5. **setup-complete.md** - 设置完成指南(复制自英文版)
|
|
61
|
-
6. **installation-summary.md** - 安装摘要(复制自英文版)
|
|
62
|
-
7. **e2e-tests.md** - E2E 测试代码文档(复制自英文版)
|
|
63
|
-
|
|
64
|
-
### 更新的文件
|
|
65
|
-
|
|
66
|
-
更新了以下文件中的链接引用:
|
|
67
|
-
|
|
68
|
-
- ✅ `README.md` - 根目录 README,指向新位置
|
|
69
|
-
- ✅ `docs/README.md` - 文档总目录,更新所有链接
|
|
70
|
-
- ✅ `docs/en/index.md` - 英文文档入口,添加概述链接
|
|
71
|
-
- ✅ `docs/en/playwright/README.md` - 更新相关链接
|
|
72
|
-
- ✅ `docs/zh/playwright/README.md` - 更新相关链接
|
|
73
|
-
|
|
74
|
-
### 删除的文件
|
|
75
|
-
|
|
76
|
-
从 docs/en/ 和 docs/zh/ 删除(已移动到 playwright/ 子目录):
|
|
77
|
-
|
|
78
|
-
- ✅ `docs/en/playwright-testing.md` → `docs/en/playwright/overview.md`
|
|
79
|
-
- ✅ `docs/zh/playwright-testing.md` → `docs/zh/playwright/overview.md`
|
|
80
|
-
|
|
81
|
-
从项目根目录删除(已移动到 docs/):
|
|
82
|
-
|
|
83
|
-
- ✅ `PLAYWRIGHT_QUICKSTART.md`
|
|
84
|
-
- ✅ `PLAYWRIGHT_SETUP_COMPLETE.md`
|
|
85
|
-
- ✅ `PLAYWRIGHT_INSTALLATION_SUMMARY.md`
|
|
86
|
-
- ✅ `DOCS_REORGANIZATION.md` → `docs/REORGANIZATION.md`
|
|
87
|
-
|
|
88
|
-
### 保留的文件
|
|
89
|
-
|
|
90
|
-
- ✅ `e2e/README.md` - 保留在原位置,供开发者在 e2e 目录中直接查看
|
|
91
|
-
- ✅ 同时复制到 `docs/en/playwright/e2e-tests.md` 和 `docs/zh/playwright/e2e-tests.md`
|
|
92
|
-
|
|
93
|
-
## 📊 文档统计
|
|
94
|
-
|
|
95
|
-
### 总体统计
|
|
96
|
-
|
|
97
|
-
- **总文档数**: 46 个
|
|
98
|
-
- **Playwright 英文文档**: 7 个
|
|
99
|
-
- **Playwright 中文文档**: 7 个
|
|
100
|
-
- **其他英文文档**: 14 个
|
|
101
|
-
- **其他中文文档**: 14 个
|
|
102
|
-
- **导航和说明文档**: 4 个
|
|
103
|
-
|
|
104
|
-
### Playwright 完整文档列表
|
|
105
|
-
|
|
106
|
-
| 文档 | English | 中文 | 说明 |
|
|
107
|
-
| ----------------------- | ------- | ---- | ----------------- |
|
|
108
|
-
| README.md | ✅ | ✅ | 文档导航中心 |
|
|
109
|
-
| overview.md | ✅ | ✅ | 功能概述和介绍 ✨ |
|
|
110
|
-
| quickstart.md | ✅ | ✅ | 快速入门指南 |
|
|
111
|
-
| testing-guide.md | ✅ | ✅ | 详细测试参考手册 |
|
|
112
|
-
| setup-complete.md | ✅ | ✅ | 配置和故障排除 |
|
|
113
|
-
| installation-summary.md | ✅ | ✅ | 安装详情和统计 |
|
|
114
|
-
| e2e-tests.md | ✅ | ✅ | E2E 代码目录说明 |
|
|
115
|
-
|
|
116
|
-
### 文档内容统计
|
|
117
|
-
|
|
118
|
-
| 文档 | 字数(估算) | 主题数 |
|
|
119
|
-
| ----------------------- | ------------ | ------ |
|
|
120
|
-
| overview.md | ~1,500 | 6 |
|
|
121
|
-
| quickstart.md | ~2,500 | 10 |
|
|
122
|
-
| testing-guide.md | ~6,000 | 15 |
|
|
123
|
-
| setup-complete.md | ~3,000 | 8 |
|
|
124
|
-
| installation-summary.md | ~2,500 | 10 |
|
|
125
|
-
| e2e-tests.md | ~2,000 | 8 |
|
|
126
|
-
|
|
127
|
-
**总计**: ~17,500 字的 Playwright 文档
|
|
128
|
-
|
|
129
|
-
## 📖 文档说明
|
|
130
|
-
|
|
131
|
-
### 1. overview.md(概述)
|
|
132
|
-
|
|
133
|
-
**来源**: 从 `docs/en/playwright-testing.md` 移动
|
|
134
|
-
**内容**:
|
|
135
|
-
|
|
136
|
-
- Playwright 功能特性概览
|
|
137
|
-
- 快速开始指引
|
|
138
|
-
- 测试覆盖范围
|
|
139
|
-
- 资源链接
|
|
140
|
-
|
|
141
|
-
**用途**: 为想快速了解 Playwright 功能的用户提供概览
|
|
142
|
-
|
|
143
|
-
### 2. e2e-tests.md(E2E 测试代码文档)
|
|
144
|
-
|
|
145
|
-
**来源**: 从 `e2e/README.md` 复制
|
|
146
|
-
**内容**:
|
|
147
|
-
|
|
148
|
-
- E2E 目录结构说明
|
|
149
|
-
- 如何运行测试
|
|
150
|
-
- 如何编写测试
|
|
151
|
-
- Page Object Model 使用
|
|
152
|
-
- 测试最佳实践
|
|
153
|
-
|
|
154
|
-
**用途**: 为开发者提供 E2E 测试代码的详细说明
|
|
155
|
-
**注意**: 原文件 `e2e/README.md` 保留在原位置,方便在代码目录中直接查看
|
|
156
|
-
|
|
157
|
-
## 🎯 完整的访问路径
|
|
158
|
-
|
|
159
|
-
### 从根目录访问
|
|
160
|
-
|
|
161
|
-
```markdown
|
|
162
|
-
# README.md 中
|
|
163
|
-
|
|
164
|
-
### 🧪 测试文档
|
|
165
|
-
|
|
166
|
-
- [Playwright E2E 测试](./docs/zh/playwright/README.md)
|
|
167
|
-
- [概述](./docs/zh/playwright/overview.md) ✨
|
|
168
|
-
- [快速入门](./docs/zh/playwright/quickstart.md)
|
|
169
|
-
- [详细测试指南](./docs/zh/playwright/testing-guide.md)
|
|
170
|
-
```
|
|
171
|
-
|
|
172
|
-
### 从文档总目录访问
|
|
173
|
-
|
|
174
|
-
```markdown
|
|
175
|
-
# docs/README.md 中
|
|
176
|
-
|
|
177
|
-
### 🎭 Playwright E2E 测试
|
|
178
|
-
|
|
179
|
-
- [Playwright 英文文档](./en/playwright/README.md)
|
|
180
|
-
- [Overview](./en/playwright/overview.md) ✨
|
|
181
|
-
- [Playwright 中文文档](./zh/playwright/README.md)
|
|
182
|
-
- [概述](./zh/playwright/overview.md) ✨
|
|
183
|
-
```
|
|
184
|
-
|
|
185
|
-
### 从语言文档入口访问
|
|
186
|
-
|
|
187
|
-
```markdown
|
|
188
|
-
# docs/en/index.md 中
|
|
189
|
-
|
|
190
|
-
#### [Playwright E2E Testing](./playwright/README.md) 🎭
|
|
191
|
-
|
|
192
|
-
- Quick reference: [Playwright Overview](./playwright/overview.md) ✨
|
|
193
|
-
```
|
|
194
|
-
|
|
195
|
-
### 从 Playwright 文档中心访问
|
|
196
|
-
|
|
197
|
-
```markdown
|
|
198
|
-
# docs/en/playwright/README.md 中
|
|
199
|
-
|
|
200
|
-
## 📚 Documentation List
|
|
201
|
-
|
|
202
|
-
- [Overview](./overview.md) ✨ - Feature highlights
|
|
203
|
-
- [Quick Start Guide](./quickstart.md) ⭐
|
|
204
|
-
- [Detailed Testing Guide](./testing-guide.md)
|
|
205
|
-
- ...
|
|
206
|
-
```
|
|
207
|
-
|
|
208
|
-
## 🎨 优势总结
|
|
209
|
-
|
|
210
|
-
### 1. ✅ 完全集中
|
|
211
|
-
|
|
212
|
-
- **所有** Playwright 文档都在 playwright/ 子目录中
|
|
213
|
-
- 不再有零散的概述文档在外层
|
|
214
|
-
- 真正实现了分类管理
|
|
215
|
-
|
|
216
|
-
### 2. ✅ 按语言分类
|
|
217
|
-
|
|
218
|
-
- 英文文档: `docs/en/playwright/`
|
|
219
|
-
- 中文文档: `docs/zh/playwright/`
|
|
220
|
-
- 清晰的语言隔离
|
|
221
|
-
|
|
222
|
-
### 3. ✅ 结构清晰
|
|
223
|
-
|
|
224
|
-
- 每个语言的 playwright 目录包含 **7 个完整文档**
|
|
225
|
-
- 从概述到详细指南,从安装到测试编写,应有尽有
|
|
226
|
-
- 文档之间相互链接,导航便捷
|
|
227
|
-
|
|
228
|
-
### 4. ✅ 易于维护
|
|
229
|
-
|
|
230
|
-
- 所有 Playwright 文档集中在一个目录
|
|
231
|
-
- 便于批量更新和维护
|
|
232
|
-
- 添加新文档只需放入对应语言的 playwright/ 目录
|
|
233
|
-
|
|
234
|
-
### 5. ✅ 用户友好
|
|
235
|
-
|
|
236
|
-
- 多层次导航: 根目录 → docs → 语言 → playwright
|
|
237
|
-
- 概述文档提供快速了解
|
|
238
|
-
- 详细文档提供深入学习
|
|
239
|
-
- E2E 代码文档帮助实际开发
|
|
240
|
-
|
|
241
|
-
## 🚀 使用指南
|
|
242
|
-
|
|
243
|
-
### 快速查看 Playwright 功能
|
|
244
|
-
|
|
245
|
-
```bash
|
|
246
|
-
# 英文
|
|
247
|
-
cat docs/en/playwright/overview.md
|
|
248
|
-
|
|
249
|
-
# 中文
|
|
250
|
-
cat docs/zh/playwright/overview.md
|
|
251
|
-
```
|
|
252
|
-
|
|
253
|
-
### 快速上手
|
|
254
|
-
|
|
255
|
-
```bash
|
|
256
|
-
# 英文
|
|
257
|
-
cat docs/en/playwright/quickstart.md
|
|
258
|
-
|
|
259
|
-
# 中文
|
|
260
|
-
cat docs/zh/playwright/quickstart.md
|
|
261
|
-
```
|
|
262
|
-
|
|
263
|
-
### 深入学习
|
|
264
|
-
|
|
265
|
-
```bash
|
|
266
|
-
# 英文
|
|
267
|
-
cat docs/en/playwright/testing-guide.md
|
|
268
|
-
|
|
269
|
-
# 中文
|
|
270
|
-
cat docs/zh/playwright/testing-guide.md
|
|
271
|
-
```
|
|
272
|
-
|
|
273
|
-
### 查看 E2E 代码结构
|
|
274
|
-
|
|
275
|
-
```bash
|
|
276
|
-
# 英文
|
|
277
|
-
cat docs/en/playwright/e2e-tests.md
|
|
278
|
-
|
|
279
|
-
# 中文
|
|
280
|
-
cat docs/zh/playwright/e2e-tests.md
|
|
281
|
-
|
|
282
|
-
# 或者直接在 e2e 目录查看
|
|
283
|
-
cat e2e/README.md
|
|
284
|
-
```
|
|
285
|
-
|
|
286
|
-
## 📝 文档更新建议
|
|
287
|
-
|
|
288
|
-
### 对于开发者
|
|
289
|
-
|
|
290
|
-
1. 从 [overview.md](./en/playwright/overview.md) 开始了解功能
|
|
291
|
-
2. 通过 [quickstart.md](./en/playwright/quickstart.md) 快速上手
|
|
292
|
-
3. 参考 [testing-guide.md](./en/playwright/testing-guide.md) 编写测试
|
|
293
|
-
4. 查看 [e2e-tests.md](./en/playwright/e2e-tests.md) 了解代码结构
|
|
294
|
-
|
|
295
|
-
### 对于维护者
|
|
296
|
-
|
|
297
|
-
1. 所有 Playwright 新文档放入 `docs/en/playwright/` 或 `docs/zh/playwright/`
|
|
298
|
-
2. 同时维护中英文版本
|
|
299
|
-
3. 更新 README.md 中的文档列表
|
|
300
|
-
4. 确保链接正确
|
|
301
|
-
|
|
302
|
-
## ✅ 验证命令
|
|
303
|
-
|
|
304
|
-
```bash
|
|
305
|
-
# 查看完整的 playwright 目录
|
|
306
|
-
tree docs/en/playwright/ docs/zh/playwright/
|
|
307
|
-
|
|
308
|
-
# 验证文档数量(应该是每个目录 7 个文件)
|
|
309
|
-
ls docs/en/playwright/ | wc -l # 应该输出 7
|
|
310
|
-
ls docs/zh/playwright/ | wc -l # 应该输出 7
|
|
311
|
-
|
|
312
|
-
# 检查所有 Playwright 文档
|
|
313
|
-
find docs -path "*/playwright/*.md" -type f
|
|
314
|
-
|
|
315
|
-
# 验证链接(需要 markdown-link-check)
|
|
316
|
-
find docs -path "*/playwright/*.md" -exec markdown-link-check {} \;
|
|
317
|
-
```
|
|
318
|
-
|
|
319
|
-
## 🎉 最终总结
|
|
320
|
-
|
|
321
|
-
文档重组**完全完成**!现在:
|
|
322
|
-
|
|
323
|
-
✅ **所有 Playwright 文档**都集中在 `docs/[语言]/playwright/` 目录中
|
|
324
|
-
✅ **7 个完整文档**:概述、快速入门、详细指南、设置、安装、E2E 代码文档、README
|
|
325
|
-
✅ **双语支持**:英文和中文各有完整的 7 个文档
|
|
326
|
-
✅ **清晰导航**:从根目录到具体文档,层次分明
|
|
327
|
-
✅ **完整链接**:所有链接已更新到新位置
|
|
328
|
-
✅ **保留原文件**:`e2e/README.md` 保留在原位置
|
|
329
|
-
✅ **根目录整洁**:所有 Playwright 文档已移除
|
|
330
|
-
|
|
331
|
-
## 📍 快速访问
|
|
332
|
-
|
|
333
|
-
- **English**: [docs/en/playwright/README.md](./en/playwright/README.md)
|
|
334
|
-
- **中文**: [docs/zh/playwright/README.md](./zh/playwright/README.md)
|
|
335
|
-
- **Overview**: [docs/en/playwright/overview.md](./en/playwright/overview.md) | [docs/zh/playwright/overview.md](./zh/playwright/overview.md)
|
|
336
|
-
- **E2E Tests**: [docs/en/playwright/e2e-tests.md](./en/playwright/e2e-tests.md) | [e2e/README.md](../e2e/README.md)
|
|
337
|
-
|
|
338
|
-
---
|
|
339
|
-
|
|
340
|
-
**🎊 文档重组圆满完成!所有 Playwright 文档现在都整齐地按语言分类存放!**
|
|
@@ -1,290 +0,0 @@
|
|
|
1
|
-
# ✅ Playwright E2E 测试设置完成
|
|
2
|
-
|
|
3
|
-
## 📦 已创建的文件
|
|
4
|
-
|
|
5
|
-
### 配置文件
|
|
6
|
-
|
|
7
|
-
- ✅ `playwright.config.ts` - Playwright 主配置文件
|
|
8
|
-
- ✅ `tsconfig.e2e.json` - E2E 测试的 TypeScript 配置
|
|
9
|
-
- ✅ `.eslintignore` - ESLint 忽略文件(包含 e2e 目录)
|
|
10
|
-
- ✅ `.gitignore` - 已更新,包含测试结果和报告目录
|
|
11
|
-
- ✅ `.vscode/settings.json` - VS Code Playwright 配置
|
|
12
|
-
|
|
13
|
-
### E2E 测试目录结构
|
|
14
|
-
|
|
15
|
-
```
|
|
16
|
-
e2e/
|
|
17
|
-
├── fixtures/
|
|
18
|
-
│ └── base.fixture.ts # 自定义测试固件
|
|
19
|
-
├── pages/
|
|
20
|
-
│ ├── BasePage.ts # 基础页面对象模型
|
|
21
|
-
│ ├── HomePage.ts # 首页 POM
|
|
22
|
-
│ └── LoginPage.ts # 登录页 POM
|
|
23
|
-
├── tests/
|
|
24
|
-
│ ├── example.spec.ts # 示例测试(验证设置)
|
|
25
|
-
│ ├── home.spec.ts # 首页测试
|
|
26
|
-
│ ├── navigation.spec.ts # 导航测试
|
|
27
|
-
│ ├── auth.spec.ts # 认证测试
|
|
28
|
-
│ ├── i18n.spec.ts # 国际化测试
|
|
29
|
-
│ ├── accessibility.spec.ts # 可访问性测试
|
|
30
|
-
│ └── performance.spec.ts # 性能测试
|
|
31
|
-
└── utils/
|
|
32
|
-
└── test-helpers.ts # 测试辅助函数
|
|
33
|
-
```
|
|
34
|
-
|
|
35
|
-
### 文档
|
|
36
|
-
|
|
37
|
-
- ✅ `e2e/README.md` - E2E 测试详细文档
|
|
38
|
-
- ✅ `docs/playwright/quickstart.md` - 快速入门指南
|
|
39
|
-
- ✅ `docs/playwright/setup-complete.md` - 本文档
|
|
40
|
-
- ✅ `docs/playwright/installation-summary.md` - 安装摘要
|
|
41
|
-
- ✅ `docs/playwright/testing-guide.md` - 详细测试指南
|
|
42
|
-
- ✅ `docs/en/playwright-testing.md` - 英文概述
|
|
43
|
-
- ✅ `docs/zh/playwright-testing.md` - 中文概述
|
|
44
|
-
|
|
45
|
-
### CI/CD
|
|
46
|
-
|
|
47
|
-
- ✅ `.github/workflows/playwright.yml` - GitHub Actions 工作流
|
|
48
|
-
|
|
49
|
-
## 🚀 下一步操作
|
|
50
|
-
|
|
51
|
-
### 1. 安装依赖
|
|
52
|
-
|
|
53
|
-
由于遇到 npm 权限问题,请先修复权限:
|
|
54
|
-
|
|
55
|
-
```bash
|
|
56
|
-
sudo chown -R $(id -u):$(id -g) "$HOME/.npm"
|
|
57
|
-
```
|
|
58
|
-
|
|
59
|
-
然后安装 Playwright:
|
|
60
|
-
|
|
61
|
-
```bash
|
|
62
|
-
npm install -D @playwright/test playwright
|
|
63
|
-
npx playwright install
|
|
64
|
-
```
|
|
65
|
-
|
|
66
|
-
### 2. 运行测试
|
|
67
|
-
|
|
68
|
-
```bash
|
|
69
|
-
# 运行示例测试验证设置
|
|
70
|
-
npm run test:e2e -- e2e/example.spec.ts
|
|
71
|
-
|
|
72
|
-
# 运行所有测试
|
|
73
|
-
npm run test:e2e
|
|
74
|
-
|
|
75
|
-
# 使用 UI 模式(推荐)
|
|
76
|
-
npm run test:e2e:ui
|
|
77
|
-
```
|
|
78
|
-
|
|
79
|
-
### 3. 查看测试报告
|
|
80
|
-
|
|
81
|
-
```bash
|
|
82
|
-
npm run test:e2e:report
|
|
83
|
-
```
|
|
84
|
-
|
|
85
|
-
## 📋 可用的 npm 脚本
|
|
86
|
-
|
|
87
|
-
已在 `package.json` 中添加以下脚本:
|
|
88
|
-
|
|
89
|
-
| 命令 | 说明 |
|
|
90
|
-
| --------------------------- | ---------------------- |
|
|
91
|
-
| `npm run test:e2e` | 运行所有 E2E 测试 |
|
|
92
|
-
| `npm run test:e2e:ui` | 交互式 UI 模式 |
|
|
93
|
-
| `npm run test:e2e:headed` | 有头模式(显示浏览器) |
|
|
94
|
-
| `npm run test:e2e:debug` | 调试模式 |
|
|
95
|
-
| `npm run test:e2e:chromium` | 仅在 Chrome 上测试 |
|
|
96
|
-
| `npm run test:e2e:firefox` | 仅在 Firefox 上测试 |
|
|
97
|
-
| `npm run test:e2e:webkit` | 仅在 Safari 上测试 |
|
|
98
|
-
| `npm run test:e2e:report` | 查看测试报告 |
|
|
99
|
-
|
|
100
|
-
## 🎯 测试覆盖范围
|
|
101
|
-
|
|
102
|
-
### 功能测试
|
|
103
|
-
|
|
104
|
-
1. **首页测试** (`home.spec.ts`)
|
|
105
|
-
- 页面加载和渲染
|
|
106
|
-
- 导航菜单功能
|
|
107
|
-
- 响应式设计
|
|
108
|
-
- 语言本地化
|
|
109
|
-
|
|
110
|
-
2. **导航测试** (`navigation.spec.ts`)
|
|
111
|
-
- 页面间导航
|
|
112
|
-
- 404 错误处理
|
|
113
|
-
- 浏览器前进/后退
|
|
114
|
-
- 状态保持
|
|
115
|
-
|
|
116
|
-
3. **认证测试** (`auth.spec.ts`)
|
|
117
|
-
- 登录表单
|
|
118
|
-
- 表单验证
|
|
119
|
-
- 键盘导航
|
|
120
|
-
- 错误处理
|
|
121
|
-
|
|
122
|
-
### 质量测试
|
|
123
|
-
|
|
124
|
-
4. **国际化测试** (`i18n.spec.ts`)
|
|
125
|
-
- 语言切换
|
|
126
|
-
- 翻译完整性
|
|
127
|
-
- 语言偏好保存
|
|
128
|
-
- 无效语言处理
|
|
129
|
-
|
|
130
|
-
5. **可访问性测试** (`accessibility.spec.ts`)
|
|
131
|
-
- 文档结构
|
|
132
|
-
- 标题层级
|
|
133
|
-
- 图片 alt 文本
|
|
134
|
-
- 表单标签
|
|
135
|
-
- 键盘导航
|
|
136
|
-
- ARIA 角色
|
|
137
|
-
- 颜色对比
|
|
138
|
-
|
|
139
|
-
6. **性能测试** (`performance.spec.ts`)
|
|
140
|
-
- 页面加载时间
|
|
141
|
-
- First Contentful Paint
|
|
142
|
-
- 包大小
|
|
143
|
-
- 懒加载
|
|
144
|
-
- 内存泄漏检测
|
|
145
|
-
- 图片优化
|
|
146
|
-
|
|
147
|
-
## 🔧 配置说明
|
|
148
|
-
|
|
149
|
-
### Playwright 配置
|
|
150
|
-
|
|
151
|
-
在 `playwright.config.ts` 中配置的关键设置:
|
|
152
|
-
|
|
153
|
-
- **Base URL**: `http://localhost:3200`
|
|
154
|
-
- **测试浏览器**:
|
|
155
|
-
- Desktop: Chromium, Firefox, WebKit
|
|
156
|
-
- Mobile: Chrome (Pixel 5), Safari (iPhone 12)
|
|
157
|
-
- **自动启动开发服务器**
|
|
158
|
-
- **失败时自动截图和录像**
|
|
159
|
-
- **首次重试时记录 trace**
|
|
160
|
-
- **CI 模式优化**
|
|
161
|
-
|
|
162
|
-
### TypeScript 配置
|
|
163
|
-
|
|
164
|
-
`tsconfig.e2e.json` 包含 E2E 测试的 TypeScript 设置:
|
|
165
|
-
|
|
166
|
-
- 包含 `e2e/**` 和 `playwright.config.ts`
|
|
167
|
-
- Playwright 类型支持
|
|
168
|
-
- Node 类型支持
|
|
169
|
-
|
|
170
|
-
### ESLint 配置
|
|
171
|
-
|
|
172
|
-
已更新 `eslint.config.mjs` 和创建 `.eslintignore`:
|
|
173
|
-
|
|
174
|
-
- E2E 测试目录被排除在 linting 之外
|
|
175
|
-
- Playwright 配置文件被排除
|
|
176
|
-
|
|
177
|
-
## 🐛 故障排除
|
|
178
|
-
|
|
179
|
-
### ESLint 错误
|
|
180
|
-
|
|
181
|
-
如果看到关于 tsconfig 的 ESLint 错误,运行:
|
|
182
|
-
|
|
183
|
-
```bash
|
|
184
|
-
# 清除 ESLint 缓存
|
|
185
|
-
rm -rf .eslintcache
|
|
186
|
-
|
|
187
|
-
# 或者在 lint 时忽略 e2e 目录
|
|
188
|
-
npm run lint -- --ignore-pattern e2e/
|
|
189
|
-
```
|
|
190
|
-
|
|
191
|
-
### 测试超时
|
|
192
|
-
|
|
193
|
-
如果测试超时,检查:
|
|
194
|
-
|
|
195
|
-
1. 开发服务器是否运行在正确的端口 (3200)
|
|
196
|
-
2. 在 `playwright.config.ts` 中增加超时时间
|
|
197
|
-
3. 网络连接是否正常
|
|
198
|
-
|
|
199
|
-
### 浏览器安装问题
|
|
200
|
-
|
|
201
|
-
```bash
|
|
202
|
-
# 强制重新安装浏览器
|
|
203
|
-
npx playwright install --force
|
|
204
|
-
|
|
205
|
-
# Linux 系统安装依赖
|
|
206
|
-
npx playwright install-deps
|
|
207
|
-
```
|
|
208
|
-
|
|
209
|
-
## 📚 学习资源
|
|
210
|
-
|
|
211
|
-
### 项目内文档
|
|
212
|
-
|
|
213
|
-
- [快速入门指南](./quickstart.md) - 开始使用的最快方式
|
|
214
|
-
- [详细测试指南](./testing-guide.md) - 完整的测试指南
|
|
215
|
-
- [安装摘要](./installation-summary.md) - 安装详情
|
|
216
|
-
- [E2E 测试文档](../../e2e/README.md) - E2E 目录文档
|
|
217
|
-
|
|
218
|
-
### 外部资源
|
|
219
|
-
|
|
220
|
-
- [Playwright 官方文档](https://playwright.dev/)
|
|
221
|
-
- [Playwright 最佳实践](https://playwright.dev/docs/best-practices)
|
|
222
|
-
- [Playwright API 参考](https://playwright.dev/docs/api/class-playwright)
|
|
223
|
-
- [测试选择器](https://playwright.dev/docs/selectors)
|
|
224
|
-
|
|
225
|
-
## 💡 最佳实践提示
|
|
226
|
-
|
|
227
|
-
1. **使用 Page Object Model**
|
|
228
|
-
- 将页面交互封装在类中
|
|
229
|
-
- 提高代码复用性
|
|
230
|
-
- 便于维护
|
|
231
|
-
|
|
232
|
-
2. **使用语义化选择器**
|
|
233
|
-
|
|
234
|
-
```typescript
|
|
235
|
-
// ✅ 好的做法
|
|
236
|
-
await page.getByRole('button', { name: '登录' });
|
|
237
|
-
|
|
238
|
-
// ❌ 避免
|
|
239
|
-
await page.locator('.btn-primary');
|
|
240
|
-
```
|
|
241
|
-
|
|
242
|
-
3. **利用自动等待**
|
|
243
|
-
|
|
244
|
-
```typescript
|
|
245
|
-
// ✅ Playwright 自动等待
|
|
246
|
-
await expect(page.locator('.result')).toBeVisible();
|
|
247
|
-
|
|
248
|
-
// ❌ 避免硬编码等待
|
|
249
|
-
await page.waitForTimeout(3000);
|
|
250
|
-
```
|
|
251
|
-
|
|
252
|
-
4. **保持测试独立**
|
|
253
|
-
- 每个测试应该能独立运行
|
|
254
|
-
- 使用 `beforeEach` 设置初始状态
|
|
255
|
-
- 不依赖其他测试的结果
|
|
256
|
-
|
|
257
|
-
5. **测试用户旅程**
|
|
258
|
-
- 关注用户如何使用应用
|
|
259
|
-
- 而不是测试实现细节
|
|
260
|
-
|
|
261
|
-
## 🎉 恭喜!
|
|
262
|
-
|
|
263
|
-
Playwright E2E 测试已经成功设置!
|
|
264
|
-
|
|
265
|
-
你现在可以:
|
|
266
|
-
|
|
267
|
-
- ✅ 运行跨浏览器测试
|
|
268
|
-
- ✅ 使用 UI 模式交互式开发测试
|
|
269
|
-
- ✅ 自动捕获失败时的截图和视频
|
|
270
|
-
- ✅ 在 CI/CD 中自动运行测试
|
|
271
|
-
- ✅ 测试可访问性和性能
|
|
272
|
-
|
|
273
|
-
**下一步建议**:
|
|
274
|
-
|
|
275
|
-
1. 安装依赖并运行示例测试
|
|
276
|
-
2. 熟悉 Page Object Models
|
|
277
|
-
3. 根据你的应用编写自定义测试
|
|
278
|
-
4. 设置 CI/CD 流水线
|
|
279
|
-
5. 将 Playwright VS Code 扩展添加到推荐扩展
|
|
280
|
-
|
|
281
|
-
祝测试愉快!🚀
|
|
282
|
-
|
|
283
|
-
---
|
|
284
|
-
|
|
285
|
-
## 📞 需要帮助?
|
|
286
|
-
|
|
287
|
-
- 查看 [快速入门指南](./quickstart.md)
|
|
288
|
-
- 阅读 [详细测试指南](./testing-guide.md)
|
|
289
|
-
- 访问 [Playwright 官方文档](https://playwright.dev/)
|
|
290
|
-
- 查看示例测试 `e2e/example.spec.ts`
|