This question seemed to have been answered before, but the link does not exist anymore because the testacular group doesn't exist anymore. Even with my moderate search-fu skills, I was not able to find any reference to skipped tests in the angular group.
My config file in config/karma-e2e.js:
basePath = '../';
files = [
JASMINE, JASMINE_ADAPTER,
'app/assets/javascripts/v2/vendor/angular.1.0.5.js',
'app/assets/javascripts/v2/vendor/angular-*.js',
'karma/lib/angular/angular-scenario.js',
'karma/lib/angular/angular-mocks.js',
'app/assets/javascripts/v2/vendor/*.js',
'app/assets/javascripts/v2/services/*.js',
'app/assets/javascripts/v2/controllers/*.js',
'app/assets/javascripts/v2/*.js',
'karma/e2e/*.js'
];
autoWatch = true;
browsers = ['Chrome'];
singleRun = true;
proxies = {
'/': 'http://localhost:3000/'
};
junitReporter = {
outputFile: 'test_out/e2e.xml',
suite: 'e2e'
};
My app is being served up on (rails) port 3000. My test is as simple as possible. It looks like this:
'use strict';
describe("A suite", function() {
beforeEach(function() {
browser().navigateTo('/');
});
it("contains spec with an expectation", function() {
expect(true).toBe(true);
});
});
This test gets skipped!
[2013-03-30 22:35:28.945] [WARN] config - "/" is proxied, you should probably change urlRoot to avoid conflicts
INFO [karma]: Karma server started at http://localhost:9876/
INFO [launcher]: Starting browser Chrome
INFO [Chrome 26.0 (Mac)]: Connected on socket id GRDVn96Wxr7xEzxe8XjU
Chrome 26.0 (Mac): Executed 0 of 1 (skipped 1) SUCCESS (3.771 secs / 0 secs)
Even if I use ddescribe or iit, to try forcing to run it, I still gets skipped. What is the bug that was referenced by the previous question?
I'm using karma 0.8.0 & angular-scenario 1.0.5 . I was able to run the e2e tests from angular-seed successfully, so I'm totally puzzled. Any help would be appreciated. Thanks.
You should change from the JASMINE runner to the ANGULAR_SCENARIO runner.
When you are running E2E tests the test runner will be connecting to your running site and relying on it to serve the proper application under test. Where it connects for various parts of your application can be controlled by the proxies config. The only other thing you need to provide Karma with are the scenario runner and tests themselves.
Note: even in angular-seed there is a different config for e2e tests and unit tests. Notice the config for the files array in the e2e config:
files = [
ANGULAR_SCENARIO,
ANGULAR_SCENARIO_ADAPTER,
'test/e2e/**/*.js'
];
this is now deprecated in favour of this in settings:
...
frameworks: ["ng-scenario"],
...
you also need to install it via:
npm install karma-ng-scenario