From f7d28cd377f06224247b950680517a187a7b6749 Mon Sep 17 00:00:00 2001 From: Caitlin Potter Date: Thu, 6 Feb 2014 14:02:18 +0000 Subject: docs(all): convert
/
snippets to GFM snippets --- docs/content/guide/dev_guide.e2e-testing.ngdoc | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'docs/content/guide/dev_guide.e2e-testing.ngdoc') diff --git a/docs/content/guide/dev_guide.e2e-testing.ngdoc b/docs/content/guide/dev_guide.e2e-testing.ngdoc index e0d3f61d..d72cb9b3 100644 --- a/docs/content/guide/dev_guide.e2e-testing.ngdoc +++ b/docs/content/guide/dev_guide.e2e-testing.ngdoc @@ -31,7 +31,7 @@ In addition to the above elements, scenarios may also contain helper functions t code in the `it` blocks. Here is an example of a simple scenario: -
+```js
 describe('Buzz Client', function() {
 it('should filter results', function() {
   input('user').enter('jacksparrow');
@@ -41,7 +41,7 @@ it('should filter results', function() {
   expect(repeater('ul li').count()).toEqual(1);
 });
 });
-
+``` Note that [`input('user')`](https://github.com/angular/angular.js/blob/master/docs/content/guide/dev_guide.e2e-testing.ngdoc#L119) @@ -190,7 +190,7 @@ be negated with `not()`. For instance: `expect(element('h1').text()).not().toEqu Source: https://github.com/angular/angular.js/blob/master/src/ngScenario/matchers.js -
+```js
 // value and Object comparison following the rules of angular.equals().
 expect(value).toEqual(value)
 
@@ -219,7 +219,7 @@ expect(value).toContain(expected)
 // number comparison using < and >
 expect(value).toBeLessThan(expected)
 expect(value).toBeGreaterThan(expected)
-
+``` # Example See the [angular-seed](https://github.com/angular/angular-seed) project for more examples. @@ -239,7 +239,7 @@ Imagine the application to be structured into two views: 2. a *detail view* which shows the entries' details and contains a delete button. When clicking the delete button, the user is redirected back to the *overview page*. -
+```js
 beforeEach(function () {
   var deleteEntry = function () {
     browser().navigateTo('/entries');
@@ -276,24 +276,24 @@ beforeEach(function () {
   // start deleting entries
   deleteEntry();
 });
-
+``` In order to understand what is happening, we should emphasize that ngScenario calls are not immediately executed, but queued (in ngScenario terms, we would be talking about adding future actions). If we had only one entry in our table, then the following future actions would be queued: -
+```js
 // delete entry 1
 browser().navigateTo('/entries');
 element('table tbody').query(function (tbody, done) { ... });
 element('table tbody a');
 element('.btn-danger').click();
-
+``` For two entries, ngScenario would have to work on the following queue: -
+```js
 // delete entry 1
 browser().navigateTo('/entries');
 element('table tbody').query(function (tbody, done) { ... });
@@ -306,7 +306,7 @@ element('.btn-danger').click();
     element('table tbody').query(function (tbody, done) { ... });
     element('table tbody a');
     element('.btn-danger').click();
-
+``` # Caveats -- cgit v1.2.3