ソースを参照

Update legacy tests

acerix 7 年 前
コミット
42c1c4bdaa
2 ファイル変更9 行追加11 行削除
  1. 1 1
      tests/automated/legacy/external-dnd.js
  2. 8 10
      tests/automated/legacy/theme.js

+ 1 - 1
tests/automated/legacy/external-dnd.js

@@ -1,6 +1,6 @@
 import ListenerCounter from '../lib/ListenerCounter'
 
-fdescribe('external drag and drop', function() {
+describe('external drag and drop', function() {
 
   // TODO: fill out tests for droppable/drop, with RTL
 

+ 8 - 10
tests/automated/legacy/theme.js

@@ -1,10 +1,11 @@
 describe('theme', function() {
 
+  pushOptions({
+    defaultView: 'agendaWeek'
+  })
+
   it('can be changed dynamically', function() {
-    affix('#cal')
-    $('#cal').fullCalendar({
-      defaultView: 'agendaWeek'
-    })
+    initCalendar()
 
     expect($('.fc')).toHaveClass('fc-unthemed')
     expect($('.fc')).not.toHaveClass('ui-widget')
@@ -16,7 +17,7 @@ describe('theme', function() {
     var scrollTop = $('.fc-scroller').scrollTop()
 
     // change option!
-    $('#cal').fullCalendar('option', 'theme', true)
+    currentCalendar.option('theme', true)
 
     expect($('.fc')).toHaveClass('ui-widget')
     expect($('.fc')).not.toHaveClass('fc-unthemed')
@@ -32,17 +33,14 @@ describe('theme', function() {
   // this tests the options setter with a single hash argument.
   // TODO: not best place for this.
   it('can be change with other options', function() {
-    affix('#cal')
-    $('#cal').fullCalendar({
-      defaultView: 'agendaWeek'
-    })
+    initCalendar()
 
     expect($('.fc')).toHaveClass('fc-unthemed')
     expect($('.fc')).not.toHaveClass('ui-widget')
     expect($('.fc-nonbusiness').length).toBe(0)
 
     // change option!
-    $('#cal').fullCalendar('option', {
+    currentCalendar.option({
       theme: true,
       businessHours: true
     })