Répare la navigation sur l'adresse /iframe/pamc

pull/2257/head
Johan Girod 2022-08-29 09:59:54 +02:00
parent 034eab6d3a
commit c914887405
3 changed files with 22 additions and 1 deletions

View File

@ -0,0 +1,18 @@
import { fr } from '../../support/utils'
const inputSelector = 'div[aria-labelledby="simulator-legend"] input'
describe('Iframe pamc', function () {
if (!fr) {
return
}
before(function () {
return cy.visit('/iframes/pamc')
})
it('should allow to navigate to the dentiste simulateur from iframe pamc home page', function () {
cy.contains('Chirurgien-dentiste').click()
cy.get(inputSelector).first().type('{selectall}50000')
cy.contains('CARCDSF')
})
})

View File

@ -170,7 +170,9 @@ export function SimulateurCard({
<Grid item xs={12} sm={6} md={6} lg={4}>
<SmallCard
icon={<Emoji emoji={icône} />}
to={{ pathname: (isIframe && iframePath) || path }}
to={{
pathname: (isIframe && `/iframes/${iframePath ?? ''}`) || path,
}}
state={fromGérer ? { fromGérer: true } : { fromSimulateurs: true }}
title={
<h4>

View File

@ -5,6 +5,7 @@ import useSimulatorsData from './metadata'
export default function SalariéSimulation() {
const simulators = useSimulatorsData()
console.log(simulators)
return (
<>