Examples of StyleDef


Examples of org.auraframework.def.StyleDef

    public void testCompilationPlugins() throws Exception {
        TestStyleAdapter adapter = TestStyleAdapter.compilation(observer);
        when(locator.get(StyleAdapter.class)).thenReturn(adapter);

        DefDescriptor<StyleDef> desc = addStyleDef(".THIS{color:red}");
        StyleDef def = desc.getDef();

        assertEquals("expected plugin to run at compilation", 1, observer.count);

        def.getCode();
        assertEquals("did not expect plugin to run at runtime", 1, observer.count);
    }
View Full Code Here

Examples of org.auraframework.def.StyleDef

    public void testRuntimePlugins() throws Exception {
        TestStyleAdapter adapter = TestStyleAdapter.runtime(observer);
        when(locator.get(StyleAdapter.class)).thenReturn(adapter);

        DefDescriptor<StyleDef> desc = addStyleDef(".THIS{color:red}");
        StyleDef def = desc.getDef();

        assertEquals("expected plugin to run at compilation", 1, observer.count);

        def.getCode();
        assertEquals("expected plugin to run at runtime", 2, observer.count);
    }
View Full Code Here

Examples of org.auraframework.def.StyleDef

     *
     * Expected result: Pick up only the style defined in file named exactly as the component but with a .css file type.
     */
    public void testTwoCssFilesForAComponent() throws Exception {
        DefDescriptor<StyleDef> descriptor = DefDescriptorImpl.getInstance("test.testTwoCSSFiles", StyleDef.class);
        StyleDef style = descriptor.getDef();
        assertTrue(style.getName().equals("testTwoCSSFiles"));
        serializeAndGoldFile(style, "_styleDef");
    }
View Full Code Here

Examples of org.auraframework.def.StyleDef

     *
     * Expected result: Pick up only the style defined in file.
     */
    public void testValidCss() throws Exception {
        DefDescriptor<StyleDef> descriptor = DefDescriptorImpl.getInstance("test.testValidCSS", StyleDef.class);
        StyleDef style = descriptor.getDef();
        assertTrue(style.getName().equals("testValidCSS"));
        serializeAndGoldFile(style, "_styleDef");
    }
View Full Code Here

Examples of org.auraframework.def.StyleDef

     *
     * Expected result: The parser just considers the css file for the parent for validation.
     */
    public void testValidNestedComponents() throws Exception {
        DefDescriptor<StyleDef> descriptor = DefDescriptorImpl.getInstance("test.testStyleValidParent", StyleDef.class);
        StyleDef style = descriptor.getDef();
        assertTrue(style.getName().equals("testStyleValidParent"));
        serializeAndGoldFile(style, "_styleDef");
    }
View Full Code Here

Examples of org.auraframework.def.StyleDef

     * Expected result: Css file is valid.
     */
    public void testStyleNamespaceToken() throws Exception {
        DefDescriptor<StyleDef> descriptor = DefDescriptorImpl.getInstance("test.testStyleNamespaceToken",
                StyleDef.class);
        StyleDef style = descriptor.getDef();
        assertTrue(style.getName().equals("testStyleNamespaceToken"));
        serializeAndGoldFile(style, "_styleDef");
    }
View Full Code Here

Examples of org.auraframework.def.StyleDef

     * Expected result: The parser just considers the css file for the parent for validation.
     */
    public void testStyleNamespaceTokenValidCss() throws Exception {
        DefDescriptor<StyleDef> descriptor = DefDescriptorImpl.getInstance("test.testStyleNamespaceTokenValidCSS",
                StyleDef.class);
        StyleDef style = descriptor.getDef();
        assertTrue(style.getName().equals("testStyleNamespaceTokenValidCSS"));
        serializeAndGoldFile(style, "_styleDef");
    }
View Full Code Here

Examples of org.auraframework.def.StyleDef

        DefDescriptor<StyleDef> descriptor = DefDescriptorImpl.getInstance("test.testStyleNamespaceTrueConditions",
                StyleDef.class);
        Aura.getContextService()
                .getCurrentContext()
                .setClient(new Client(UserAgent.GOOGLE_CHROME.getUserAgentString()));
        StyleDef style = descriptor.getDef();
        assertTrue(style.getName().equals("testStyleNamespaceTrueConditions"));
        goldFileText(style.getCode());
    }
View Full Code Here

Examples of org.auraframework.def.StyleDef

        DefDescriptor<StyleDef> descriptor = DefDescriptorImpl.getInstance("test.testStyleNamespaceMediaAndConditions",
                StyleDef.class);
        Aura.getContextService()
                .getCurrentContext()
                .setClient(new Client(UserAgent.GOOGLE_CHROME.getUserAgentString()));
        StyleDef style = descriptor.getDef();
        assertTrue(style.getName().equals("testStyleNamespaceMediaAndConditions"));
        goldFileText(style.getCode());
    }
View Full Code Here

Examples of org.auraframework.def.StyleDef

     * Tests keyframes
     */
    public void testKeyframes() throws Exception {
        DefDescriptor<StyleDef> descriptor = DefDescriptorImpl.getInstance("test.testStyleNamespaceKeyframes",
                StyleDef.class);
        StyleDef style = descriptor.getDef();
        goldFileText(style.getCode());
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.