You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Julien Martin <ba...@gmail.com> on 2011/07/20 18:29:39 UTC

Stylesheet in layout component causes my tests to fail...

Hello,

I am trying to get to grips with tests and Tapestry. The following layout
class...
*@Import(stylesheet = "context:/style/style.css")
public class Layout {

}*

...causes my tests to fail with the following exception:
*8392 [main] ERROR org.apache.tapestry5.ioc.Registry - Unable to locate
asset 'context:style/style.css' (the file does not exist).*

Can anyone please help?

Regards,

Julien.

Re: Stylesheet in layout component causes my tests to fail...

Posted by Julien Martin <ba...@gmail.com>.
Sorted!

I figured out from this post:
http://comments.gmane.org/gmane.comp.java.tapestry.user/81653

that I needed to specify the full path of my project i.e.
*PageTester(appPackage, appName, "web/src/main/webapp");*

instead of
*PageTester(appPackage, appName, "src/main/webapp");*

Because my project is a multi module maven project.

Very odd...

Regards,

Julien.

2011/7/20 Julien Martin <ba...@gmail.com>

> Hello Nillehammer,
> No. The problem does not occur when I run the app from the browser and does
> occur when I run the tests. Changing to "context:style etc." did not sort
> the problem.
> Any other idea?
> J.
>
>
> 2011/7/20 nillehammer <ta...@winfonet.eu>
>
>> Hi Julien,
>>
>> > @Import(stylesheet = "context:/style/style.css")
>> That's a typo leave out the leading slash after the colon, i.e.
>> "context:style/style.css"
>>
>> Regards nillehammer
>>
>> -----
>> http://www.winfonet.eu
>> --
>> View this message in context:
>> http://tapestry.1045711.n5.nabble.com/Stylesheet-in-layout-component-causes-my-tests-to-fail-tp4616463p4616558.html
>> Sent from the Tapestry - User mailing list archive at Nabble.com.
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>> For additional commands, e-mail: users-help@tapestry.apache.org
>>
>>
>

Re: Stylesheet in layout component causes my tests to fail...

Posted by Howard Lewis Ship <hl...@gmail.com>.
What kind of tests are you running?  Selenium?  PageTester?  You may
be missing some launch configuration to determine where context files
are stored.

On Wed, Jul 20, 2011 at 11:05 AM, Julien Martin <ba...@gmail.com> wrote:
> Hello Nillehammer,
> No. The problem does not occur when I run the app from the browser and does
> occur when I run the tests. Changing to "context:style etc." did not sort
> the problem.
> Any other idea?
> J.
>
> 2011/7/20 nillehammer <ta...@winfonet.eu>
>
>> Hi Julien,
>>
>> > @Import(stylesheet = "context:/style/style.css")
>> That's a typo leave out the leading slash after the colon, i.e.
>> "context:style/style.css"
>>
>> Regards nillehammer
>>
>> -----
>> http://www.winfonet.eu
>> --
>> View this message in context:
>> http://tapestry.1045711.n5.nabble.com/Stylesheet-in-layout-component-causes-my-tests-to-fail-tp4616463p4616558.html
>> Sent from the Tapestry - User mailing list archive at Nabble.com.
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>> For additional commands, e-mail: users-help@tapestry.apache.org
>>
>>
>



-- 
Howard M. Lewis Ship

Creator of Apache Tapestry

The source for Tapestry training, mentoring and support. Contact me to
learn how I can get you up and productive in Tapestry fast!

(971) 678-5210
http://howardlewisship.com

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: Stylesheet in layout component causes my tests to fail...

Posted by Julien Martin <ba...@gmail.com>.
Hello Nillehammer,
No. The problem does not occur when I run the app from the browser and does
occur when I run the tests. Changing to "context:style etc." did not sort
the problem.
Any other idea?
J.

2011/7/20 nillehammer <ta...@winfonet.eu>

> Hi Julien,
>
> > @Import(stylesheet = "context:/style/style.css")
> That's a typo leave out the leading slash after the colon, i.e.
> "context:style/style.css"
>
> Regards nillehammer
>
> -----
> http://www.winfonet.eu
> --
> View this message in context:
> http://tapestry.1045711.n5.nabble.com/Stylesheet-in-layout-component-causes-my-tests-to-fail-tp4616463p4616558.html
> Sent from the Tapestry - User mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>

Re: Stylesheet in layout component causes my tests to fail...

Posted by nillehammer <ta...@winfonet.eu>.
Hi Julien,

> @Import(stylesheet = "context:/style/style.css") 
That's a typo leave out the leading slash after the colon, i.e.
"context:style/style.css"

Regards nillehammer

-----
http://www.winfonet.eu
--
View this message in context: http://tapestry.1045711.n5.nabble.com/Stylesheet-in-layout-component-causes-my-tests-to-fail-tp4616463p4616558.html
Sent from the Tapestry - User mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org