My project is standard maven java project. I'm trying to include jasmine-maven plugin to my CI. But when I run command mvn clean install
, it runs the tests correctly. However, if I run mvn jasmine:bdd
and run the test from the browser. My html fixtures are not loaded.
This is my project structure.
project
|
|-src
|-main
|-test
|-java
|-javascript
|-jasmine
|-spec
|-spec.js
|-javascripts
| |-fixtures
| |-all_the_fixtures.html
|-lib
|-jasmine-jquery-1.3.1.js
And this is my pom.xml
<plugin>
<groupId>com.github.searls</groupId>
<artifactId>jasmine-maven-plugin</artifactId>
<version>1.2.0.0</version>
<extensions>true</extensions>
<executions>
<execution>
<goals>
<goal>
test
</goal>
</goals>
</execution>
</executions>
<configuration>
<skipTests>false</skipTests>
<jsSrcDir>${basedir}/src/main/webapp/static/js</jsSrcDir>
<jsTestSrcDir>${basedir}/src/test/java/javascript/jasmine/spec</jsTestSrcDir>
<sourceIncludes>
<include>jquery/jquery-min.js</include>
<include>src/source.js</include>
<include>src/source1.js</include>
</sourceIncludes>
<specIncludes>
<include>lib/*.js</include>
<include>**/*.js</include>
</specIncludes>
</configuration>
</plugin>
When I run the tests from the browser. All the html fixtures are 404. Is there a way to have both ways worked?
And this is how I load the fixture
it("should get content group with one breadcrumb", function() {
loadFixtures("all_the_fixtures.html");
});
And this is my jasmine-jquery path configuration
this.fixturesPath = 'spec/javascripts/fixtures/';