From c4c103f0135ba8da98c8eb712a6df3e80d60b5c6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Rialland?= Date: Wed, 5 Oct 2022 15:52:05 +0200 Subject: [PATCH] Fix storybook build fail --- site/.storybook/main.cjs | 4 +++- site/cypress/integration/mon-entreprise/localisation-field.js | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/site/.storybook/main.cjs b/site/.storybook/main.cjs index 28d7fc0f7..320ec0aaf 100644 --- a/site/.storybook/main.cjs +++ b/site/.storybook/main.cjs @@ -3,6 +3,7 @@ const { loadConfigFromFile, mergeConfig } = require('vite') const reactPlugin = require('@vitejs/plugin-react') const path = require('path') const VitePWA = require('vite-plugin-pwa').VitePWA +const yaml = require('@rollup/plugin-yaml') module.exports = { stories: [ @@ -57,7 +58,8 @@ module.exports = { // Do not treat story files as HMR boundaries, storybook itself needs to handle them. exclude: [/\.stories\.([tj])sx?$/, /node_modules/], }), - VitePWA({}), + yaml(), + VitePWA({ disable: true }), ], }) diff --git a/site/cypress/integration/mon-entreprise/localisation-field.js b/site/cypress/integration/mon-entreprise/localisation-field.js index a7fa5e686..56eccbc91 100644 --- a/site/cypress/integration/mon-entreprise/localisation-field.js +++ b/site/cypress/integration/mon-entreprise/localisation-field.js @@ -10,7 +10,7 @@ describe('Champs localisation (simulateur salariƩ)', function () { it('should not crash when selecting localisation', function () { cy.contains('SMIC').click() - cy.contains('Commune').click({ force: true }) + cy.contains('[type=button]', 'Commune').click() cy.contains('Commune ou code postal') .click({ force: true }) .focused()