Skip to content

Commit

Permalink
UI: Testsuite for UI components - adding missing descriptions and exp…
Browse files Browse the repository at this point in the history
…ected output to examples.
  • Loading branch information
lukastocker committed Oct 23, 2024
1 parent 3c8ebf8 commit 7909fe8
Show file tree
Hide file tree
Showing 295 changed files with 7,244 additions and 318 deletions.
19 changes: 19 additions & 0 deletions src/UI/examples/Breadcrumbs/breadcrumbs.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,21 @@
<?php

/**
* This file is part of ILIAS, a powerful learning management system
* published by ILIAS open source e-Learning e.V.
*
* ILIAS is licensed with the GPL-3.0,
* see https://www.gnu.org/licenses/gpl-3.0.en.html
* You should have received a copy of said license along with the
* source code, too.
*
* If this is not the case or you just want to try ILIAS, you'll find
* us at:
* https://www.ilias.de
* https://github.com/ILIAS-eLearning
*
*********************************************************************/

declare(strict_types=1);

namespace ILIAS\UI\examples\Breadcrumbs;
Expand All @@ -13,6 +29,9 @@
* expected output: >
* ILIAS shows two rows of clickable links separated by simple arrows (>).
* The second row has one more entry than the first one.
*
* Validating Breadcrumbs:
* You do not get an error message. You can ignore warnings, but have in mind that you do not should receive errors.
* ---
*/
function breadcrumbs()
Expand Down
27 changes: 26 additions & 1 deletion src/UI/examples/Button/Bulky/base.php
Original file line number Diff line number Diff line change
@@ -1,16 +1,41 @@
<?php

/**
* This file is part of ILIAS, a powerful learning management system
* published by ILIAS open source e-Learning e.V.
*
* ILIAS is licensed with the GPL-3.0,
* see https://www.gnu.org/licenses/gpl-3.0.en.html
* You should have received a copy of said license along with the
* source code, too.
*
* If this is not the case or you just want to try ILIAS, you'll find
* us at:
* https://www.ilias.de
* https://github.com/ILIAS-eLearning
*
*********************************************************************/

declare(strict_types=1);

namespace ILIAS\UI\examples\Button\Bulky;

/**
* ---
* description: >
* Example for rendering a bulky button.
*
* note: >
* The exact look of the Bulky Buttons is mostly defined by the surrounding container.
*
* expected output: >
* ILIAS shows the rendered Component.
* ILIAS shows a button with an icon and titled "Icon". The button's size is almost as wide as the width of the box
* in the background. Clicking the button won't activate any actions.
* Additionally ILIAS shows a button with a glyph and the title "Glyph". The button's size is also almost as wide as
* the widht of the box in the background. Clicking the button won't activate any actions.
*
* Validating Bulky Button:
* You do not get an error message. You can ignore warnings, but have in mind that you do not should receive errors.
* ---
*/
function base()
Expand Down
22 changes: 21 additions & 1 deletion src/UI/examples/Button/Bulky/engaged.php
Original file line number Diff line number Diff line change
@@ -1,13 +1,33 @@
<?php

/**
* This file is part of ILIAS, a powerful learning management system
* published by ILIAS open source e-Learning e.V.
*
* ILIAS is licensed with the GPL-3.0,
* see https://www.gnu.org/licenses/gpl-3.0.en.html
* You should have received a copy of said license along with the
* source code, too.
*
* If this is not the case or you just want to try ILIAS, you'll find
* us at:
* https://www.ilias.de
* https://github.com/ILIAS-eLearning
*
*********************************************************************/

declare(strict_types=1);

namespace ILIAS\UI\examples\Button\Bulky;

/**
* ---
* description: >
* Example for rendering an engaged bulky button
*
* expected output: >
* ILIAS shows the rendered Component.
* ILIAS shows a button with a glyph and the title "Engaged". The button looks different than the base bulky button.
* Clicking the button won't activate any actions.
* ---
*/
function engaged()
Expand Down
18 changes: 17 additions & 1 deletion src/UI/examples/Button/Bulky/unavailable_action.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,21 @@
<?php

/**
* This file is part of ILIAS, a powerful learning management system
* published by ILIAS open source e-Learning e.V.
*
* ILIAS is licensed with the GPL-3.0,
* see https://www.gnu.org/licenses/gpl-3.0.en.html
* You should have received a copy of said license along with the
* source code, too.
*
* If this is not the case or you just want to try ILIAS, you'll find
* us at:
* https://www.ilias.de
* https://github.com/ILIAS-eLearning
*
*********************************************************************/

declare(strict_types=1);

namespace ILIAS\UI\examples\Button\Bulky;
Expand All @@ -10,7 +26,7 @@
* This example provides the given button with an unavailable action.
*
* expected output: >
* ILIAS shows the rendered Component.
* ILIAS shows a button with a glyph and the title "Unavailable". Clicking the button won't activate any actions.
*
* note: >
* The disabled attribute is set in the DOM.
Expand Down
22 changes: 21 additions & 1 deletion src/UI/examples/Button/Bulky/with_tooltip.php
Original file line number Diff line number Diff line change
@@ -1,13 +1,33 @@
<?php

/**
* This file is part of ILIAS, a powerful learning management system
* published by ILIAS open source e-Learning e.V.
*
* ILIAS is licensed with the GPL-3.0,
* see https://www.gnu.org/licenses/gpl-3.0.en.html
* You should have received a copy of said license along with the
* source code, too.
*
* If this is not the case or you just want to try ILIAS, you'll find
* us at:
* https://www.ilias.de
* https://github.com/ILIAS-eLearning
*
*********************************************************************/

declare(strict_types=1);

namespace ILIAS\UI\examples\Button\Bulky;

/**
* ---
* description: >
* Example for rendering a bulky button with tooltips
*
* expected output: >
* ILIAS shows the rendered Component.
* ILIAS shows an icon titled "Goto ILIAS". Hovering over the text will show you following tooltips: "tooltip: ilias"
* and "tooltip: learning management system".
* ---
*/
function with_tooltip()
Expand Down
23 changes: 21 additions & 2 deletions src/UI/examples/Button/Close/base.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,21 @@
<?php

/**
* This file is part of ILIAS, a powerful learning management system
* published by ILIAS open source e-Learning e.V.
*
* ILIAS is licensed with the GPL-3.0,
* see https://www.gnu.org/licenses/gpl-3.0.en.html
* You should have received a copy of said license along with the
* source code, too.
*
* If this is not the case or you just want to try ILIAS, you'll find
* us at:
* https://www.ilias.de
* https://github.com/ILIAS-eLearning
*
*********************************************************************/

declare(strict_types=1);

namespace ILIAS\UI\examples\Button\Close;
Expand All @@ -10,10 +26,13 @@
* This example is rather artificial, since the close button is only used
* in other components (see purpose).
* This examples just shows how one could render the button if implementing
* such a component
* such a component.
*
* expected output: >
* ILIAS shows the rendered Component.
* ILIAS shows a grey box with an dark grey "X" in the right corner. Clicking the "X" won't activate any action.
*
* Validating Close Button:
* You do not get an error message. You can ignore warnings, but have in mind that you do not should receive errors.
*
* note: >
* In some cases, additional CSS will be needed for placing the button
Expand Down
19 changes: 18 additions & 1 deletion src/UI/examples/Button/Close/modal.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,21 @@
<?php

/**
* This file is part of ILIAS, a powerful learning management system
* published by ILIAS open source e-Learning e.V.
*
* ILIAS is licensed with the GPL-3.0,
* see https://www.gnu.org/licenses/gpl-3.0.en.html
* You should have received a copy of said license along with the
* source code, too.
*
* If this is not the case or you just want to try ILIAS, you'll find
* us at:
* https://www.ilias.de
* https://github.com/ILIAS-eLearning
*
*********************************************************************/

declare(strict_types=1);

namespace ILIAS\UI\examples\Button\Close;
Expand All @@ -12,7 +28,8 @@
* is properly placed in the top right corner.
*
* expected output: >
* ILIAS shows the rendered Component.
* ILIAS shows a button titled "Show Close Button Demo". Clicking the button will open a modal with text and a Close-Button.
* A click onto the button will close the modal.
* ---
*/
function modal()
Expand Down
16 changes: 16 additions & 0 deletions src/UI/examples/Button/Minimize/base.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,21 @@
<?php

/**
* This file is part of ILIAS, a powerful learning management system
* published by ILIAS open source e-Learning e.V.
*
* ILIAS is licensed with the GPL-3.0,
* see https://www.gnu.org/licenses/gpl-3.0.en.html
* You should have received a copy of said license along with the
* source code, too.
*
* If this is not the case or you just want to try ILIAS, you'll find
* us at:
* https://www.ilias.de
* https://github.com/ILIAS-eLearning
*
*********************************************************************/

declare(strict_types=1);

namespace ILIAS\UI\examples\Button\Minimize;
Expand Down
27 changes: 26 additions & 1 deletion src/UI/examples/Button/Month/base.php
Original file line number Diff line number Diff line change
@@ -1,13 +1,38 @@
<?php

/**
* This file is part of ILIAS, a powerful learning management system
* published by ILIAS open source e-Learning e.V.
*
* ILIAS is licensed with the GPL-3.0,
* see https://www.gnu.org/licenses/gpl-3.0.en.html
* You should have received a copy of said license along with the
* source code, too.
*
* If this is not the case or you just want to try ILIAS, you'll find
* us at:
* https://www.ilias.de
* https://github.com/ILIAS-eLearning
*
*********************************************************************/

declare(strict_types=1);

namespace ILIAS\UI\examples\Button\Month;

/**
* ---
* description: >
* Example for rendering a dropdown button showing the default month/year while not opened and a selection of months while
* opened.
*
* expected output: >
* ILIAS shows the rendered Component.
* ILIAS shows a button including a month and year. Clicking the button will open a selection of other months and years
* which can be selected. Another click onto a month opens a dialog which confirms the click. In this dialog you can see
* a long kombination of numbers/letters and additionally the selected month (e.g. 03-2020).
*
* Validating Month Button:
* You do not get an error message. You can ignore warnings, but have in mind that you do not should receive errors.
* ---
*/
function base()
Expand Down
25 changes: 24 additions & 1 deletion src/UI/examples/Button/Primary/base.php
Original file line number Diff line number Diff line change
@@ -1,13 +1,36 @@
<?php

/**
* This file is part of ILIAS, a powerful learning management system
* published by ILIAS open source e-Learning e.V.
*
* ILIAS is licensed with the GPL-3.0,
* see https://www.gnu.org/licenses/gpl-3.0.en.html
* You should have received a copy of said license along with the
* source code, too.
*
* If this is not the case or you just want to try ILIAS, you'll find
* us at:
* https://www.ilias.de
* https://github.com/ILIAS-eLearning
*
*********************************************************************/

declare(strict_types=1);

namespace ILIAS\UI\examples\Button\Primary;

/**
* ---
* description: >
* Example for rendering a primary button.
*
* expected output: >
* ILIAS shows the rendered Component.
* ILIAS shows an active, very colorful button titled "Goto ILIAS". Clicking the button will open the website
* www.ilias.de in the same browser window.
*
* Validating Primary Button:
* You do not get an error message. You can ignore warnings, but have in mind that you do not should receive errors.
* ---
*/
function base()
Expand Down
21 changes: 20 additions & 1 deletion src/UI/examples/Button/Primary/engaged.php
Original file line number Diff line number Diff line change
@@ -1,13 +1,32 @@
<?php

/**
* This file is part of ILIAS, a powerful learning management system
* published by ILIAS open source e-Learning e.V.
*
* ILIAS is licensed with the GPL-3.0,
* see https://www.gnu.org/licenses/gpl-3.0.en.html
* You should have received a copy of said license along with the
* source code, too.
*
* If this is not the case or you just want to try ILIAS, you'll find
* us at:
* https://www.ilias.de
* https://github.com/ILIAS-eLearning
*
*********************************************************************/

declare(strict_types=1);

namespace ILIAS\UI\examples\Button\Primary;

/**
* ---
* description: >
* Example for rendering an engaged primary button
*
* expected output: >
* ILIAS shows the rendered Component.
* ILIAS shows a white button titled "Engaged Button". A click onto the button won't activate any actions.
* ---
*/
function engaged()
Expand Down
Loading

0 comments on commit 7909fe8

Please sign in to comment.