⚰️(front) remove unused code after UI v2
The linter was unhappy, so I removed the unused variables or code.
This commit is contained in:
@@ -8,7 +8,7 @@ test.beforeEach(async ({ page, browserName }) => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
test.describe('Header', () => {
|
test.describe('Header', () => {
|
||||||
test('checks all the elements are visible', async ({ page, browserName }) => {
|
test('checks all the elements are visible', async ({ page }) => {
|
||||||
const header = page.locator('header').first();
|
const header = page.locator('header').first();
|
||||||
|
|
||||||
await expect(header.getByText('La Régie')).toBeVisible();
|
await expect(header.getByText('La Régie')).toBeVisible();
|
||||||
|
|||||||
@@ -14,6 +14,7 @@ const mailDomainsFixtures: MailDomain[] = [
|
|||||||
updated_at: currentDateIso,
|
updated_at: currentDateIso,
|
||||||
slug: 'domainfr',
|
slug: 'domainfr',
|
||||||
status: 'enabled',
|
status: 'enabled',
|
||||||
|
support_email: 'support@domain.fr',
|
||||||
abilities: {
|
abilities: {
|
||||||
get: true,
|
get: true,
|
||||||
patch: true,
|
patch: true,
|
||||||
@@ -30,6 +31,7 @@ const mailDomainsFixtures: MailDomain[] = [
|
|||||||
updated_at: currentDateIso,
|
updated_at: currentDateIso,
|
||||||
slug: 'mailsfr',
|
slug: 'mailsfr',
|
||||||
status: 'enabled',
|
status: 'enabled',
|
||||||
|
support_email: 'support@mails.fr',
|
||||||
abilities: {
|
abilities: {
|
||||||
get: true,
|
get: true,
|
||||||
patch: true,
|
patch: true,
|
||||||
@@ -46,6 +48,7 @@ const mailDomainsFixtures: MailDomain[] = [
|
|||||||
updated_at: currentDateIso,
|
updated_at: currentDateIso,
|
||||||
slug: 'versaillesnet',
|
slug: 'versaillesnet',
|
||||||
status: 'enabled',
|
status: 'enabled',
|
||||||
|
support_email: 'support@versailles.net',
|
||||||
abilities: {
|
abilities: {
|
||||||
get: true,
|
get: true,
|
||||||
patch: true,
|
patch: true,
|
||||||
@@ -62,6 +65,7 @@ const mailDomainsFixtures: MailDomain[] = [
|
|||||||
updated_at: currentDateIso,
|
updated_at: currentDateIso,
|
||||||
slug: 'parisfr',
|
slug: 'parisfr',
|
||||||
status: 'enabled',
|
status: 'enabled',
|
||||||
|
support_email: 'support@paris.fr',
|
||||||
abilities: {
|
abilities: {
|
||||||
get: true,
|
get: true,
|
||||||
patch: true,
|
patch: true,
|
||||||
@@ -134,14 +138,6 @@ const interceptCommonApiRequests = async (
|
|||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
const navigateToMailboxCreationFormForMailDomainFr = async (
|
|
||||||
page: Page,
|
|
||||||
): Promise<void> => {
|
|
||||||
await page.goto('/mail-domains');
|
|
||||||
await page.getByLabel(`domain.fr listboxDomains button`).click();
|
|
||||||
await page.getByRole('button', { name: 'New mail address' }).click();
|
|
||||||
};
|
|
||||||
|
|
||||||
test.describe('Mail domain create mailbox', () => {
|
test.describe('Mail domain create mailbox', () => {
|
||||||
test('checks user can New mail address when he has post ability', async ({
|
test('checks user can New mail address when he has post ability', async ({
|
||||||
page,
|
page,
|
||||||
@@ -205,6 +201,8 @@ test.describe('Mail domain create mailbox', () => {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
await interceptRequests(page);
|
||||||
|
|
||||||
await page.goto('/');
|
await page.goto('/');
|
||||||
// Login with a user who has the visibility on the mail domains
|
// Login with a user who has the visibility on the mail domains
|
||||||
await keyCloakSignIn(page, browserName, 'mail-member');
|
await keyCloakSignIn(page, browserName, 'mail-member');
|
||||||
@@ -213,9 +211,7 @@ test.describe('Mail domain create mailbox', () => {
|
|||||||
|
|
||||||
await page.getByLabel(`domain.fr listboxDomains button`).click();
|
await page.getByLabel(`domain.fr listboxDomains button`).click();
|
||||||
|
|
||||||
await expect(
|
await page.getByTestId('button-new-mailbox').click();
|
||||||
page.getByRole('button', { name: 'New mail address' }),
|
|
||||||
).click();
|
|
||||||
|
|
||||||
await expect(page.getByText('New email account')).toBeVisible();
|
await expect(page.getByText('New email account')).toBeVisible();
|
||||||
|
|
||||||
|
|||||||
@@ -131,7 +131,7 @@ test.describe('Mail domains', () => {
|
|||||||
await expect(page.getByText('Manage')).toHaveCount(4);
|
await expect(page.getByText('Manage')).toHaveCount(4);
|
||||||
|
|
||||||
await Promise.all(
|
await Promise.all(
|
||||||
mailDomainsFixtures.map(async ({ name, status }) => {
|
mailDomainsFixtures.map(async ({ name }) => {
|
||||||
const linkName = page.getByText(name);
|
const linkName = page.getByText(name);
|
||||||
await expect(linkName).toBeVisible();
|
await expect(linkName).toBeVisible();
|
||||||
}),
|
}),
|
||||||
|
|||||||
Reference in New Issue
Block a user