| Index: polymer_1.0.4/bower_components/google-calendar/tests/google-calendar-list-basic.html
|
| diff --git a/polymer_1.0.4/bower_components/google-calendar/tests/google-calendar-list-basic.html b/polymer_1.0.4/bower_components/google-calendar/tests/google-calendar-list-basic.html
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..6d52247b9e984c03f6a8c78c94836d9bdfa0f5dc
|
| --- /dev/null
|
| +++ b/polymer_1.0.4/bower_components/google-calendar/tests/google-calendar-list-basic.html
|
| @@ -0,0 +1,62 @@
|
| +<!doctype html>
|
| +<!-- Copyright (c) 2014 Google Inc. All rights reserved. -->
|
| +<html>
|
| + <head>
|
| + <meta charset="utf-8">
|
| + <meta name='viewport' content='width=device-width, minimum-scale=1.0, initial-scale=1.0, user-scalable=yes'>
|
| + <title>google-plusone Basic Tests</title>
|
| + <script src="../../webcomponentsjs/webcomponentsjs.min.js"></script>
|
| + <script src="../../web-component-tester/browser.js"></script>
|
| + <link rel="import" href="../google-calendar.html">
|
| + </head>
|
| + <body>
|
| +
|
| + <google-calendar-list title="What I'm up to"></google-calendar-list>
|
| +
|
| + <script>
|
| +
|
| + function testFetchesCalendars(calendarListEl) {
|
| + var testCalendar = {
|
| + 'kind': 'calendar#calendarListEntry',
|
| + 'id': 'test_id',
|
| + 'summary': 'test summary',
|
| + 'description': 'test description',
|
| + 'timeZone': 'Asia/Calcutta',
|
| + 'backgroundColor': '#000'
|
| + };
|
| +
|
| + // Stub out calendar request call.
|
| + var api = calendarListEl.$.calendar.api;
|
| + var request = {
|
| + 'execute': function(callback) {
|
| + var resp = {
|
| + 'items': [testCalendar]
|
| + };
|
| + callback(resp);
|
| + }
|
| + };
|
| + sinon.stub(api.calendarList, 'list').returns(request);
|
| +
|
| + calendarListEl.displayCalendars();
|
| + Platform.flush();
|
| +
|
| + // Check if calendars get updated.
|
| + chai.expect(calendarListEl.calendars).to.eql([testCalendar]);
|
| + };
|
| +
|
| + document.addEventListener('polymer-ready', function() {
|
| + var this = document.querySelector('google-calendar-list');
|
| +
|
| + // Fake user's sign in.
|
| + var signin = cal.shadowRoot.querySelector('google-signin-aware');
|
| + signin.dispatchEvent(new Event('google-signin-aware-success'));
|
| +
|
| + // Run tests.
|
| + this.addEventListener('google-api-load', function() {
|
| + testFetchesCalendars(this);
|
| + done();
|
| + });
|
| + });
|
| + </script>
|
| + </body>
|
| +</html>
|
|
|