feat: Introduce core authentication service, several new admin management pages, and instructor feature tests.
All checks were successful
Build and Deploy Frontend Management to Dev Server / Build Frontend Management Docker Image (push) Successful in 52s
Build and Deploy Frontend Management to Dev Server / Deploy E-learning Frontend Management to Dev Server (push) Successful in 4s
Build and Deploy Frontend Management to Dev Server / Notify Deployment Status (push) Successful in 1s

This commit is contained in:
Missez 2026-03-06 11:24:10 +07:00
parent 000f9eea5c
commit 0205aab461
11 changed files with 818 additions and 121 deletions

View file

@ -11,25 +11,11 @@ test.describe('Instructor Dashboard', () => {
await page.waitForLoadState('networkidle');
});
test('should display welcome message', async ({ page }) => {
await expect(page.locator('h1')).toContainText('สวัสดี');
});
test('should display stats cards', async ({ page }) => {
test('check display dashboard', async ({ page }) => {
await expect(page.getByText('หลักสูตรทั้งหมด')).toBeVisible();
await expect(page.getByText('ผู้เรียนทั้งหมด')).toBeVisible();
await expect(page.getByText('เรียนจบแล้ว')).toBeVisible();
});
test('should display course status breakdown', async ({ page }) => {
await expect(page.getByText('สถานะหลักสูตร')).toBeVisible();
await expect(page.getByText('เผยแพร่แล้ว')).toBeVisible();
await expect(page.getByText('รอตรวจสอบ')).toBeVisible();
await expect(page.getByText('แบบร่าง')).toBeVisible();
});
test('should display recent courses section', async ({ page }) => {
await expect(page.getByText('หลักสูตร')).toBeVisible();
await expect(page.getByRole('button', { name: 'ดูทั้งหมด' })).toBeVisible();
});
@ -43,7 +29,6 @@ test.describe('Instructor Dashboard', () => {
await page.locator('.w-12.h-12.rounded-full').click();
await expect(page.getByText('โปรไฟล์')).toBeVisible();
await expect(page.getByText('ออกจากระบบ')).toBeVisible();
});
test('should navigate to profile', async ({ page }) => {
@ -56,10 +41,10 @@ test.describe('Instructor Dashboard', () => {
test('should logout and redirect to login', async ({ page }) => {
await page.locator('.w-12.h-12.rounded-full').click();
await page.getByText('ออกจากระบบ').click();
await page.getByRole('menu').getByText('ออกจากระบบ').click();
// Confirm logout dialog
await page.locator('.q-dialog').getByText('ออกจากระบบ').click();
await page.locator('.q-dialog').getByRole('button', { name: 'ออกจากระบบ' }).click();
await page.waitForURL('**/login**', { timeout: 10_000 });
await expect(page).toHaveURL(/\/login/);