HEX
Server: LiteSpeed
System: Linux server.zepintelhosting.com 4.18.0 #1 SMP Mon Sep 30 15:36:27 MSK 2024 x86_64
User: enamadmin (1026)
PHP: 8.2.30
Disabled: exec,system,passthru,shell_exec,proc_nice,proc_terminate,pfsockopen,dl,show_source,posix_kill,posix_mkfifo,posix_getpwuid,posix_setpgid,posix_setsid,posix_setuid,posix_setgid,posix_seteuid,posix_setegid,posix_uname,leak,apache_child_terminate
Upload Files
File: /home/enamadmin/public_html/aaelearningb/blocks/tests/behat/delete_block.feature
@core @core_block
Feature: Block removal via modal
  In order to remove blocks
  As a teacher
  I need to use a modal to confirm the block to delete

  Background:
    Given the following "courses" exist:
      | fullname | shortname | category |
      | Course 1 | C1 | 0 |
    And the following "blocks" exist:
      | blockname     | contextlevel | reference | pagetypepattern | defaultregion |
      | search_forums | Course       | C1        | course-view-*   | side-pre      |
    And I log in as "admin"
    And I am on "Course 1" course homepage with editing mode on

  @javascript
  Scenario: Removing a block via modal should remove the block on the page
    Given I open the "Search forums" blocks action menu
    When I click on "Delete Search forums block" "link" in the "Search forums" "block"
    Then "Delete block?" "dialogue" should exist
    And I click on "Delete" "button" in the "Delete block?" "dialogue"
    And I wait to be redirected
    And "Search forums" "block" should not exist

  @javascript
  Scenario: Cancel removing a block via modal should retain the block on the page
    Given I open the "Search forums" blocks action menu
    When I click on "Delete Search forums block" "link" in the "Search forums" "block"
    Then "Delete block?" "dialogue" should exist
    And I click on "Cancel" "button" in the "Delete block?" "dialogue"
    And I should not see "Delete block?"
    And "Search forums" "block" should exist