From 21f2a49c7e13859c827f25ebd4fe96ec3015ecc4 Mon Sep 17 00:00:00 2001 From: Peter Colapietro Date: Tue, 5 Oct 2021 16:02:23 -0400 Subject: [PATCH] fix: check no "ERR!" string is in stderr when running Storybook build (#3509) * fix: check no "ERR!" string is in stderr Avoid false positive Seems stderr is used for info as well as error see: https://github.com/redwoodjs/redwood/runs/3799459178?check_suite_focus=true * fix: use .then hope to avoid `Cannot read properties of undefined (reading 'split')` see: https://github.com/redwoodjs/redwood/runs/3802028363?check_suite_focus=true Co-authored-by: David Price --- .../integration/03-storybook/storybook.spec.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/tasks/e2e/cypress/integration/03-storybook/storybook.spec.js b/tasks/e2e/cypress/integration/03-storybook/storybook.spec.js index 58ac28b8f741..7c92f8e3e8b3 100644 --- a/tasks/e2e/cypress/integration/03-storybook/storybook.spec.js +++ b/tasks/e2e/cypress/integration/03-storybook/storybook.spec.js @@ -32,14 +32,14 @@ describe( Step2_2_BlogPostsCellMock ) + // Slow! cy.exec(`cd ${BASE_DIR}; yarn rw storybook --build`, { timeout: 300_0000, - }) // Slow! - .its('stderr') - .should('eq', '') - .and() - .its('code') - .should('eq', 0) + }).then((result) => { + const { code, stderr } = result + expect(code).to.eq(0) + expect(stderr).to.not.contain('ERR!') + }) }) it('1. Component: BlogPost', () => {