| Línea 84... | Línea 84... | 
          
            | 84 |  
 | 84 |  
 | 
          
            | 85 |         $this->execute('behat_general::i_click_on_in_the', [$button, 'button', $container, 'NodeElement']);
 | 85 |         $this->execute('behat_general::i_click_on_in_the', [$button, 'button', $container, 'NodeElement']);
 | 
          
            | Línea 86... | Línea 86... | 
          
            | 86 |     }
 | 86 |     }
 | 
          
            | - |   | 87 |  
 | 
          
            | - |   | 88 |     /**
 | 
          
            | - |   | 89 |      * Checks that a button exists in specified TinyMCE editor.
 | 
          
            | - |   | 90 |      *
 | 
          
            | - |   | 91 |      * @When /^"(?P<button_string>(?:[^"]|\\")*)" button should exist in the "(?P<locator_string>(?:[^"]|\\")*)" TinyMCE editor$/
 | 
          
            | - |   | 92 |      *
 | 
          
            | - |   | 93 |      * @param string $button The label of the button
 | 
          
            | - |   | 94 |      * @param string $locator The locator for the editor
 | 
          
            | - |   | 95 |      */
 | 
          
            | - |   | 96 |     public function button_should_exist(string $button, string $locator): void {
 | 
          
            | - |   | 97 |         $this->require_tiny_tags();
 | 
          
            | - |   | 98 |         $container = $this->get_editor_container_for_locator($locator);
 | 
          
            | - |   | 99 |  
 | 
          
            | - |   | 100 |         $this->execute('behat_general::should_exist_in_the', [$button, 'button', $container, 'NodeElement']);
 | 
          
            | - |   | 101 |     }
 | 
          
            | - |   | 102 |  
 | 
          
            | - |   | 103 |     /**
 | 
          
            | - |   | 104 |      * Checks that a button does not exist in specified TinyMCE editor.
 | 
          
            | - |   | 105 |      *
 | 
          
            | - |   | 106 |      * @When /^"(?P<button_string>(?:[^"]|\\")*)" button should not exist in the "(?P<locator_string>(?:[^"]|\\")*)" TinyMCE editor$/
 | 
          
            | - |   | 107 |      *
 | 
          
            | - |   | 108 |      * @param string $button The label of the button
 | 
          
            | - |   | 109 |      * @param string $locator The locator for the editor
 | 
          
            | - |   | 110 |      */
 | 
          
            | - |   | 111 |     public function button_should_not_exist(string $button, string $locator): void {
 | 
          
            | - |   | 112 |         $this->require_tiny_tags();
 | 
          
            | - |   | 113 |         $container = $this->get_editor_container_for_locator($locator);
 | 
          
            | - |   | 114 |  
 | 
          
            | - |   | 115 |         $this->execute('behat_general::should_not_exist_in_the', [$button, 'button', $container, 'NodeElement']);
 | 
          
            | - |   | 116 |     }
 | 
          
            | 87 |  
 | 117 |  
 | 
          
            | 88 |     /**
 | 118 |     /**
 | 
          
            | 89 |      * Confirm that the button state of the specified button/editor combination matches the expectation.
 | 119 |      * Confirm that the button state of the specified button/editor combination matches the expectation.
 | 
          
            | 90 |      *
 | 120 |      *
 | 
          
            | 91 |      * @Then /^the "(?P<button_string>(?:[^"]|\\")*)" button of the "(?P<locator_string>(?:[^"]|\\")*)" TinyMCE editor has state "(?P<state_string>(?:[^"]|\\")*)"$/
 | 121 |      * @Then /^the "(?P<button_string>(?:[^"]|\\")*)" button of the "(?P<locator_string>(?:[^"]|\\")*)" TinyMCE editor has state "(?P<state_string>(?:[^"]|\\")*)"$/
 | 
          
            | Línea 138... | Línea 168... | 
          
            | 138 |             // which will mean crossing across other menu items.
 | 168 |             // which will mean crossing across other menu items.
 | 
          
            | 139 |             $firstlink = $openmenu->find('css', "[role^='menuitem'] .tox-collection__item-icon");
 | 169 |             $firstlink = $openmenu->find('css', "[role^='menuitem'] .tox-collection__item-icon");
 | 
          
            | 140 |             $firstlink->mouseover();
 | 170 |             $firstlink->mouseover();
 | 
          
            | Línea 141... | Línea 171... | 
          
            | 141 |  
 | 171 |  
 | 
          
            | 142 |             // Now match by title where the role matches any menuitem, or menuitemcheckbox, or menuitem*.
 | 172 |             // Now match by title where the role matches any menuitem, or menuitemcheckbox, or menuitem*.
 | 
          
            | 143 |             $link = $openmenu->find('css', "[title='{$menuitem}'][role^='menuitem']");
 | 173 |             $link = $openmenu->find('css', "[aria-label='{$menuitem}'][role^='menuitem']");
 | 
          
            | 144 |             $this->execute('behat_general::i_click_on', [$link, 'NodeElement']);
 | 174 |             $this->execute('behat_general::i_click_on', [$link, 'NodeElement']);
 | 
          
            | 145 |         }
 | 175 |         }
 | 
          
            | Línea 146... | Línea 176... | 
          
            | 146 |     }
 | 176 |     }
 | 
          
            | Línea 269... | Línea 299... | 
          
            | 269 |         } catch (ExpectationException $e) {
 | 299 |         } catch (ExpectationException $e) {
 | 
          
            | 270 |             // No more button, so no need to expand.
 | 300 |             // No more button, so no need to expand.
 | 
          
            | 271 |             return;
 | 301 |             return;
 | 
          
            | 272 |         }
 | 302 |         }
 | 
          
            | Línea 273... | Línea 303... | 
          
            | 273 |  
 | 303 |  
 | 
          
            | 274 |         if ($button->getAttribute(('aria-pressed')) === 'false') {
 | 304 |         if ($button->getAttribute(('aria-expanded')) === 'false') {
 | 
          
            | 275 |             $this->execute('behat_general::i_click_on', [$button, 'NodeElement']);
 | 305 |             $this->execute('behat_general::i_click_on', [$button, 'NodeElement']);
 | 
          
            | 276 |         }
 | 306 |         }
 | 
          
            | Línea 277... | Línea 307... | 
          
            | 277 |     }
 | 307 |     }
 |