Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/CeibalEncuestaWeb/webapp/test/e2e/scenarios.js
diff options
context:
space:
mode:
Diffstat (limited to 'CeibalEncuestaWeb/webapp/test/e2e/scenarios.js')
-rw-r--r--CeibalEncuestaWeb/webapp/test/e2e/scenarios.js45
1 files changed, 45 insertions, 0 deletions
diff --git a/CeibalEncuestaWeb/webapp/test/e2e/scenarios.js b/CeibalEncuestaWeb/webapp/test/e2e/scenarios.js
new file mode 100644
index 0000000..26e174a
--- /dev/null
+++ b/CeibalEncuestaWeb/webapp/test/e2e/scenarios.js
@@ -0,0 +1,45 @@
+'use strict';
+
+/* http://docs.angularjs.org/guide/dev_guide.e2e-testing */
+
+describe('my app', function() {
+
+ beforeEach(function() {
+ browser().navigateTo('../../app/index.html');
+ });
+
+
+ it('should automatically redirect to /view1 when location hash/fragment is empty', function() {
+ expect(browser().location().url()).toBe("/view1");
+ });
+
+
+ describe('view1', function() {
+
+ beforeEach(function() {
+ browser().navigateTo('#/view1');
+ });
+
+
+ it('should render view1 when user navigates to /view1', function() {
+ expect(element('[ng-view] p:first').text()).
+ toMatch(/partial for view 1/);
+ });
+
+ });
+
+
+ describe('view2', function() {
+
+ beforeEach(function() {
+ browser().navigateTo('#/view2');
+ });
+
+
+ it('should render view2 when user navigates to /view2', function() {
+ expect(element('[ng-view] p:first').text()).
+ toMatch(/partial for view 2/);
+ });
+
+ });
+});