package org.apache.tapestry5.integration.app3

import org.apache.tapestry5.integration.TapestryCoreTestCase
import org.testng.annotations.Test

class PageCatalogTests extends TapestryCoreTestCase
{
    @Test
    void load_page_catalog_page()
    {
        def title = "Tapestry 5: Page Catalog"

        open("${baseURL}pagecatalog")

        assertTitle title

        click "link=clear the cache"

        waitForAjaxRequestsToComplete "500"

        assertTextPresent "Page cache cleared"

        click "link=Run the GC"

        waitForAjaxRequestsToComplete "500"

        assertTextPresent "Garbage collection freed"

        click "link=load all pages"

        waitForAjaxRequestsToComplete "2000"

        assertTextPresent "new pages for selector"
    }
}

package org.apache.tapestry5.integration.app3

import org.apache.tapestry5.integration.TapestryCoreTestCase
import org.testng.annotations.Test

class PageCatalogTests extends TapestryCoreTestCase
{
    @Test
    void load_page_catalog_page()
    {
        def title = "Tapestry 5: Page Catalog"

        open("${baseURL}pagecatalog")

        assertTitle title

        click "link=clear the cache"

        sleep 500

        assertTextPresent "Page cache cleared"

        click "link=Run the GC"

        sleep 500

        assertTextPresent "Garbage collection freed"

        click "link=load all pages"

        sleep 1000

        assertTextPresent "new pages for selector"
    }
}

Fix semi-broken tests via a sleep, rather than attempting to wait on Ajax operations
Fix semi-broken tests via a sleep, rather than attempting to wait on Ajax operations

git-svn-id: d9b8539636d91aff9cd33ed5cd52a0cf73394897@1179660 13f79535-47bb-0310-9956-ffa450edef68
