Github user daserge commented on a diff in the pull request:

    https://github.com/apache/cordova-windows/pull/195#discussion_r79804658
  
    --- Diff: spec/unit/AppxManifest.spec.js ---
    @@ -187,6 +187,27 @@ describe('AppxManifest', function () {
             it('refineColor should leave CSS color name as is', function () {
                 expect(refineColor(CSS_COLOR_NAME)).toEqual(CSS_COLOR_NAME);
             });
    +        
    +        it('setForegroundText should change the ForegroundText property on 
non-Windows 10 platforms', function () {
    +            var visualElementsWindows = 
AppxManifest.get(WINDOWS_MANIFEST).getVisualElements();
    +            var visualElementsWindows10 = 
AppxManifest.get(WINDOWS_10_MANIFEST).getVisualElements();
    +            
    +            var foregroundTextLight = 'light';
    +            var foregroundTextDark = 'dark';
    +            
    +            // Set to 'light'
    +            visualElementsWindows.setForegroundText(foregroundTextLight);
    +            
expect(visualElementsWindows.getForegroundText()).toEqual(foregroundTextLight);
    +            
    +            // Set to 'dark'
    +            visualElementsWindows.setForegroundText(foregroundTextDark);
    +            
expect(visualElementsWindows.getForegroundText()).toEqual(foregroundTextDark);
    +            
    --- End diff --
    
    It also would be good to add a case for missing preference:
    ```javascript
                // Simulate the absence of preference, should default to 'light'
                visualElementsWindows.setForegroundText(undefined);
                
expect(visualElementsWindows.getForegroundText()).toEqual(foregroundTextLight);
    ```


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@cordova.apache.org
For additional commands, e-mail: dev-h...@cordova.apache.org

Reply via email to