Package org.auraframework.def

Examples of org.auraframework.def.ComponentDef


                "<aura:component>" +
                        "<aura:clientLibrary name='HTML5Shiv' type='JS' />" +
                        "<aura:clientLibrary name='UIPerf' type='JS' modes=''/>" +
                        "</aura:component>", "myID",
                Format.XML);
        ComponentDef cmpDef = parser.parse(descriptor, source);
        List<ClientLibraryDef> libraries = cmpDef.getClientLibraries();
        assertEquals(2, libraries.size());
        ClientLibraryDef cld1 = libraries.get(0);
        assertTrue(cld1.getModes().isEmpty());

        ClientLibraryDef cld2 = libraries.get(1);
View Full Code Here


                "<aura:component>" +
                        "<aura:clientLibrary name='HTML5Shiv' type='JS' modes='DEV'/>" +
                        "<aura:clientLibrary name='UIPerf' type='JS' modes='DEV,FTEST'/>" +
                        "</aura:component>", "myID",
                Format.XML);
        ComponentDef cmpDef = parser.parse(descriptor, source);
        List<ClientLibraryDef> libraries = cmpDef.getClientLibraries();
        assertEquals(2, libraries.size());

        ClientLibraryDef cld1 = libraries.get(0);
        assertEquals(1, cld1.getModes().size());
        assertTrue(cld1.getModes().contains(Mode.DEV));
View Full Code Here

        StringSource<ComponentDef> source = new StringSource<>(descriptor,
                "<aura:component>" +
                        "<aura:clientLibrary name='HTML5Shiv' type='JS' modes='fooBar'/>" +
                        "</aura:component>", "myID",
                Format.XML);
        ComponentDef cd = parser.parse(descriptor, source);
        try {
          cd.validateDefinition();
            fail("Should not accept invalid mode specification.");
        } catch (Exception e) {
            checkExceptionFull(e, InvalidDefinitionException.class, "Invalid mode specified");
        }
    }
View Full Code Here

        StringSource<ComponentDef> source = new StringSource<>(descriptor,
                "<aura:component>" +
                        "<aura:clientLibrary name='HTML5Shiv' type='JS' modes='DEV'/>" +
                "</aura:component>", "myID",
                Format.XML);
        ComponentDef cmpDef = parser.parse(descriptor, source);
        List<ClientLibraryDef> libraries = cmpDef.getClientLibraries();
        assertEquals(1, libraries.size());

        ClientLibraryDef cld1 = libraries.get(0);
        assertFalse(cld1.shouldCombine());
    }
View Full Code Here

                        "<aura:clientLibrary url='https://www.likeaboss.com/jslibrary/xyz/sfdc/Zen.js' combine='true'/>" + //6
                        "<aura:clientLibrary url='http://www.likeaboss.com/jslibrary/xyz/sfdc/Zen.js' combine='true'/>" + //7
                        "<aura:clientLibrary name='UIPerf' type='JS' combine='false'/>" + //8
                        "</aura:component>", "myID",
                Format.XML);
        ComponentDef cmpDef = parser.parse(descriptor, source);
        List<ClientLibraryDef> libraries = cmpDef.getClientLibraries();
        assertEquals(9, libraries.size());
        ClientLibraryDef cld;
        for(int i= 0; i< 3; i++){
             cld = libraries.get(i);
            assertTrue(i + " should be combine", cld.shouldCombine());
View Full Code Here

                        "<aura:clientLibrary url='//jslibrary/abc/sfdc/Alto.js' combine='false'/>" + //4
                        "<aura:clientLibrary url='https://www.likeaboss.com/jslibrary/xyz/sfdc/Zen.js' combine='false'/>" + //5
                        "<aura:clientLibrary url='http://www.likeaboss.com/jslibrary/xyz/sfdc/Zen.js' combine='false'/>" + //6
                        "</aura:component>", "myID",
                Format.XML);
        ComponentDef cmpDef = parser.parse(descriptor, source);
        List<ClientLibraryDef> libraries = cmpDef.getClientLibraries();
        assertEquals(6, libraries.size());
        ClientLibraryDef cld;
        for(int i= 0; i< 6; i++){
             cld = libraries.get(i);
            assertFalse(cld.shouldCombine());
View Full Code Here

                "<aura:component>" +
                        "<aura:clientLibrary url='js://clientLibraryTest.clientLibraryTest' type='JS' combine='false'/>" + //2
                        "<aura:clientLibrary url='css://clientLibraryTest.clientLibraryTest' type='CSS' combine='false' />"+ //3
                        "</aura:component>", "myID",
                Format.XML);
        ComponentDef cmpDef = parser.parse(descriptor, source);
        List<ClientLibraryDef> libraries = cmpDef.getClientLibraries();
        assertEquals(2, libraries.size());
        ClientLibraryDef cld;
        for(int i= 0; i< 2; i++){
             cld = libraries.get(i);
            assertTrue(cld.shouldCombine());
View Full Code Here

        StringSource<ComponentDef> source = new StringSource<>(descriptor,
                "<aura:component>" +
                        "<aura:clientLibrary name='HTML5Shiv' type='JS' modes='DEV'/>" +
                        "</aura:component>", "myID",
                Format.XML);
        ComponentDef cmpDef = parser.parse(descriptor, source);
        List<ClientLibraryDef> libraries = cmpDef.getClientLibraries();
        assertEquals(1, libraries.size());

        ClientLibraryDef cld = libraries.get(0);
        assertEquals("", cld.getUrl());
    }
View Full Code Here

        Aura.getContextService().startContext(Mode.SELENIUM, Format.JSON, Authentication.AUTHENTICATED);

        // Build component where the new attribute is created
        BuilderService builderService = Aura.getBuilderService();
        DefinitionService definitionService = Aura.getDefinitionService();
        ComponentDef def = builderService.getComponentDefBuilder().setDescriptor(defDescriptor).build();
        definitionService.save(def);
    }
View Full Code Here

        XMLParser parser = XMLParser.getInstance();
        DefDescriptor<ComponentDef> descriptor = DefDescriptorImpl.getInstance("test:fakeparser", ComponentDef.class);
        StringSource<ComponentDef> source = new StringSource<>(descriptor,
                "<aura:component><aura:handler event='aura:click' action='{!c.action}'/></aura:component>", "myID",
                Format.XML);
        ComponentDef def = parser.parse(descriptor, source);
        assertNotNull(def);
    }
View Full Code Here

TOP

Related Classes of org.auraframework.def.ComponentDef

Copyright © 2018 www.massapicom. 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.