Skip to content
This repository has been archived by the owner on May 7, 2021. It is now read-only.

Commit

Permalink
Copy test changes from team-experiments branch
Browse files Browse the repository at this point in the history
Based on discussion at
#112 (comment).
Breaking up that PR into more manageable chunks.
  • Loading branch information
mattbk committed Apr 22, 2016
1 parent e1c8689 commit 9d4d9c7
Show file tree
Hide file tree
Showing 9 changed files with 18 additions and 31 deletions.
4 changes: 2 additions & 2 deletions test/test_custom-widget-legacy.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module.exports = {

'readystatus should be ready': function(test) {
'custom-widget-legacy: readystatus should be ready': function(test) {
test.open('http://localhost:9537/test/custom-widget-legacy.html')
.waitFor(function() {
return !!document.querySelector('[data-gratipay-readystatus="ready"]');
Expand All @@ -9,7 +9,7 @@ module.exports = {
.done();
},

'it should fill the standard values': function(test) {
'custom-widget-legacy: it should fill the standard values': function(test) {
test.open('http://localhost:9537/test/custom-widget-legacy.html')
.waitFor(function() {
return !!document.querySelector('[data-gratipay-readystatus="ready"]');
Expand Down
4 changes: 2 additions & 2 deletions test/test_custom-widget.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module.exports = {

'readystatus should be ready': function(test) {
'custom-widget: readystatus should be ready': function(test) {
test.open('http://localhost:9537/test/custom-widget.html')
.waitFor(function() {
return !!document.querySelector('[data-gratipay-readystatus="ready"]');
Expand All @@ -9,7 +9,7 @@ module.exports = {
.done();
},

'it should fill the standard values': function(test) {
'custom-widget: it should fill the standard values': function(test) {
test.open('http://localhost:9537/test/custom-widget.html')
.waitFor(function() {
return !!document.querySelector('[data-gratipay-readystatus="ready"]');
Expand Down
19 changes: 3 additions & 16 deletions test/test_default-widget-anonymous.js
Original file line number Diff line number Diff line change
@@ -1,25 +1,12 @@
module.exports = {

'readystatus should be ready': function(test) {
'default-widget-anonymous: readystatus should be ready': function(test) {
test.open('http://localhost:9537/test/default-widget-anonymous.html')
.waitFor(function() {
return !!document.querySelector('[data-gratipay-readystatus="ready"]');
}, [], 2000)
.assert.attr('[data-gratipay-username]', 'data-gratipay-readystatus').is('ready', 'readystatus should be ready')
.done();
},

'it should show anonymous receiving': function(test) {
test.open('http://localhost:9537/test/default-widget-anonymous.html')
.waitFor(function() {
return !!document.querySelector('[data-gratipay-readystatus="ready"]');
}, [], 2000)
.assert.exists('iframe')
.toFrame('iframe')
.assert.exists('.gratipay-receiving')
.assert.text('.gratipay-receiving').is('anonymously', 'receiving should not be empty')
.toParent()
.done();
},

}

};
4 changes: 2 additions & 2 deletions test/test_default-widget-legacy.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module.exports = {

'readystatus should be ready': function(test) {
'default-widget-legacy: readystatus should be ready': function(test) {
test.open('http://localhost:9537/test/default-widget-legacy.html')
.waitFor(function() {
return !!document.querySelector('[data-gratipay-readystatus="ready"]');
Expand All @@ -9,7 +9,7 @@ module.exports = {
.done();
},

'it should fill the standard values': function(test) {
'default-widget-legacy: it should fill the standard values': function(test) {
test.open('http://localhost:9537/test/default-widget-legacy.html')
.waitFor(function() {
return !!document.querySelector('[data-gratipay-readystatus="ready"]');
Expand Down
4 changes: 2 additions & 2 deletions test/test_default-widget.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module.exports = {

'readystatus should be ready': function(test) {
'default-widget: readystatus should be ready': function(test) {
test.open('http://localhost:9537/test/default-widget.html')
.waitFor(function() {
return !!document.querySelector('[data-gratipay-readystatus="ready"]');
Expand All @@ -9,7 +9,7 @@ module.exports = {
.done();
},

'it should fill the standard values': function(test) {
'default-widget: it should fill the standard values': function(test) {
test.open('http://localhost:9537/test/default-widget.html')
.waitFor(function() {
return !!document.querySelector('[data-gratipay-readystatus="ready"]');
Expand Down
2 changes: 1 addition & 1 deletion test/test_expose-api-to-iframe.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module.exports = {

'widget should have Gratipay defined': function(test) {
'expose-api-to-iframe: widget should have Gratipay defined': function(test) {
test.open('http://localhost:9537/test/expose-api-to-iframe.html')
.waitFor(function() {
return !!document.querySelector('[data-gratipay-readystatus="ready"]');
Expand Down
4 changes: 2 additions & 2 deletions test/test_giving-widget-anonymous.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module.exports = {

'readystatus should be ready': function(test) {
'giving-widget-anonymous: readystatus should be ready': function(test) {
test.open('http://localhost:9537/test/giving-widget-anonymous.html')
.waitFor(function() {
return !!document.querySelector('[data-gratipay-readystatus="ready"]');
Expand All @@ -9,7 +9,7 @@ module.exports = {
.done();
},

'it should show anonymous giving': function(test) {
'giving-widget-anonymous: it should show anonymous giving': function(test) {
test.open('http://localhost:9537/test/giving-widget-anonymous.html')
.waitFor(function() {
return !!document.querySelector('[data-gratipay-readystatus="ready"]');
Expand Down
4 changes: 2 additions & 2 deletions test/test_giving-widget-legacy.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module.exports = {

'readystatus should be ready': function(test) {
'giving-widget-legacy: readystatus should be ready': function(test) {
test.open('http://localhost:9537/test/giving-widget-legacy.html')
.waitFor(function() {
return !!document.querySelector('[data-gratipay-readystatus="ready"]');
Expand All @@ -9,7 +9,7 @@ module.exports = {
.done();
},

'it should fill the standard values': function(test) {
'giving-widget-legacy: it should fill the standard values': function(test) {
test.open('http://localhost:9537/test/giving-widget-legacy.html')
.waitFor(function() {
return !!document.querySelector('[data-gratipay-readystatus="ready"]');
Expand Down
4 changes: 2 additions & 2 deletions test/test_giving-widget.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module.exports = {

'readystatus should be ready': function(test) {
'giving-widget: readystatus should be ready': function(test) {
test.open('http://localhost:9537/test/giving-widget.html')
.waitFor(function() {
return !!document.querySelector('[data-gratipay-readystatus="ready"]');
Expand All @@ -9,7 +9,7 @@ module.exports = {
.done();
},

'it should fill the standard values': function(test) {
'giving-widget: it should fill the standard values': function(test) {
test.open('http://localhost:9537/test/giving-widget.html')
.waitFor(function() {
return !!document.querySelector('[data-gratipay-readystatus="ready"]');
Expand Down

0 comments on commit 9d4d9c7

Please sign in to comment.