💚 répare les tests E2E suite à la suppression d'embauche.beta.gouv.fr
parent
b69fb92944
commit
a84a562eb2
|
@ -21,7 +21,7 @@ commands:
|
|||
default: fr
|
||||
integration_folder:
|
||||
type: enum
|
||||
enum: [mon-entreprise, external, embauche]
|
||||
enum: [mon-entreprise, external]
|
||||
default: mon-entreprise
|
||||
base_url:
|
||||
type: string
|
||||
|
@ -56,9 +56,6 @@ jobs:
|
|||
- cypress:
|
||||
base_url: http://localhost:5001
|
||||
language: en
|
||||
- cypress:
|
||||
base_url: http://localhost:5002
|
||||
integration_folder: embauche
|
||||
|
||||
production-end-to-end-test:
|
||||
docker:
|
||||
|
@ -75,9 +72,6 @@ jobs:
|
|||
- cypress:
|
||||
base_url: https://mycompanyinfrance.fr
|
||||
language: en
|
||||
- cypress:
|
||||
base_url: https://embauche.beta.gouv.fr
|
||||
integration_folder: embauche
|
||||
- cypress:
|
||||
integration_folder: external
|
||||
- run:
|
||||
|
|
|
@ -9,18 +9,18 @@ const salaryInput = inputTitle => {
|
|||
|
||||
const fr = Cypress.env('language') === 'fr'
|
||||
if (fr) {
|
||||
describe('Landing basic test', function() {
|
||||
beforeEach(() => {
|
||||
cy.visit('/sécurité-sociale/salarié')
|
||||
})
|
||||
describe('Basic test', function() {
|
||||
it('should display the simulateur after loading', function() {
|
||||
cy.visit('/sécurité')
|
||||
cy.contains('Versé sur son compte bancaire')
|
||||
})
|
||||
it('should display cotisation repartition when entering net salary', function() {
|
||||
cy.visit('/')
|
||||
salaryInput('Salaire net').type('2000')
|
||||
cy.get('.distribution-chart__container')
|
||||
})
|
||||
it('should allow to navigate to a documentation page', function() {
|
||||
cy.visit('/')
|
||||
salaryInput('Salaire net').type('2000')
|
||||
cy.contains('Total chargé').click()
|
||||
cy.contains(
|
||||
|
@ -31,7 +31,6 @@ if (fr) {
|
|||
|
||||
describe('Simulation saving test', function() {
|
||||
it('should save the current simulation', function() {
|
||||
cy.visit('/')
|
||||
salaryInput('Salaire net').type('5471')
|
||||
cy.wait(1000)
|
||||
cy.contains('CDD').click()
|
||||
|
@ -39,7 +38,7 @@ if (fr) {
|
|||
cy.contains('passer').click()
|
||||
// Wanted to use cypress.clock(), but can't because of piwik changing Date prototype (!)
|
||||
cy.wait(1100)
|
||||
cy.visit('/')
|
||||
cy.visit('/sécurité-sociale/salarié')
|
||||
cy.contains('Retrouver ma simulation').click()
|
||||
salaryInput('Salaire net').should('have.value', '5471')
|
||||
})
|
|
@ -5,20 +5,18 @@ import React from 'react'
|
|||
import emoji from 'react-easy-emoji'
|
||||
import { connect } from 'react-redux'
|
||||
import { Link } from 'react-router-dom'
|
||||
import sitePaths from '../../sites/mon-entreprise.fr/sitePaths';
|
||||
import { analysisWithDefaultsSelector } from 'Selectors/analyseSelectors'
|
||||
import './Targets.css'
|
||||
|
||||
export default compose(
|
||||
connect(state => ({ analysis: analysisWithDefaultsSelector(state) })),
|
||||
withColours,
|
||||
withSitePaths,
|
||||
withSitePaths
|
||||
)(
|
||||
class Targets extends React.Component {
|
||||
render() {
|
||||
let {
|
||||
title,
|
||||
nodeValue,
|
||||
sitePaths,
|
||||
unité: unit,
|
||||
dottedName
|
||||
} = this.props.analysis.targets[0]
|
||||
|
@ -28,8 +26,6 @@ export default compose(
|
|||
<span
|
||||
className="content"
|
||||
style={{ color: this.props.colours.textColour }}>
|
||||
{/*<span className="title">{title}</span>
|
||||
{' : '} */}
|
||||
<span className="figure">
|
||||
<span className="value">{nodeValue?.toFixed(1)}</span>{' '}
|
||||
<span className="unit">{unit}</span>
|
||||
|
@ -37,7 +33,7 @@ export default compose(
|
|||
<Link
|
||||
title="Quel est calcul ?"
|
||||
style={{ color: this.props.colours.colour }}
|
||||
to={sitePaths.documentation.index + '/' + dottedName}
|
||||
to={this.props.sitePaths.documentation.index + '/' + dottedName}
|
||||
className="explanation">
|
||||
{emoji('📖')}
|
||||
</Link>
|
||||
|
|
|
@ -125,16 +125,13 @@ const App = compose(
|
|||
path={sitePaths.documentation.index + '/:name+'}
|
||||
component={RulePage}
|
||||
/>
|
||||
{process.env.NODE_ENV !== 'production' && (
|
||||
<>
|
||||
<Route exact path="/dev/sitemap" component={Sitemap} />
|
||||
<Route
|
||||
exact
|
||||
path="/dev/integration-test"
|
||||
component={IntegrationTest}
|
||||
/>
|
||||
</>
|
||||
)}
|
||||
<Route exact path="/dev/sitemap" component={Sitemap} />
|
||||
<Route
|
||||
exact
|
||||
path="/dev/integration-test"
|
||||
component={IntegrationTest}
|
||||
/>
|
||||
|
||||
<Route component={Route404} />
|
||||
</Switch>
|
||||
</div>
|
||||
|
|
Loading…
Reference in New Issue