mardi 25 septembre 2018

Problem with test automation, WYSYWIG Editor, PHP, REACT

I am working on a project, which uses php and react. My task is to write automated tests in Behat/Mink, but I got stock.

I have problem with fill react-draft-wysiwyg component.

I tried to use functions like these:

    public function fillField($fieldName, $fieldValue)
{
    $renderedFieldValue = $this->twigRenderStringTemplate($fieldValue, $this->saved);
    $this->fillField($fieldName, $renderedFieldValue);

also I tried use js e.g. innerHTML.

WYSIWIG component in code:

 <FieldWysiwyg valid={valid} label={t('project:field.companyDescription') + ' *'} name='companyDescription'
                          value={initialValues.companyDescription || ''}/>

Editor in html

WYSIWYG editor

Does anyone have any idea how to fill this field?

Aucun commentaire:

Enregistrer un commentaire