HEX
Server: Apache
System: Linux webm010.cluster103.gra.hosting.ovh.net 6.18.42-ovh-vps-grsec-zfs+ #1 SMP PREEMPT_DYNAMIC Wed Aug 5 15:59:48 CEST 2026 x86_64
User: iestorre (46869)
PHP: 8.0.30
Disabled: _dyuweyrj4,_dyuweyrj4r,dl
Upload Files
File: /home/iestorre/moodleAW/moodle505/lib/editor/tinymce/tests/behat/edit_available_icons.feature
@editor @editor_tinymce
Feature: Add or remove items from the TinyMCE editor toolbar
  In order to customize the TinyMCE editor appearance
  As an admin
  I need to add and remove items from the toolbar

  Background:
    Given the following "courses" exists:
      | fullname | shortname | category |
      | Course 1 | C1 | 0 |
    And I log in as "admin"

  @javascript
  Scenario: Remove icons
    When I set the following administration settings values:
      | Editor toolbar | fontselect,fontsizeselect,formatselect,\|,undo,redo,\|,search,replace,\|,fullscreen |
    And I am on homepage
    And I follow "Course 1"
    And I turn editing mode on
    And I add a "Database" to section "1"
    Then "#id_introeditor_tbl .mce_bold" "css_element" should not exists
    And "#id_introeditor_tbl .mce_fullscreen" "css_element" should exists
    And I press "Cancel"

  @javascript
  Scenario: Add icons
    When I set the following administration settings values:
      | Editor toolbar | fontselect,fontsizeselect,formatselect,\|,undo,redo,\|,search,replace,\|,fullscreen,anchor |
    And I am on homepage
    And I follow "Course 1"
    And I turn editing mode on
    And I add a "Database" to section "1"
    Then "#id_introeditor_tbl .mce_bold" "css_element" should not exists
    And "#id_introeditor_tbl .mce_anchor" "css_element" should exists
    And I set the following administration settings values:
      | Editor toolbar | fontselect,fontsizeselect,formatselect,\|,undo,redo,\|,search,replace,\|,fullscreen |
    And I am on homepage
    And I follow "Course 1"
    And I add a "Database" to section "1"
    And "#id_introeditor_tbl .mce_anchor" "css_element" should not exists
    And I press "Cancel"

  @javascript
  Scenario: Default icons
    Given I follow "Course 1"
    And I turn editing mode on
    When I add a "Database" to section "1"
    And I wait until "#id_introeditor_tbl" "css_element" exists
    Then "#id_introeditor_tbl .mce_bold" "css_element" should exists
    And "#id_introeditor_tbl .mce_anchor" "css_element" should not exists
    And I press "Cancel"