From 92ebf11b2aaaa357b7d3d91c297b747ae4b8fdf0 Mon Sep 17 00:00:00 2001
From: Vojta Jina
Date: Fri, 17 Jun 2011 19:06:27 +0200
Subject: Remove obsolete scenario folder
* moved scenario e2e tests in test/scenario/e2e folder
* remove $location test
---
scenario/Runner-compiled.html | 9 ---
scenario/Runner.html | 9 ---
scenario/application-account.html | 6 --
scenario/application.html | 34 -----------
scenario/browser.html | 22 -------
scenario/datastore-scenarios.js | 19 ------
scenario/datastore.html | 17 ------
scenario/location.html | 19 ------
scenario/perf.html | 33 -----------
scenario/style.css | 11 ----
scenario/widgets-scenario.js | 69 ----------------------
scenario/widgets.html | 104 ---------------------------------
test/scenario/e2e/Runner-compiled.html | 9 +++
test/scenario/e2e/Runner.html | 9 +++
test/scenario/e2e/style.css | 11 ++++
test/scenario/e2e/widgets-scenario.js | 65 +++++++++++++++++++++
test/scenario/e2e/widgets.html | 99 +++++++++++++++++++++++++++++++
17 files changed, 193 insertions(+), 352 deletions(-)
delete mode 100644 scenario/Runner-compiled.html
delete mode 100644 scenario/Runner.html
delete mode 100644 scenario/application-account.html
delete mode 100644 scenario/application.html
delete mode 100644 scenario/browser.html
delete mode 100644 scenario/datastore-scenarios.js
delete mode 100644 scenario/datastore.html
delete mode 100644 scenario/location.html
delete mode 100644 scenario/perf.html
delete mode 100644 scenario/style.css
delete mode 100644 scenario/widgets-scenario.js
delete mode 100644 scenario/widgets.html
create mode 100644 test/scenario/e2e/Runner-compiled.html
create mode 100644 test/scenario/e2e/Runner.html
create mode 100644 test/scenario/e2e/style.css
create mode 100644 test/scenario/e2e/widgets-scenario.js
create mode 100644 test/scenario/e2e/widgets.html
diff --git a/scenario/Runner-compiled.html b/scenario/Runner-compiled.html
deleted file mode 100644
index 78cd7e57..00000000
--- a/scenario/Runner-compiled.html
+++ /dev/null
@@ -1,9 +0,0 @@
-
-
-
-
-
-
-
-
-
diff --git a/scenario/Runner.html b/scenario/Runner.html
deleted file mode 100644
index fa3ccf23..00000000
--- a/scenario/Runner.html
+++ /dev/null
@@ -1,9 +0,0 @@
-
-
-
-
-
-
-
-
-
diff --git a/scenario/application-account.html b/scenario/application-account.html
deleted file mode 100644
index 81176df7..00000000
--- a/scenario/application-account.html
+++ /dev/null
@@ -1,6 +0,0 @@
-
-account page goes here!
-
-
-
-
diff --git a/scenario/application.html b/scenario/application.html
deleted file mode 100644
index 5d5bb809..00000000
--- a/scenario/application.html
+++ /dev/null
@@ -1,34 +0,0 @@
-
-
-
-
-
-
-
-
- [ login
- | account
- ]
-
-
- login screen
-
-
-
-
- (( input name ))
-
- $location={{$location}}
-
-
diff --git a/scenario/browser.html b/scenario/browser.html
deleted file mode 100644
index eac43692..00000000
--- a/scenario/browser.html
+++ /dev/null
@@ -1,22 +0,0 @@
-
-
-
-
-
-
-
- Should mark input field red and create hover
-
-
- Should reflect changes in URL
- $location={{$location}}
- hash:
- hashPath:
- hashSearch:
-
- Should reflect changes in Cookie
- $cookies={{$cookies}}
- $cookies:
-
-
-
diff --git a/scenario/datastore-scenarios.js b/scenario/datastore-scenarios.js
deleted file mode 100644
index a844ac53..00000000
--- a/scenario/datastore-scenarios.js
+++ /dev/null
@@ -1,19 +0,0 @@
-angular.scenarioDef.datastore = {
- $before:[
- {Given:"dataset",
- dataset:{
- Book:[{$id:'moby', name:"Moby Dick"},
- {$id:'gadsby', name:'Great Gadsby'}]
- }
- },
- {Given:"browser", at:"datastore.html#book=moby"},
- ],
- checkLoadBook:[
- {Then:"drainRequestQueue"},
-
- {Then:"text", at:"{{book.$id}}", should_be:"moby"},
- {Then:"text", at:"li[$index=0] {{book.name}}", should_be:"Great Gahdsby"},
- {Then:"text", at:"li[$index=0] {{book.name}}", should_be:"Moby Dick"},
-
- ]
-};
diff --git a/scenario/datastore.html b/scenario/datastore.html
deleted file mode 100644
index 1720b3bc..00000000
--- a/scenario/datastore.html
+++ /dev/null
@@ -1,17 +0,0 @@
-
-
-
-
-
-
-
-
-
- {{book.$id}}
-
- {{book.name}}
-
-
-
diff --git a/scenario/location.html b/scenario/location.html
deleted file mode 100644
index 75041615..00000000
--- a/scenario/location.html
+++ /dev/null
@@ -1,19 +0,0 @@
-
-
-
-
-
-
-
- $location={{$location}}
- Hash Search:
-
-
- href:
- hash:
- hashPath:
- hashSearch:
-
-
diff --git a/scenario/perf.html b/scenario/perf.html
deleted file mode 100644
index 94af8b69..00000000
--- a/scenario/perf.html
+++ /dev/null
@@ -1,33 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/scenario/style.css b/scenario/style.css
deleted file mode 100644
index 43690e2c..00000000
--- a/scenario/style.css
+++ /dev/null
@@ -1,11 +0,0 @@
-th {
- text-align: left;
-}
-
-tr {
- border: 1px solid black;
-}
-
-.redbox {
- background-color: red;
-}
\ No newline at end of file
diff --git a/scenario/widgets-scenario.js b/scenario/widgets-scenario.js
deleted file mode 100644
index f5b923c3..00000000
--- a/scenario/widgets-scenario.js
+++ /dev/null
@@ -1,69 +0,0 @@
-describe('widgets', function() {
- it('should verify that basic widgets work', function(){
- browser().navigateTo('widgets.html');
-
- using('#text-basic-box').input('text.basic').enter('Carlos');
- expect(binding('text.basic')).toEqual('Carlos');
- input('text.basic').enter('Carlos Santana');
- expect(binding('text.basic')).not().toEqual('Carlos Boozer');
-
- input('text.password').enter('secret');
- expect(binding('text.password')).toEqual('secret');
-
- expect(binding('text.hidden')).toEqual('hiddenValue');
-
- expect(binding('gender')).toEqual('male');
- input('gender').select('female');
- expect(using('#gender-box').binding('gender')).toEqual('female');
-
- expect(repeater('#repeater-row ul li').count()).toEqual(2);
- expect(repeater('#repeater-row ul li').row(1)).toEqual(['adam']);
- expect(repeater('#repeater-row ul li').column('name')).toEqual(['misko', 'adam']);
-
- select('select').option('B');
- expect(binding('select')).toEqual('B');
-
- select('multiselect').options('A', 'C');
- expect(binding('multiselect').fromJson()).toEqual(['A', 'C']);
-
- expect(binding('button').fromJson()).toEqual({'count': 0});
- expect(binding('form').fromJson()).toEqual({'count': 0});
-
- element('form a', "'action' link").click();
- expect(binding('button').fromJson()).toEqual({'count': 1});
-
- element('input[value="submit input"]', "'submit input' button").click();
- expect(binding('button').fromJson()).toEqual({'count': 2});
- expect(binding('form').fromJson()).toEqual({'count': 1});
-
- element('button:contains("submit button")', "'submit button' button").click();
- expect(binding('button').fromJson()).toEqual({'count': 2});
- expect(binding('form').fromJson()).toEqual({'count': 2});
-
- element('input[value="button"]', "'button' button").click();
- expect(binding('button').fromJson()).toEqual({'count': 3});
-
- element('input[type="image"]', 'form image').click();
- expect(binding('button').fromJson()).toEqual({'count': 4});
-
- element('#navigate a', "'Go to #route' link").click();
- expect(binding('$location.hash')).toEqual('route');
- expect(browser().location().hash()).toEqual('route');
-
- /**
- * Custom value parser for futures.
- */
- function checkboxParser(value) {
- return angular.fromJson(value.substring(value.indexOf('=')+1));
- }
-
- input('checkbox.tea').check();
- expect(binding('checkbox').parsedWith(checkboxParser)).toEqual({coffee: false, tea: false});
- input('checkbox.coffee').check();
- expect(binding('checkbox').parsedWith(checkboxParser)).toEqual({coffee: true, tea: false});
- input('checkbox.tea').check();
- input('checkbox.tea').check();
- input('checkbox.tea').check();
- expect(binding('checkbox').parsedWith(checkboxParser)).toEqual({coffee: true, tea: true});
- });
-});
diff --git a/scenario/widgets.html b/scenario/widgets.html
deleted file mode 100644
index adf2fa27..00000000
--- a/scenario/widgets.html
+++ /dev/null
@@ -1,104 +0,0 @@
-
-
-
-
-
-
-
-
-
-
diff --git a/test/scenario/e2e/Runner-compiled.html b/test/scenario/e2e/Runner-compiled.html
new file mode 100644
index 00000000..c3a55f4d
--- /dev/null
+++ b/test/scenario/e2e/Runner-compiled.html
@@ -0,0 +1,9 @@
+
+
+
+
+
+
+
+
+
diff --git a/test/scenario/e2e/Runner.html b/test/scenario/e2e/Runner.html
new file mode 100644
index 00000000..387973db
--- /dev/null
+++ b/test/scenario/e2e/Runner.html
@@ -0,0 +1,9 @@
+
+
+
+
+
+
+
+
+
diff --git a/test/scenario/e2e/style.css b/test/scenario/e2e/style.css
new file mode 100644
index 00000000..26540bec
--- /dev/null
+++ b/test/scenario/e2e/style.css
@@ -0,0 +1,11 @@
+th {
+ text-align: left;
+}
+
+tr {
+ border: 1px solid black;
+}
+
+.redbox {
+ background-color: red;
+}
diff --git a/test/scenario/e2e/widgets-scenario.js b/test/scenario/e2e/widgets-scenario.js
new file mode 100644
index 00000000..e0a98224
--- /dev/null
+++ b/test/scenario/e2e/widgets-scenario.js
@@ -0,0 +1,65 @@
+describe('widgets', function() {
+ it('should verify that basic widgets work', function(){
+ browser().navigateTo('widgets.html');
+
+ using('#text-basic-box').input('text.basic').enter('Carlos');
+ expect(binding('text.basic')).toEqual('Carlos');
+ input('text.basic').enter('Carlos Santana');
+ expect(binding('text.basic')).not().toEqual('Carlos Boozer');
+
+ input('text.password').enter('secret');
+ expect(binding('text.password')).toEqual('secret');
+
+ expect(binding('text.hidden')).toEqual('hiddenValue');
+
+ expect(binding('gender')).toEqual('male');
+ input('gender').select('female');
+ expect(using('#gender-box').binding('gender')).toEqual('female');
+
+ expect(repeater('#repeater-row ul li').count()).toEqual(2);
+ expect(repeater('#repeater-row ul li').row(1)).toEqual(['adam']);
+ expect(repeater('#repeater-row ul li').column('name')).toEqual(['misko', 'adam']);
+
+ select('select').option('B');
+ expect(binding('select')).toEqual('B');
+
+ select('multiselect').options('A', 'C');
+ expect(binding('multiselect').fromJson()).toEqual(['A', 'C']);
+
+ expect(binding('button').fromJson()).toEqual({'count': 0});
+ expect(binding('form').fromJson()).toEqual({'count': 0});
+
+ element('form a', "'action' link").click();
+ expect(binding('button').fromJson()).toEqual({'count': 1});
+
+ element('input[value="submit input"]', "'submit input' button").click();
+ expect(binding('button').fromJson()).toEqual({'count': 2});
+ expect(binding('form').fromJson()).toEqual({'count': 1});
+
+ element('button:contains("submit button")', "'submit button' button").click();
+ expect(binding('button').fromJson()).toEqual({'count': 2});
+ expect(binding('form').fromJson()).toEqual({'count': 2});
+
+ element('input[value="button"]', "'button' button").click();
+ expect(binding('button').fromJson()).toEqual({'count': 3});
+
+ element('input[type="image"]', 'form image').click();
+ expect(binding('button').fromJson()).toEqual({'count': 4});
+
+ /**
+ * Custom value parser for futures.
+ */
+ function checkboxParser(value) {
+ return angular.fromJson(value.substring(value.indexOf('=')+1));
+ }
+
+ input('checkbox.tea').check();
+ expect(binding('checkbox').parsedWith(checkboxParser)).toEqual({coffee: false, tea: false});
+ input('checkbox.coffee').check();
+ expect(binding('checkbox').parsedWith(checkboxParser)).toEqual({coffee: true, tea: false});
+ input('checkbox.tea').check();
+ input('checkbox.tea').check();
+ input('checkbox.tea').check();
+ expect(binding('checkbox').parsedWith(checkboxParser)).toEqual({coffee: true, tea: true});
+ });
+});
diff --git a/test/scenario/e2e/widgets.html b/test/scenario/e2e/widgets.html
new file mode 100644
index 00000000..e19a33f4
--- /dev/null
+++ b/test/scenario/e2e/widgets.html
@@ -0,0 +1,99 @@
+
+
+
+
+
+
+
+
+
+
--
cgit v1.2.3