🔧(app-desk) trailingSlash options when build
Add trailingSlash options to next.config.js to be able to reach directly a page without adding ".html" at the end.
This commit is contained in:
@@ -1,6 +1,7 @@
|
|||||||
/** @type {import('next').NextConfig} */
|
/** @type {import('next').NextConfig} */
|
||||||
const nextConfig = {
|
const nextConfig = {
|
||||||
output: 'export',
|
output: 'export',
|
||||||
|
trailingSlash: true,
|
||||||
images: {
|
images: {
|
||||||
unoptimized: true,
|
unoptimized: true,
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -56,17 +56,17 @@ test.describe('Footer', () => {
|
|||||||
{
|
{
|
||||||
linkName: 'Legal Notice',
|
linkName: 'Legal Notice',
|
||||||
pageName: 'Legal Notice',
|
pageName: 'Legal Notice',
|
||||||
url: '/legal-notice',
|
url: '/legal-notice/',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
linkName: 'Personal data and cookies',
|
linkName: 'Personal data and cookies',
|
||||||
pageName: 'Personal data and cookies',
|
pageName: 'Personal data and cookies',
|
||||||
url: '/personal-data-cookies',
|
url: '/personal-data-cookies/',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
linkName: 'Accessibility: non-compliant',
|
linkName: 'Accessibility: non-compliant',
|
||||||
pageName: 'Accessibility statement',
|
pageName: 'Accessibility statement',
|
||||||
url: '/accessibility',
|
url: '/accessibility/',
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
for (const { linkName, url, pageName } of legalPages) {
|
for (const { linkName, url, pageName } of legalPages) {
|
||||||
|
|||||||
@@ -110,10 +110,10 @@ test.describe('Mail domain', () => {
|
|||||||
|
|
||||||
await clickOnMailDomainsNavButton(page);
|
await clickOnMailDomainsNavButton(page);
|
||||||
|
|
||||||
await expect(page).toHaveURL(/mail-domains/);
|
await expect(page).toHaveURL(/mail-domains\//);
|
||||||
|
|
||||||
await page.getByRole('listbox').first().getByText('domain.fr').click();
|
await page.getByRole('listbox').first().getByText('domain.fr').click();
|
||||||
await expect(page).toHaveURL(/mail-domains\/domainfr/);
|
await expect(page).toHaveURL(/mail-domains\/domainfr\//);
|
||||||
|
|
||||||
await expect(
|
await expect(
|
||||||
page.getByRole('heading', { name: /domain\.fr/ }).first(),
|
page.getByRole('heading', { name: /domain\.fr/ }).first(),
|
||||||
@@ -192,10 +192,10 @@ test.describe('Mail domain', () => {
|
|||||||
|
|
||||||
await clickOnMailDomainsNavButton(page);
|
await clickOnMailDomainsNavButton(page);
|
||||||
|
|
||||||
await expect(page).toHaveURL(/mail-domains/);
|
await expect(page).toHaveURL(/mail-domains\//);
|
||||||
|
|
||||||
await page.getByRole('listbox').first().getByText('domain.fr').click();
|
await page.getByRole('listbox').first().getByText('domain.fr').click();
|
||||||
await expect(page).toHaveURL(/mail-domains\/domainfr/);
|
await expect(page).toHaveURL(/mail-domains\/domainfr\//);
|
||||||
|
|
||||||
await expect(
|
await expect(
|
||||||
page.getByRole('heading', { name: 'domain.fr' }),
|
page.getByRole('heading', { name: 'domain.fr' }),
|
||||||
|
|||||||
@@ -49,7 +49,7 @@ test.describe('Mail domains', () => {
|
|||||||
.getByLabel(`Mail Domains button`)
|
.getByLabel(`Mail Domains button`)
|
||||||
.click();
|
.click();
|
||||||
|
|
||||||
await expect(page).toHaveURL(/mail-domains/);
|
await expect(page).toHaveURL(/mail-domains\//);
|
||||||
|
|
||||||
const responsePromiseSortDesc = page.waitForResponse(
|
const responsePromiseSortDesc = page.waitForResponse(
|
||||||
(response) =>
|
(response) =>
|
||||||
@@ -105,7 +105,7 @@ test.describe('Mail domains', () => {
|
|||||||
.first()
|
.first()
|
||||||
.getByLabel(`Mail Domains button`)
|
.getByLabel(`Mail Domains button`)
|
||||||
.click();
|
.click();
|
||||||
await expect(page).toHaveURL(/mail-domains/);
|
await expect(page).toHaveURL(/mail-domains\//);
|
||||||
await expect(
|
await expect(
|
||||||
page.getByLabel('mail domains panel', { exact: true }),
|
page.getByLabel('mail domains panel', { exact: true }),
|
||||||
).toBeVisible();
|
).toBeVisible();
|
||||||
@@ -129,7 +129,7 @@ test.describe('Mail domains', () => {
|
|||||||
.first()
|
.first()
|
||||||
.getByLabel(`Mail Domains button`)
|
.getByLabel(`Mail Domains button`)
|
||||||
.click();
|
.click();
|
||||||
await expect(page).toHaveURL(/mail-domains/);
|
await expect(page).toHaveURL(/mail-domains\//);
|
||||||
await expect(
|
await expect(
|
||||||
page.getByLabel('mail domains panel', { exact: true }),
|
page.getByLabel('mail domains panel', { exact: true }),
|
||||||
).toBeVisible();
|
).toBeVisible();
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ test.describe('Menu', () => {
|
|||||||
{
|
{
|
||||||
name: 'Mail Domains',
|
name: 'Mail Domains',
|
||||||
isDefault: false,
|
isDefault: false,
|
||||||
expectedUrl: '/mail-domains',
|
expectedUrl: '/mail-domains/',
|
||||||
expectedText: 'Mail Domains',
|
expectedText: 'Mail Domains',
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|||||||
@@ -90,9 +90,9 @@ test.describe('Teams Create', () => {
|
|||||||
|
|
||||||
await expect(buttonCreateHomepage).toBeVisible();
|
await expect(buttonCreateHomepage).toBeVisible();
|
||||||
|
|
||||||
await page.goto('/teams');
|
await page.goto('/teams/');
|
||||||
await expect(buttonCreateHomepage).toBeVisible();
|
await expect(buttonCreateHomepage).toBeVisible();
|
||||||
await expect(page).toHaveURL(/\/teams$/);
|
await expect(page).toHaveURL(/\/teams\//);
|
||||||
});
|
});
|
||||||
|
|
||||||
test('checks error when duplicate team', async ({ page, browserName }) => {
|
test('checks error when duplicate team', async ({ page, browserName }) => {
|
||||||
|
|||||||
Reference in New Issue
Block a user