Update homepage routes to include language and mode
Build & Deploy / Build & Push Docker Image (push) Successful in 2m51s
Test / Type Check (all packages) (push) Successful in 52s
Build & Deploy / Deploy to VPS (push) Successful in 4s
Test / API Unit Tests (push) Successful in 49s
Test / Homepage Unit Tests (push) Successful in 44s
Test / Storefront Unit Tests (push) Successful in 39s
Test / Admin Unit Tests (push) Successful in 40s
Test / Dashboard Unit Tests (push) Successful in 40s
Test / API Integration Tests (push) Successful in 1m0s

This commit is contained in:
root
2026-07-02 14:10:17 -04:00
parent 56c3bcf666
commit 781512399b
51 changed files with 792 additions and 344 deletions
+7 -7
View File
@@ -6,7 +6,7 @@ for (const scenario of [
{ locale: 'ar', dir: 'rtl' },
] as const) {
test(`${scenario.locale} homepage assembles the approved section sequence`, async ({ page }) => {
await page.goto(`/${scenario.locale}`);
await page.goto(`/${scenario.locale}/system`);
await expect(page.locator('html')).toHaveAttribute('dir', scenario.dir);
await expect(page.locator('main h1')).toHaveCount(1);
@@ -19,7 +19,7 @@ for (const scenario of [
});
test(`${scenario.locale} unresolved actions remain non-navigable`, async ({ page }) => {
await page.goto(`/${scenario.locale}`);
await page.goto(`/${scenario.locale}/system`);
const disabledActions = page.locator('main [aria-disabled="true"]');
await expect(disabledActions).toHaveCount(2);
@@ -28,22 +28,22 @@ for (const scenario of [
}
test('Arabic preview preserves left-to-right vehicle identifiers', async ({ page }) => {
await page.goto('/ar');
await page.goto('/ar/system');
const identifiers = page.locator('[role="table"] bdi');
await expect(identifiers).toHaveCount(2);
await expect(identifiers.first()).toHaveAttribute('dir', 'ltr');
});
test('homepage navigation targets resolve to real sections', async ({ page }) => {
await page.goto('/en');
await page.goto('/en/system');
for (const hash of ['product', 'workflow', 'modules', 'pricing', 'faq']) {
await expect(page.locator(`#${hash}`)).toHaveCount(1);
await expect(page.locator(`header a[href="/en#${hash}"]`)).toHaveCount(2);
await expect(page.locator(`header a[href="/en/system#${hash}"]`)).toHaveCount(2);
}
});
test('FAQ uses native disclosure behavior', async ({ page }) => {
await page.goto('/en');
await page.goto('/en/system');
const firstItem = page.locator('#faq details').first();
await expect(firstItem).toHaveAttribute('open', '');
await firstItem.locator('summary').click();
@@ -51,7 +51,7 @@ test('FAQ uses native disclosure behavior', async ({ page }) => {
});
test('pricing recommends a plan from the selected fleet band', async ({ page }) => {
await page.goto('/en');
await page.goto('/en/system');
await expect(page.locator('#pricing [data-plan="launch"]')).toHaveAttribute(
'data-recommended',