Repository: ionic-team/ionic-framework
File: core/src/components/picker/test/keyboard-entry/picker.e2e.ts (TypeScript)

Code before:
        { text: '07', value: 7 },
        { text: '08', value: 8 },
        { text: '09', value: 9 },
        { text: '10', value: 10 },
        { text: '11', value: 11 },
        { text: '12', value: 12 }
      ];

      items.forEach((item) => {
        const option = document.createElement('ion-picker-column-option');
        option.value = item.value;
        option.textContent = item.text;

        column.appendChild(option);
      });
    </script>
  `,
        config
      );

      const column = page.locator('ion-picker-column');
      const ionChange = await page.spyOnEvent('ionChange');
      await column.evaluate((el: HTMLIonPickerColumnElement) => el.setFocus());

      // Simulate typing '2'
      await page.keyboard.press('Digit2');

      // Ensure the value is immediately set to 2
      await expect(ionChange).toHaveReceivedEventDetail({ value: 2 });
      await expect(column).toHaveJSProperty('value', 2);
    });

    test('pressing Enter should dismiss the keyboard', async ({ page }) => {
      test.info().annotations.push({
        type: 'issue',
        description: 'https://github.com/ionic-team/ionic-framework/issues/28325',
      });
      await page.setContent(
        `
        <ion-picker>
          <ion-picker-column></ion-picker-column>
        </ion-picker>

        <script>
          const column = document.querySelector('ion-picker-column');
          column.numericInput = true;
          const items = [
            { text: '01', value: 1 },
            { text: '02', value: 2 },
            { text: '03', value: 3 },
            { text: '04', value: 4 },

Review comment (suggestion):
Since these tests are related to an issue, we add an annotation to make sure we don't forgot why we added them in in the first place.

```suggestion
      testInfo.annotations.push({
         type: 'issue',
         description: 'https://github.com/ionic-team/ionic-framework/issues/28877',
      });
      await page.setContent(
```

Code after:
      const box = await highlight.boundingBox();
      if (box !== null) {
        await page.mouse.click(box.x + box.width / 2, box.y + box.height / 2);
      }

      // Simulate typing '2230' (22 hours, 30 minutes)
      await page.keyboard.press('Digit2');
      await page.keyboard.press('Digit2');
      await page.keyboard.press('Digit3');
      await page.keyboard.press('Digit0');

      // Ensure the hours column is set to 22
      await expect(hoursIonChange).toHaveReceivedEventDetail({ value: 22 });
      await expect(hoursColumn).toHaveJSProperty('value', 22);

      // Ensure the minutes column is set to 30
      await expect(minutesIonChange).toHaveReceivedEventDetail({ value: 30 });
      await expect(minutesColumn).toHaveJSProperty('value', 30);
    });

    test('should set value to 2 and not wait for another digit when max value is 12', async ({ page }, testInfo) => {
      testInfo.annotations.push({
        type: 'issue',
        description: 'https://github.com/ionic-team/ionic-framework/issues/28877',
      });
      await page.setContent(
        `
    <ion-picker>
      <ion-picker-column id="hours"></ion-picker-column>
      <ion-picker-column id="minutes"></ion-picker-column>
    </ion-picker>

    <script>
      const hoursColumn = document.querySelector('ion-picker-column#hours');
      hoursColumn.numericInput = true;
      const hourItems = [
        { text: '01', value: 1 },
        { text: '02', value: 2 },
        { text: '03', value: 3 },
        { text: '04', value: 4 },
        { text: '05', value: 5 },
        { text: '06', value: 6 },
        { text: '07', value: 7 },
        { text: '08', value: 8 },
        { text: '09', value: 9 },
        { text: '10', value: 10 },
        { text: '11', value: 11 },
        { text: '12', value: 12 }
      ];

      hourItems.forEach((item) => {