diff --git a/backend/seeders/seed.js b/backend/seeders/seed.js index 15a26bc..aa7292f 100644 --- a/backend/seeders/seed.js +++ b/backend/seeders/seed.js @@ -89,7 +89,7 @@ module.exports = { detail: "Test Plat's Manual test", userId: 1, isPublic: true, - createdAt: new Date(), + createdAt: new Date(2024, 5, 4), updatedAt: new Date(), }, { @@ -97,7 +97,15 @@ module.exports = { detail: 'リリース前総合評価', userId: 1, isPublic: true, - createdAt: new Date(), + createdAt: new Date(2024, 6, 10), + updatedAt: new Date(), + }, + { + name: 'MS200', + detail: '', + userId: 1, + isPublic: true, + createdAt: new Date(2024, 6, 24), updatedAt: new Date(), }, ]); @@ -139,6 +147,20 @@ module.exports = { createdAt: new Date(), updatedAt: new Date(), }, + { + name: 'Chart', + detail: '', + projectId: 1, + createdAt: new Date(), + updatedAt: new Date(), + }, + { + name: 'Simulate', + detail: '', + projectId: 1, + createdAt: new Date(), + updatedAt: new Date(), + }, ]); // Add runs table records @@ -342,6 +364,104 @@ module.exports = { createdAt: new Date(), updatedAt: new Date(), }, + { + title: 'Chart display', + state: 1, + priority: 1, + type: 4, + automationStatus: 1, + description: '', + template: 0, + preConditions: '', + expectedResults: '', + folderId: 6, + createdAt: new Date(), + updatedAt: new Date(), + }, + { + title: 'Chart update', + state: 1, + priority: 1, + type: 4, + automationStatus: 1, + description: '', + template: 0, + preConditions: '', + expectedResults: '', + folderId: 6, + createdAt: new Date(), + updatedAt: new Date(), + }, + { + title: 'Chart palette color change', + state: 1, + priority: 1, + type: 4, + automationStatus: 1, + description: '', + template: 0, + preConditions: '', + expectedResults: '', + folderId: 6, + createdAt: new Date(), + updatedAt: new Date(), + }, + { + title: 'Simlation exec', + state: 1, + priority: 1, + type: 4, + automationStatus: 1, + description: '', + template: 0, + preConditions: '', + expectedResults: '', + folderId: 7, + createdAt: new Date(), + updatedAt: new Date(), + }, + { + title: 'Simlation update', + state: 1, + priority: 1, + type: 4, + automationStatus: 1, + description: '', + template: 0, + preConditions: '', + expectedResults: '', + folderId: 7, + createdAt: new Date(), + updatedAt: new Date(), + }, + { + title: 'Simlation result palette color', + state: 1, + priority: 1, + type: 4, + automationStatus: 1, + description: '', + template: 0, + preConditions: '', + expectedResults: '', + folderId: 7, + createdAt: new Date(), + updatedAt: new Date(), + }, + { + title: 'Simlation button disable condition', + state: 1, + priority: 1, + type: 4, + automationStatus: 1, + description: '', + template: 0, + preConditions: '', + expectedResults: '', + folderId: 7, + createdAt: new Date(), + updatedAt: new Date(), + }, ]); // Add steps table records @@ -490,15 +610,64 @@ module.exports = { runId: 1, caseId: 1, status: 1, - createdAt: new Date(), - updatedAt: new Date(), + createdAt: new Date(2024, 5, 15), + updatedAt: new Date(2024, 5, 15), }, { runId: 1, caseId: 2, status: 1, - createdAt: new Date(), - updatedAt: new Date(), + createdAt: new Date(2024, 5, 15), + updatedAt: new Date(2024, 5, 15), + }, + { + runId: 1, + caseId: 13, + status: 1, + createdAt: new Date(2024, 5, 18), + updatedAt: new Date(2024, 5, 18), + }, + { + runId: 1, + caseId: 14, + status: 1, + createdAt: new Date(2024, 5, 18), + updatedAt: new Date(2024, 5, 18), + }, + { + runId: 1, + caseId: 15, + status: 1, + createdAt: new Date(2024, 5, 18), + updatedAt: new Date(2024, 5, 18), + }, + { + runId: 1, + caseId: 16, + status: 0, + createdAt: new Date(2024, 5, 15), + updatedAt: new Date(2024, 5, 15), + }, + { + runId: 1, + caseId: 17, + status: 0, + createdAt: new Date(2024, 5, 16), + updatedAt: new Date(2024, 5, 16), + }, + { + runId: 1, + caseId: 18, + status: 2, + createdAt: new Date(2024, 5, 16), + updatedAt: new Date(2024, 5, 16), + }, + { + runId: 1, + caseId: 19, + status: 3, + createdAt: new Date(2024, 5, 17), + updatedAt: new Date(2024, 5, 17), }, ]); diff --git a/frontend/config/config.ts b/frontend/config/config.ts index 2e7fb04..52f9692 100644 --- a/frontend/config/config.ts +++ b/frontend/config/config.ts @@ -1,5 +1,8 @@ const Config = { apiServer: process.env.NEXT_PUBLIC_BACKEND_ORIGIN || 'http://localhost:8001', + + // set 'NEXT_PUBLIC_IS_DEMO=true' in frontend/.env + isDemoSite: process.env.NEXT_PUBLIC_IS_DEMO === 'true' || false, }; export default Config; diff --git a/frontend/messages/en.json b/frontend/messages/en.json index ddf6ca6..486c725 100644 --- a/frontend/messages/en.json +++ b/frontend/messages/en.json @@ -12,15 +12,20 @@ "usability_detail": "The defined test cases can be used over and over again in test runs. The status of test runs and projects can be viewed graphically.", "universal_title": "Universal", "universal_detail": "Multi language support and dark theme allow anyone to use the system without any inconvenience.", - "organize_test_cases": "Organize test cases and manage tests graphically", - "case_edit": "Test Cases", - "case_home": "Dashboard", - "case_run": "Test Runs" + "project_title": "Project-Based", + "project_subtitle": "Manage test cases and test runs on a project-by-project basis. Our dashboard provides an at-a-glance view of the types of test cases and their progress for each project. This allows you to monitor project status in real-time and manage efficiently.", + "case_management_title": "Test Case Management", + "case_management_subtitle": "Create folders within projects and define test cases with ease using our modern and intuitive UI. Aattaching files enables detailed explanations of test cases, making it easy to share information across the entire team.", + "run_management_title": "Test Run Management", + "run_management_subtitle": "Defined test cases can be reused multiple times in test runs, enabling efficient test cycles. Additionally, you can visually monitor the status of test runs and projects.", + "member_management_title": "Member Management", + "member_management_subtitle": "Support team development by adding or removing members from projects. You can assign roles and set permissions for each member in detail. We provide three main roles: 'Administrator' who manages the entire project, 'Designer' who designs the tests, and 'Reporter' who executes the tests. " }, "Header": { "title": "Open Source Test Case Management System", "description": "Integrate and manage all your software testing", "docs": "Docs", + "roadmap": "Roadmap", "projects": "Projects", "admin": "Administration", "account": "Account", @@ -54,6 +59,7 @@ "email_not_exist": "Email address not found", "signup_error": "Sign up failed", "signin_error": "Sign in failed", + "demo_page_warning": "This is a demo environment, any data you enter will be reset periodically.", "your_projects": "Your Projects", "public": "Public", "private": "Private", diff --git a/frontend/messages/ja.json b/frontend/messages/ja.json index c8945a8..d906fda 100644 --- a/frontend/messages/ja.json +++ b/frontend/messages/ja.json @@ -12,15 +12,20 @@ "usability_detail": "定義したテストケースはテストランで何度も繰り返し使用可能です。テストランやプロジェクトのステータスをグラフで確認できます。", "universal_title": "ユニバーサル", "universal_detail": "多言語対応やダークテーマ機能により誰もが不自由なく使うことができます。", - "organize_test_cases": "テストケースを整理とグラフィカルなテスト管理", - "case_edit": "テストケース", - "case_home": "ダッシュボード", - "case_run": "テストラン" + "project_title": "プロジェクトベース", + "project_subtitle": "プロジェクトごとにテストケースやテスト実行を管理します。各プロジェクトのテストケースの種類や進捗状況を一目で把握できるダッシュボード機能により、プロジェクトのステータスをリアルタイムで監視し、効率的に管理することが可能です。", + "case_management_title": "テストケース管理", + "case_management_subtitle": "プロジェクト内にフォルダーを作成し、テストケースを定義します。モダンで直感的なUIにより、フォルダーやテストケースの作成が簡単に行えます。ファイルを添付することでテストケースを詳細に説明し、チーム全体で共有することが可能です。", + "run_management_title": "テストラン管理", + "run_management_subtitle": "定義したテストケースはテストランで何度も繰り返し使用可能です。これにより、効率的なテストサイクルを実現します。さらに、テストランやプロジェクトのステータスを視覚的に把握できます。", + "member_management_title": "メンバー管理", + "member_management_subtitle": "プロジェクトにメンバーを追加/削除してチーム開発をサポートします。各メンバーに役割を設定し、権限を細かく管理することが可能です。プロジェクト全体を管理する「管理者」、テストの設計を行う「設計者」、テストの実行を担う「報告者」の3つの主要な役割を提供しています。" }, "Header": { "title": "オープンソーステストケース管理システム", "description": "ソフトウェア開発にかかわるすべてのテストを統合管理", "docs": "ドキュメント", + "roadmap": "ロードマップ", "projects": "プロジェクト", "admin": "管理", "account": "アカウント", @@ -53,6 +58,7 @@ "email_not_exist": "メールアドレスが見つかりません", "signup_error": "新規登録に失敗しました", "signin_error": "サインインに失敗しました", + "demo_page_warning": "これはデモ環境です。入力したデータは定期的にリセットされます。", "your_projects": "保有プロジェクト", "public": "パブリック", "private": "プライベート", diff --git a/frontend/public/top/caseEdit.png b/frontend/public/top/caseEdit.png deleted file mode 100644 index c981bd4..0000000 Binary files a/frontend/public/top/caseEdit.png and /dev/null differ diff --git a/frontend/public/top/caseHome.png b/frontend/public/top/caseHome.png deleted file mode 100644 index a4dfb54..0000000 Binary files a/frontend/public/top/caseHome.png and /dev/null differ diff --git a/frontend/public/top/caseRun.png b/frontend/public/top/caseRun.png deleted file mode 100644 index 65714fd..0000000 Binary files a/frontend/public/top/caseRun.png and /dev/null differ diff --git a/frontend/public/top/dark/case.png b/frontend/public/top/dark/case.png new file mode 100644 index 0000000..38ca2c4 Binary files /dev/null and b/frontend/public/top/dark/case.png differ diff --git a/frontend/public/top/dark/member.png b/frontend/public/top/dark/member.png new file mode 100644 index 0000000..b0fde19 Binary files /dev/null and b/frontend/public/top/dark/member.png differ diff --git a/frontend/public/top/dark/project.png b/frontend/public/top/dark/project.png new file mode 100644 index 0000000..7d28b9a Binary files /dev/null and b/frontend/public/top/dark/project.png differ diff --git a/frontend/public/top/dark/run.png b/frontend/public/top/dark/run.png new file mode 100644 index 0000000..f23ff6c Binary files /dev/null and b/frontend/public/top/dark/run.png differ diff --git a/frontend/public/top/light/case.png b/frontend/public/top/light/case.png new file mode 100644 index 0000000..01f2eb1 Binary files /dev/null and b/frontend/public/top/light/case.png differ diff --git a/frontend/public/top/light/member.png b/frontend/public/top/light/member.png new file mode 100644 index 0000000..1320721 Binary files /dev/null and b/frontend/public/top/light/member.png differ diff --git a/frontend/public/top/light/project.png b/frontend/public/top/light/project.png new file mode 100644 index 0000000..872c7c4 Binary files /dev/null and b/frontend/public/top/light/project.png differ diff --git a/frontend/public/top/light/run.png b/frontend/public/top/light/run.png new file mode 100644 index 0000000..94a8fcf Binary files /dev/null and b/frontend/public/top/light/run.png differ diff --git a/frontend/src/app/[locale]/DemoImage.tsx b/frontend/src/app/[locale]/DemoImage.tsx new file mode 100644 index 0000000..59ab3fb --- /dev/null +++ b/frontend/src/app/[locale]/DemoImage.tsx @@ -0,0 +1,32 @@ +'use client'; +import { Image } from '@nextui-org/react'; +import { useState, useEffect } from 'react'; +import { useTheme } from 'next-themes'; + +type Props = { + imageName: string; + altText: string; +}; + +export default function DemoImage({ imageName, altText }: Props) { + const { theme, setTheme } = useTheme(); + const [currentTheme, setCurrentTheme] = useState('light'); + + useEffect(() => { + if (theme) { + setCurrentTheme(theme); + } + }, [theme]); + + return ( + <> + {altText} + + ); +} diff --git a/frontend/src/app/[locale]/Header.tsx b/frontend/src/app/[locale]/Header.tsx index 0132fab..bfd4cb4 100644 --- a/frontend/src/app/[locale]/Header.tsx +++ b/frontend/src/app/[locale]/Header.tsx @@ -4,9 +4,10 @@ import HeaderNavbarMenu from './HeaderNavbarMenu'; export default function Header(params: { locale: string }) { const t = useTranslations('Header'); const messages = { - docs: t('docs'), projects: t('projects'), admin: t('admin'), + docs: t('docs'), + roadmap: t('roadmap'), account: t('account'), signUp: t('signup'), signIn: t('signin'), diff --git a/frontend/src/app/[locale]/HeaderNavbarMenu.tsx b/frontend/src/app/[locale]/HeaderNavbarMenu.tsx index fbbb20b..8425719 100644 --- a/frontend/src/app/[locale]/HeaderNavbarMenu.tsx +++ b/frontend/src/app/[locale]/HeaderNavbarMenu.tsx @@ -28,6 +28,7 @@ type NabbarMenuMessages = { projects: string; admin: string; docs: string; + roadmap: string; account: string; signUp: string; signIn: string; @@ -58,6 +59,12 @@ export default function HeaderNavbarMenu({ messages, locale }: Props) { label: messages.docs, isExternal: true, }, + { + uid: 'roadmap', + href: 'https://kimatata.github.io/unittcms/docs/roadmap/', + label: messages.roadmap, + isExternal: true, + }, ]; const router = useRouter(); @@ -86,7 +93,7 @@ export default function HeaderNavbarMenu({ messages, locale }: Props) { - 1.0.0-alpha.13 + 1.0.0-beta @@ -95,12 +102,11 @@ export default function HeaderNavbarMenu({ messages, locale }: Props) { } > - {messages.docs} + {link.label} ) : ( @@ -156,7 +162,7 @@ export default function HeaderNavbarMenu({ messages, locale }: Props) { title={link.label} startContent={} onPress={() => { - router.push(link.href, { locale: locale }); + window.open(link.href, '_blank'); setIsMenuOpen(false); }} /> diff --git a/frontend/src/app/[locale]/PaneDemoImages.tsx b/frontend/src/app/[locale]/PaneDemoImages.tsx deleted file mode 100644 index baeef2e..0000000 --- a/frontend/src/app/[locale]/PaneDemoImages.tsx +++ /dev/null @@ -1,76 +0,0 @@ -'use client'; -import { title } from '@/components/primitives'; -import { useState, useEffect } from 'react'; -import { Tabs, Tab, Image } from '@nextui-org/react'; - -type PaneDemoImagesMessages = { - title: string; - caseEdit: string; - caseHome: string; - caseRun: string; -}; -type Props = { - messages: PaneDemoImagesMessages; -}; - -export default function DemoImages({ messages }: Props) { - const [currentTab, setcurrentTab] = useState('edit'); - const [currentImage, setcurrentImage] = useState({ - src: '/top/caseEdit.png', - alt: messages.caseEdit, - }); - const tabs = [ - { - key: 'edit', - title: messages.caseEdit, - src: '/top/caseEdit.png', - alt: messages.caseEdit, - }, - { - key: 'home', - title: messages.caseHome, - src: '/top/caseHome.png', - alt: messages.caseHome, - }, - { - key: 'run', - title: messages.caseRun, - src: '/top/caseRun.png', - alt: messages.caseRun, - }, - ]; - - useEffect(() => { - const found = tabs.find((tab) => tab.key === currentTab); - const newImage = { src: found.src, alt: found.title }; - setcurrentImage(newImage); - }, [currentTab]); - - return ( - <> -
-
-

{messages.title}

-
- - {tabs.map((tab) => ( - - ))} - -
- -
- {currentImage.alt} -
-
- - ); -} diff --git a/frontend/src/app/[locale]/account/authPage.tsx b/frontend/src/app/[locale]/account/authPage.tsx index dcb7afa..1961890 100644 --- a/frontend/src/app/[locale]/account/authPage.tsx +++ b/frontend/src/app/[locale]/account/authPage.tsx @@ -10,6 +10,8 @@ import { signUp, signIn, signInAsGuest } from './authControl'; import { isValidEmail, isValidPassword } from './validate'; import { TokenContext } from '@/utils/TokenProvider'; import { useRouter } from '@/src/navigation'; +import Config from '@/config/config'; +const isDemoSite = Config.isDemoSite; type Props = { isSignup: Boolean; @@ -166,11 +168,14 @@ export default function AuthPage({ isSignup, messages, locale }: Props) { }} /> )} + + {isDemoSite &&
{messages.demoPageWarning}
} +
- {!isSignup && ( + {!isSignup && isDemoSite && (
- +
+ {demoImages.map((demoImage) => ( +
+
+

{demoImage.title}

+

{demoImage.subTitle}

+
+ +
+ +
+
+ ))} +
diff --git a/frontend/types/user.ts b/frontend/types/user.ts index 975c8a7..f0c3933 100644 --- a/frontend/types/user.ts +++ b/frontend/types/user.ts @@ -61,6 +61,7 @@ export type AuthMessages = { emailNotExist: string; signupError: string; signinError: string; + demoPageWarning: string; }; export type AdminMessages = {