A specific test case or condition for AngularJS.
Questions tagged [angular-scenario]
32 questions
1
vote
2 answers
Angular unit tests: Browser is not defined?
I'm running unit tests on a controller in an angular app. My test so far is:
describe('Controller', function () {
var scope, ctrl;
beforeEach(module('myApp'));
beforeEach(inject(function ($rootScope,
…

jclancy
- 49,598
- 5
- 30
- 34
1
vote
1 answer
Testing a non-trivial AngularJS app with Karma
I've been writing attempting to setup a testing suite for an application that I've been developing. The app is hosted locally, and on most accounts works fine. I've tried to setup karma via the instructions on AngularJS's site, and on Karma's site,…

andy
- 81
- 3
- 9
1
vote
1 answer
Angularjs share functions inside service
I am working with an angular app, where service are as declared as follows:
App.service("myService", function(){
this.calculation1 = function(){
var util = function(){
}
//doing somthing
}
this.calculation2 = function(){
//…

arnold
- 1,682
- 8
- 24
- 31
1
vote
1 answer
How to assert the page title using AngularJS Scenario
I tried the following but got an error : expect undefined toBe "/"
browser().navigateTo('/');
expect(browser().location().url()).toBe("/");
expect(document.title).toBe("something");
Page does have a title "something".

Rajiv
- 2,352
- 1
- 22
- 25
1
vote
1 answer
Getting "Frame window is not acessible" while calling custom DSL
I grabbed Angular Seed project and modified its scenario test. I'm trying a really simple test, so I believe it's something I'm missing. Here is the DSL and Scenario spec:
angular.scenario.dsl('customDsl', function() {
return function(selector) {
…

Caio Cunha
- 23,326
- 6
- 78
- 74
1
vote
1 answer
angularjs triggerHandler is not firing binded event in unit test
with angularJs 1.0.2 I created simple directive that binds to click event on element.
I tried to unittest it with testacular
var linked;
beforeEach(inject(function($rootScope, $compile) {
scope = $rootScope.$new();
var widget_definition =…

pawel.kaminski
- 77
- 1
- 2
- 7
0
votes
2 answers
What is the test case format in gherkin language?
I have a mock up profile page of a gym and I'm to write test cases for editing that profile page in gherkin language. I don't the gherkin test case format. Can anyone please help me with this?

Satish Amaravati
- 1
- 4
0
votes
0 answers
$document.injector is not a function in Karma E2E Tests
I have been trying to resolve this from a month now but no luck yet. I am doing E2E(End-to-End) testing using karma and ng-Scenario for my angular application running on server. I know there is a more robust tool(Protractor) available for end to end…

Dheeraj Moudgil
- 51
- 1
- 6
0
votes
2 answers
Update View when Scope changes Angular js
I am working on an angular social app where i have few issues related to scope binding.
I have a scope data coming from http service which lists user's subscriber. Whenever in search
user search for any user and wants to add him then at this time i…

Anil Sharma
- 2,952
- 5
- 29
- 45
0
votes
1 answer
angularjs add a model layer
I am using angular with rails backend and I am using $resource to interact backend API. so I have a User service which is a $resource instance
App.factory('User', ['$resource', function($resource) {
return $resource('/users/:id',{id:…

fuyi
- 2,573
- 4
- 23
- 46
0
votes
1 answer
Using Helper in AngularJS
I am working on an Social app using laravel and angularjs.
I have a situation where when i check for user relation using helper.
**Html**
//showing users other info
0
votes
1 answer
Reuse E2E testing scenario in multiple scenarios
I have an application on which I want to implement multiple E2E testing scenarios, each specific to a section of the application. The problem is that my application requires a login. I have created a login scenario, it all works fine. For describing…

Adrian Marinica
- 2,191
- 5
- 29
- 53
0
votes
1 answer
Including angular-scenario.js breaks my Rails Jasmine tests, as in they don't run
I have some Jasmine tests for my (currently) very simple site consisting of a Rails back end and an AngularJS front end. I'm trying to do some Jasmine end-to-end testing, but including angular-scenario.js makes my tests not run. It doesn't make them…

MechaChad
- 15
- 1
- 4
0
votes
1 answer
Angular E2E scenario selector does not detect if hyperlink is visible
I have the following e2e test:
expect(element('a[name="prevStepButton"]:visible').count()).toEqual(1);
On the following template:
Previous
Where…

Geert Van Laethem
- 717
- 1
- 8
- 23
0
votes
1 answer
Order of execution of AngularJS E2E tests
So, I noticed that the it() functions inside describe() blocks don't (always) run in the order I wrote them.
Are they asynchronous then? And how to force them to run in a certain order ?
I want to chain a bunch of UI mutations and basically have…

holographic-principle
- 19,688
- 10
- 46
- 62