Adds tests for LanguageService in Vector skin.
Covered:
- `testConstruct`: Validates property initialization.
- `canWordsBeSplitSafely`: Tests that the language is splittable or not.
Change-Id: Icc1c269c56e0e53c624074516aee95ba242a55d7
Adds tests for VectorComponentMenu in Vector skin.
The test suite includes the following validations:
- Constructor initialization with expected parameters and behaviors.
- Validate counting logic for menu items.
- Validates `getTemplateData` method's output for correctness.
Change-Id: Ia52aa70e9213f6627d063d520fdbb2e353f0bfcb
Adds tests for VectorComponentMainMenu in Vector skin.
The test suite includes the following validations:
- Constructor initialization with expected parameters and behaviors.
- Correct identification of 'is-pinned' state
- Inclusion of data for first portlet and rest portlets
- Handling of pin/unpin actions and language alert considerations
- Proper integration of menu elements based on user and feature flags
Change-Id: Ie408ff668893d1de2cf9dd1211a9c82c0b882f99
Adds tests for VectorComponentMainMenuAction in Vector skin.
The test suite includes the following validations:
- Constructor initialization with expected parameters and behaviors.
- Validates `getTemplateData` method's output for correctness.
Change-Id: I5deda64dc1bd3db85df69d0bb5a5a27f6fb8c1ff
Adds tests for VectorComponentLanguageDropdown in Vector skin.
The test suite includes the following validations:
- Proper handling based on page type (subject/talk).
- Correct labeling and icon selection.
- Accurate class and aria label configuration.
Change-Id: I145cb250c513f3f81e780195485907897788f5c4
VISUAL CHANGE:
* The gap between the title and the text "From mediawiki"
decreases - this is an improvement.
Bug: T357022
Change-Id: I436171448ca69413a004024157b24d502aa63bea
Update <p> spacing to improve consistency of ul/ol spacing,
also update heading spacing to be more consistent,
relying on mw defaults more
This reverts commit 8d3bda7867.
Bug: T352875
Change-Id: I46bf5e3713b4648e9c3facf5e927e924ba51b23f
Adds tests for VectorComponentDropdown in Vector skin.
The test suite includes the following validations:
- Correct template data generation.
- Proper label, tooltip, and icon handling.
- Accurate CSS class construction for various states.
Change-Id: Iafd28cfe62eb4b8c6039f819b9d8f005b0b32d48
Adds tests for VectorComponentClientPrefs in Vector skin.
The test suite includes the following validations:
- Both pinned and unpinned states
- Correct structuring of 'data-pinnable-header'
Change-Id: I745559b2f738b4bed0f152fc8de3af1653b96ecd
Adds tests for VectorComponentButton in Vector skin.
The test suite includes the following validations:
- Various button configurations and expected CSS classes.
- Accurate template data for label, icon, href, and custom attributes.
- CSS classes according to weight, action, and iconOnly.
Change-Id: I228c197e5adee59a79ab6e2aad74ff0f18ef6b38
Adds tests for VectorComponentPinnableHeader in Vector skin.
The test suite includes the following validations:
- Correct template data generation based on constructor parameters.
- Accurate label generation from MessageLocalizer.
- Conditional logic for 'moveElement' affecting container ID attributes.
Change-Id: I2412c86e08dfca088ca57330b4dd078c212513f9
Adds tests for VectorComponentPinnableContainer in Vector skin, ensuring:
- Proper initialization with ID and pin status.
- Correct template data based on init params.
- Consistent template data for pinned/unpinned states.
Change-Id: Iec33c11b0afbe2bea5b6708b83b9ea618f7e809b
Adds tests for VectorComponentPinnableElement in Vector skin, ensuring:
- Proper instantiation with an ID parameter.
- Correct return of template data containing the ID.
- Reliability in handling element ID for use in templates and UI.
Change-Id: I3758f042ad43b90ee94a3b5aa14537fa1b0657d1
Adds tests for VectorComponentLink in Vector skin, ensuring:
- Initialization with parameters.
- Generation of html-attributes string with title and aria-label.
- Consistency in link attributes for accessibility and UX.
Change-Id: I80b8a84d1d10bc7274ba5267910206d7f6e68534
This commit introduces several changes to improve the structure and
readability of the FeatureManagement code in the Vector skin. Key
changes include:
- In ABRequirementTest.php, improved test method names for clarity.
- In ABRequirement.php, simplified property declarations and cleaned up
code structure.
- In DynamicConfigRequirement.php, cleaned up property declarations.
- In LimitedWidthContentRequirement.php, cleaned up property
declarations and added type hints.
- In LoggedInRequirement.php, cleaned up property declarations.
- In OverridableConfigRequirement.php, cleaned up property declarations.
- In OverrideableRequirementHelper.php, cleaned up property declarations.
- In SimpleRequirement.php, cleaned up property declarations.
- In UserPreferenceRequirement.php, cleaned up property declarations.
Each change aims to enhance the codebase's maintainability and
understandability. No functional changes were introduced.
Change-Id: I23283c5a6799b1f03a6a9b5832c34c7dbbcca527
The night mode setting should only show up if the feature flag
is enabled.
The messages are currently added to Vector, but we may want to upstream
these to core in future.
Change-Id: Idcd53399fa06821bbf5f463d1a242ecf59442c70
In the mobile site we want to show a notification when settings
are changed. In some cases we want to reload the page.
Bug: T350170
Change-Id: I71bd97de8e041d641aded02b8fdf84359f6d830b