Skip to content

Commit e38401b

Browse files
committed
chore: update iframe check
1 parent f4b3bd2 commit e38401b

3 files changed

Lines changed: 14 additions & 11 deletions

File tree

src/components/form/Select.tsx

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -38,16 +38,15 @@ const Select = ({
3838
<select
3939
className={classNames(styles.select, { [styles.small]: padding === 'sm' })}
4040
data-testid={`text-select-${id}`}
41+
aria-selected={selectProps.value}
4142
{...selectProps}
4243
id={`text-select-${id}`}>
43-
<>
44-
{selectProps.required && (
45-
<option value='' disabled hidden>
46-
Choisir une option
47-
</option>
48-
)}
49-
{children}
50-
</>
44+
{selectProps.required && (
45+
<option value='' disabled hidden>
46+
Choisir une option
47+
</option>
48+
)}
49+
{children}
5150
</select>
5251
</div>
5352
</div>

src/components/outils/FruitsEtLegumesSimulator.tsx

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ const FruitsEtLegumesSimulator = () => {
2424

2525
const t = useTranslations('flds')
2626
const tMonth = useTranslations('overscreen.month')
27+
2728
return (
2829
<>
2930
<div className={styles.simulator}>
@@ -36,9 +37,9 @@ const FruitsEtLegumesSimulator = () => {
3637
trackOnce('Mois')
3738
setMonth(Number(e.target.value))
3839
}}>
39-
{monthsOptions.map((month) => (
40-
<option key={month.value} value={month.value}>
41-
{tMonth(month.label)}
40+
{monthsOptions.map(({ value, label }) => (
41+
<option key={value} value={value}>
42+
{tMonth(label)}
4243
</option>
4344
))}
4445
</Select>

src/scripts/testIframes.config.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -183,6 +183,9 @@ export const checks = [
183183
{
184184
slug: 'bondici',
185185
url: 'https://www.bondici.fr/actualite/quand-manger-les-fruits-et-legumes-de-saison/',
186+
before: async (page: Page) => {
187+
await page.getByRole('button', { name: 'Refuser' }).click()
188+
},
186189
checkIframe: async (iframe: FrameLocator) => {
187190
await expect(iframe.getByTestId('text-select-month')).toHaveValue('5')
188191
await expect(iframe.getByTestId('category-abricot-value')).toBeVisible()

0 commit comments

Comments
 (0)