Skip to content

Commit

Permalink
make tests pass that rely on non-essential plugins
Browse files Browse the repository at this point in the history
  • Loading branch information
arshaw committed Jan 29, 2019
1 parent b4577b1 commit 40bd4b3
Show file tree
Hide file tree
Showing 10 changed files with 44 additions and 4 deletions.
7 changes: 7 additions & 0 deletions tests/automated/event-drag/between-calendars.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
import { Calendar } from '@fullcalendar/core'
import InteractionPlugin from '@fullcalendar/interaction'
import DayGridPlugin from '@fullcalendar/daygrid'
import TimeGridPlugin from '@fullcalendar/timegrid'
import { getSingleEl } from '../event-render/EventRenderUtils'
import { getDayEl } from '../view-render/DayGridRenderUtils'
import { getRectCenter } from '../lib/geom'
Expand Down Expand Up @@ -36,6 +39,7 @@ describe('dragging events between calendars', function() {
let triggerNames = []

calendar0 = new Calendar(el0, {
plugins: [ InteractionPlugin, DayGridPlugin ],
timeZone: 'UTC',
defaultDate: DEFAULT_DATE,
defaultView: 'month',
Expand All @@ -51,6 +55,7 @@ describe('dragging events between calendars', function() {
})

calendar1 = new Calendar(el1, {
plugins: [ InteractionPlugin, DayGridPlugin ],
timeZone: 'UTC',
defaultDate: DEFAULT_DATE,
defaultView: 'month',
Expand Down Expand Up @@ -91,6 +96,7 @@ describe('dragging events between calendars', function() {
it('works between agenda views', function(done) {

calendar0 = new Calendar(el0, {
plugins: [ InteractionPlugin, TimeGridPlugin ],
scrollTime: '00:00',
timeZone: 'UTC',
defaultDate: DEFAULT_DATE,
Expand All @@ -102,6 +108,7 @@ describe('dragging events between calendars', function() {
})

calendar1 = new Calendar(el1, {
plugins: [ InteractionPlugin, TimeGridPlugin ],
scrollTime: '00:00',
timeZone: 'UTC',
defaultDate: DEFAULT_DATE,
Expand Down
5 changes: 4 additions & 1 deletion tests/automated/legacy/buttonIcons.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
describe('buttonIcons', function() {
import BootstrapPlugin from '@fullcalendar/bootstrap4'
import DayGridPlugin from '@fullcalendar/daygrid'

describe('buttonIcons', function() {
pushOptions({
plugins: [ DayGridPlugin, BootstrapPlugin ],
header: {
left: 'prev,next today',
center: 'title',
Expand Down
3 changes: 3 additions & 0 deletions tests/automated/legacy/events-gcal.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import GCalPlugin from '@fullcalendar/gcal'
import DayGridPlugin from '@fullcalendar/daygrid'

// HACK: in our CI setup, requests to the gcal api were failing for some reason
// (requests to other services were working however)
Expand Down Expand Up @@ -26,6 +28,7 @@ describe('Google Calendar plugin', function() {
beforeEach(function() {

options = {
plugins: [ GCalPlugin, DayGridPlugin ],
defaultView: 'month',
defaultDate: DEFAULT_MONTH + '-01'
}
Expand Down
5 changes: 4 additions & 1 deletion tests/automated/legacy/external-dnd.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import ListenerCounter from '../lib/ListenerCounter'
import { Calendar } from '@fullcalendar/core'
import { ThirdPartyDraggable } from '@fullcalendar/interaction'
import InteractionPlugin, { ThirdPartyDraggable } from '@fullcalendar/interaction'
import DayGridPlugin from '@fullcalendar/daygrid'
import TimeGridPlugin from '@fullcalendar/timegrid'

describe('external drag and drop', function() {

Expand All @@ -13,6 +15,7 @@ describe('external drag and drop', function() {
beforeEach(function() {
doSortable = false
options = {
plugins: [ InteractionPlugin, TimeGridPlugin, DayGridPlugin ],
defaultDate: '2014-08-23',
droppable: true
}
Expand Down
3 changes: 3 additions & 0 deletions tests/automated/legacy/select-callback.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
import { Calendar } from '@fullcalendar/core'
import DayGridPlugin from '@fullcalendar/daygrid'
import InteractionPlugin from '@fullcalendar/interaction'

describe('select callback', function() {

Expand Down Expand Up @@ -284,6 +286,7 @@ describe('select callback', function() {
let calendar = new Calendar(
document.createElement('div'),
{
plugins: [ InteractionPlugin, DayGridPlugin ],
now: '2018-12-25',
select: function(info) {
expect(info.startStr).toBe('2018-12-20')
Expand Down
4 changes: 4 additions & 0 deletions tests/automated/legacy/themeSystem.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
import BootstrapPlugin from '@fullcalendar/bootstrap4'
import TimeGridPlugin from '@fullcalendar/timegrid'

describe('themeSystem', function() {

pushOptions({
plugins: [ BootstrapPlugin, TimeGridPlugin ],
defaultView: 'agendaWeek'
})

Expand Down
4 changes: 3 additions & 1 deletion tests/automated/legacy/views-specific-options.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { createPlugin } from '@fullcalendar/core'
import { BasicView } from '@fullcalendar/daygrid'
import DayGridPlugin, { BasicView } from '@fullcalendar/daygrid'

describe('view-specific options', function() {

Expand Down Expand Up @@ -130,6 +130,7 @@ describe('view-specific options', function() {

initCalendar({
plugins: [
DayGridPlugin,
createPlugin({
viewConfigs: {
superBasic: SuperBasicView
Expand Down Expand Up @@ -157,6 +158,7 @@ describe('view-specific options', function() {

initCalendar({
plugins: [
DayGridPlugin,
createPlugin({
viewConfigs: {
superBasic: SuperBasicView
Expand Down
7 changes: 6 additions & 1 deletion tests/automated/theme/bootstrap4.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
import BootstrapPlugin from '@fullcalendar/bootstrap4'
import DayGridPlugin from '@fullcalendar/daygrid'

describe('bootstrap4 theme', function() {
pushOptions({ themeSystem: 'bootstrap4' })
pushOptions({
plugins: [ BootstrapPlugin, DayGridPlugin ],
themeSystem: 'bootstrap4'
})

describe('fa', function() {
pushOptions({
Expand Down
5 changes: 5 additions & 0 deletions tests/automated/theme/switching.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
import BootstrapPlugin from '@fullcalendar/bootstrap4'
import DayGridPlugin from '@fullcalendar/daygrid'

describe('theme switching', function() {
pushOptions({
plugins: [ BootstrapPlugin, DayGridPlugin ]
})

it('can switch from standard to bootstrap4', function() {
initCalendar()
Expand Down
5 changes: 5 additions & 0 deletions tests/automated/toolbar/customButtons.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
import BootstrapPlugin from '@fullcalendar/bootstrap4'
import DayGridPlugin from '@fullcalendar/daygrid'

describe('customButtons', function() {
pushOptions({
plugins: [ BootstrapPlugin, DayGridPlugin ]
})

it('can specify text', function() {
initCalendar({
Expand Down

0 comments on commit 40bd4b3

Please sign in to comment.