Questions tagged [angular-scenario]

A specific test case or condition for AngularJS.

33 questions
31
votes
1 answer

angular-scenario e2e testing - waiting for key events to complete before proceeding

How are people writing angular e2e tests that involve triggering a sequence of UI events? The async nature of scenario seems to make it difficult. details: I'm writing tests for an app that has a lot of key handling to help speed editing of a…
hemul
  • 311
  • 2
  • 3
9
votes
2 answers

Is it possible to mix Testacular (Karma) with angular-scenario?

Testacular (now Karma) is awesome, so is angular-scenario. Using them together is proving a challenge however. There is an ANGULAR-SCENARIO-ADAPTER in Testacular, but that breaks simple tests. If you include angular-scenario.js yourself Testacular…
iwein
  • 24,288
  • 9
  • 67
  • 108
7
votes
3 answers

How to use angular-scenario with requirejs

Angular-scenario works well when your angular app is ready on DOM ready. Is not the case when using requirejs or an other AMD lib. How to add support for AMD in angular-scenario?
Francis
  • 3,170
  • 15
  • 45
4
votes
0 answers

Subsequent variable declarations must have the same type. Variable 'angular' must be of type 'IAngularStatic', but here has type 'IAngularStatic'

Error happens while I try to get definitions via tsd from DefinitelyTyped Repo. Subsequent variable declarations must have the same type. Variable 'angular' must be of type 'IAngularStatic', but here has type 'IAngularStatic' When I google…
asdf_enel_hak
  • 7,114
  • 3
  • 36
  • 77
2
votes
1 answer

Scope variables undefined when testing controller with Karma and Jasmine with ng-scenario as framework

I've just started to discover angular unit testing mysteries using Karma & Jasmine and I have some problems with controllers tests. I've wrote tests to see if variables are defined: expect(scope.someVariable).toBeDefined(). Everything worked as…
Cosmin
  • 2,146
  • 18
  • 37
2
votes
1 answer

Karma, the test doesn't run

this is what my karma code looks like .. describe('E2E: Testing Controllers', function() { beforeEach(function() { browser().navigateTo('/dashboard/'); }); it('should have a working home page controller that applies the leads to scope',…
Yousuf Jawwad
  • 2,721
  • 7
  • 31
  • 54
2
votes
1 answer

How to use Angular Scenario Runner to run a subset of the test suite?

I am developing an application based on TDD. For the server-side everything is fine as Python test runner are great. For JS, I start using mocha which is also great. I have wrote my first tests with Karma and Angular Scenario Runner and it also…
Adi Roiban
  • 1,224
  • 2
  • 13
  • 28
2
votes
1 answer

AngularJS scenarios expect class and futures

I'm trying to write a test that checks whether or not an element has a class: element('#header-menu .menu-component-item a').query(function(els, done) { var el = els.eq(4); el.click(); sleep(.25); …
Ahmed Nuaman
  • 11,324
  • 13
  • 50
  • 80
2
votes
1 answer

Angularjs e2e testing past/future comparisons

I'm currently trying to figure out if there is a way to do a simple future/past comparison ex. 1) Check state of list by getting list length 2) Perform action which if success increments the list 3) Compare the current list length to the past. But…
Hampus Ahlgren
  • 519
  • 1
  • 5
  • 15
1
vote
2 answers

Angular Scenario Runner vs Protractor

Am I correct in saying that Protractor must have the Protractor/Selenium Webdriver installed on the machine where the tests are being run but Angular Scenario runner executes within the browser? I would essentially love to be able to run…
Mark Gargan
  • 657
  • 8
  • 16
1
vote
1 answer

Angular Karma e2e with Grunt

I am trying to test In the grunt file karma: { e2e: { configFile: 'karma-e2e.conf.js', singleRun: true } }, Karma file is basically what Yeoman generated for me. Only change is I swithed Chrome for PhantomJS. karma-e2e.conf.js: //…
pethel
  • 4,748
  • 10
  • 50
  • 79
1
vote
1 answer

Why was Protractor chosen over angular-scenario?

What is the added value of Protractor over angular-scenario ? I tried to find out why was angular-scenario on the deprecation path, I have read this post, and watched this video , but I am still unsatisfied by the fact there are no obvious advantage…
bdavidxyz
  • 2,242
  • 1
  • 17
  • 28
1
vote
2 answers

Angularjs e2e testing with scenario test runner - ignore alert()

I'm creating the e2e test for my application and I have a problem when I'm testing the login page. I want to test both the correct login and the incorrect one but the problem is that when you enter incorrect credentials you get an alert("Your email…
Adrian Neatu
  • 1,889
  • 19
  • 29
1
vote
0 answers

angular e2e tests showing strange behavior : some tests fail when launched from command-line but succeed when directly form the browser

I have an app with a rails backend and an angularjs frontend. I wrote some e2e tests for angular. They perfectly works when I type the url on my browser ( http://localhost:3000/clientapi/test/e2e/runner.html ) but when I start them from the command…
PerrierCitror
  • 1,671
  • 3
  • 16
  • 31
1
vote
1 answer

Trouble with Karma + AngularJS Scenario Test Runner and a form

Ok, I'm having issues with my Test Runner where it is filling out the fields on the form but when I then submit the forms it refers to these fields as blank. If I write to the field using element('some_element).val('some_val') this works fine. If I…
roadkill247
  • 203
  • 1
  • 4
  • 11
1
2 3