Class ComponentAssert

    • Constructor Detail

      • ComponentAssert

        public ComponentAssert()
    • Method Detail

      • assertValidComponentNode

        public static void assertValidComponentNode​(AbstractComponent comp)
                                             throws org.apache.sling.testing.clients.ClientException,
                                                    InterruptedException
        Checks if the component's node has the minimum to be a valid component node.
        Parameters:
        comp - the component class referencing the component on the server
        Throws:
        org.apache.sling.testing.clients.ClientException - if requesting json node of fails for some reason
        InterruptedException - to mark this method as waiting
      • assertStringProperty

        public static void assertStringProperty​(AbstractComponent comp,
                                                String value,
                                                String propName)
        Checks if the property of a node is set to the correct value.
        Parameters:
        comp - the compent that contains the property
        value - the expected value
        propName - the name of the property to check
      • assertUploadedImage

        public static void assertUploadedImage​(CQClient client,
                                               String imagePath,
                                               String resourcePath)
                                        throws org.apache.sling.testing.clients.ClientException,
                                               IOException
        Throws:
        org.apache.sling.testing.clients.ClientException
        IOException
      • assertBinaryCompare

        public static void assertBinaryCompare​(InputStream inStream1,
                                               InputStream inStream2)
                                        throws org.apache.sling.testing.clients.ClientException
        Throws:
        org.apache.sling.testing.clients.ClientException
      • assertHasEditDialog

        public static void assertHasEditDialog​(org.apache.sling.testing.clients.AbstractSlingClient client,
                                               String resourceType)
                                        throws org.apache.sling.testing.clients.ClientException
        Checks if the component type has a edit dialog defined.
        Parameters:
        client - client to be used
        resourceType - the component to check
        Throws:
        org.apache.sling.testing.clients.ClientException - if requesting the dialog definition as json fails