Lemmy Adams
Lemmy Adams
> There are 1001 ways of doing the stripHtml function: > > ```js > function stripHtml(text) { > const textWithoutHtml = text.replace(/]*>/g, ''); > cy.wrap(textWithoutHtml).as('text'); > } > ``` >...
> ```js > function testQuestionButtons(buttonsObject = {btn__action: 'Submit', btn__feedback: 'Show feedback'}) { > Object.keys(buttonsObject).forEach((key) => { > cy.get(`.${key}`).should('contain', buttonsObject[key]) > }) > } > ``` > > This is much...
> It's not really a helper at all it's a very specific externalised feature test. > > Helpers are more like stripHtml above, they're generic repeatable utilities or standardised logic...
> I don't think you should avoid setting the object manually. It makes it very clear what's being tested. Or just don't test the buttons here, test them in the...
> Can you give the line references and examples of where we've chosen to not make things clear? We can set about correcting them. > I don't understand, do you...