Repository: strapi/strapi
File: tests/e2e/tests/i18n/editview.spec.ts (TypeScript)

Code before:
    await page.getByRole('menuitem', { name: 'Unpublish multiple locales', exact: true }).click();

    // Select all locales, assert there are 2 entries ready to unpublish and unpublish them
    await page
      .getByRole('row', { name: 'Select all entries Name' })
      .getByLabel('Select all entries')
      .click();

    /**
     * Unpublish the articles
     */
    await expect(page.getByText('2 entries ready to unpublish')).toBeVisible();
    await page
      .getByLabel('Unpublish multiple locales')
      .getByRole('button', { name: 'Unpublish' })
      .click();

    // Assert that all locales are now unpublished
    await expect(page.getByRole('gridcell', { name: 'Draft' })).toHaveCount(2);

    await expect(
      page.getByLabel('Unpublish multiple locales').getByRole('button', { name: 'Unpublish' })
    ).toBeDisabled();
  });

  test.only('As a user I want to see non translatable fields pre-filled when creating a new locale of a document', async ({
    page,
  }) => {
    await navToHeader(page, ['Content-Type Builder', 'Products'], 'Products');
    await page.getByRole('button', { name: /add another field to this collection type/i }).click();
    await page
      .getByRole('button', { name: 'Text Small or long text like title or description' })
      .click();
    await page.getByLabel('Name', { exact: true }).fill('nonTranslatableField');
    await page.getByRole('tab', { name: 'Advanced settings' }).click();
    await page.getByLabel('Enable localization for this').click();
    await page.getByRole('button', { name: 'Finish' }).click();
    await page.getByRole('button', { name: 'Save' }).click();
    await waitForRestart(page);

    // Create a new entry in the english locale
    await navToHeader(page, ['Content Manager', 'Products'], 'Products');
    await page.getByRole('link', { name: 'Create new entry' }).first().click();
    await page.getByLabel('name').fill('Translatable name (only for this locale)');
    await page.getByLabel('nonTranslatableField').fill('Non translatable value (for all locales)');
    await page.getByRole('button', { name: 'Save' }).click();
    await findAndClose(page, 'Saved Document');

    // Switch to french locale
    await page.getByRole('combobox', { name: 'Locales' }).click();
    await page.getByRole('option', { name: 'French (fr)' }).click();

Review comment (suggestion):
`test('As a user I want to see non translatable fields pre-filled when creating a new locale of a document', async ({`

Code after:
    await page.getByRole('menuitem', { name: 'Unpublish multiple locales', exact: true }).click();

    // Select all locales, assert there are 2 entries ready to unpublish and unpublish them
    await page
      .getByRole('row', { name: 'Select all entries Name' })
      .getByLabel('Select all entries')
      .click();

    /**
     * Unpublish the articles
     */
    await expect(page.getByText('2 entries ready to unpublish')).toBeVisible();
    await page
      .getByLabel('Unpublish multiple locales')
      .getByRole('button', { name: 'Unpublish' })
      .click();

    // Assert that all locales are now unpublished
    await expect(page.getByRole('gridcell', { name: 'Draft' })).toHaveCount(2);

    await expect(
      page.getByLabel('Unpublish multiple locales').getByRole('button', { name: 'Unpublish' })
    ).toBeDisabled();
  });

  test('As a user I want to see non translatable fields pre-filled when creating a new locale of a document', async ({
    page,
  }) => {
    await navToHeader(page, ['Content-Type Builder', 'Products'], 'Products');
    await page.getByRole('button', { name: /add another field to this collection type/i }).click();
    await page
      .getByRole('button', { name: 'Text Small or long text like title or description' })
      .click();
    await page.getByLabel('Name', { exact: true }).fill('nonTranslatableField');
    await page.getByRole('tab', { name: 'Advanced settings' }).click();
    await page.getByLabel('Enable localization for this').click();
    await page.getByRole('button', { name: 'Finish' }).click();
    await page.getByRole('button', { name: 'Save' }).click();
    await waitForRestart(page);

    // Create a new entry in the english locale
    await navToHeader(page, ['Content Manager', 'Products'], 'Products');
    await page.getByRole('link', { name: 'Create new entry' }).first().click();
    await page.getByLabel('name').fill('Translatable name (only for this locale)');
    await page.getByLabel('nonTranslatableField').fill('Non translatable value (for all locales)');
    await page.getByRole('button', { name: 'Save' }).click();
    await findAndClose(page, 'Saved Document');

    // Switch to french locale
    await page.getByRole('combobox', { name: 'Locales' }).click();
    await page.getByRole('option', { name: 'French (fr)' }).click();