@sprucelabs/spruce-calendar-components 22.7.9 → 22.7.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/__tests__/support/SpyEventManager.d.ts +42 -0
- package/build/__tests__/support/SpyEventManager.js +36 -0
- package/build/__tests__/support/SpyPeopleManager.d.ts +10 -0
- package/build/__tests__/support/SpyPeopleManager.js +23 -0
- package/build/__tests__/support/SpyRemoteEventStore.d.ts +18 -0
- package/build/__tests__/support/SpyRemoteEventStore.js +31 -0
- package/build/__tests__/support/SpyRemotePreferencesStore.d.ts +9 -0
- package/build/__tests__/support/SpyRemotePreferencesStore.js +17 -0
- package/build/__tests__/support/utilities/calendarAssert.d.ts +13 -0
- package/build/__tests__/support/utilities/calendarAssert.js +93 -0
- package/build/__tests__/support/utilities/calendarSkillAssert.d.ts +40 -0
- package/build/__tests__/support/utilities/calendarSkillAssert.js +346 -0
- package/build/__tests__/support/utilities/calendarToolBeltInteractor.d.ts +5 -0
- package/build/__tests__/support/utilities/calendarToolBeltInteractor.js +11 -0
- package/build/esm/__tests__/support/SpyEventManager.d.ts +42 -0
- package/build/esm/__tests__/support/SpyEventManager.js +44 -0
- package/build/esm/__tests__/support/SpyPeopleManager.d.ts +10 -0
- package/build/esm/__tests__/support/SpyPeopleManager.js +31 -0
- package/build/esm/__tests__/support/SpyRemoteEventStore.d.ts +18 -0
- package/build/esm/__tests__/support/SpyRemoteEventStore.js +46 -0
- package/build/esm/__tests__/support/SpyRemotePreferencesStore.d.ts +9 -0
- package/build/esm/__tests__/support/SpyRemotePreferencesStore.js +22 -0
- package/build/esm/__tests__/support/utilities/calendarAssert.d.ts +13 -0
- package/build/esm/__tests__/support/utilities/calendarAssert.js +88 -0
- package/build/esm/__tests__/support/utilities/calendarSkillAssert.d.ts +40 -0
- package/build/esm/__tests__/support/utilities/calendarSkillAssert.js +372 -0
- package/build/esm/__tests__/support/utilities/calendarToolBeltInteractor.d.ts +5 -0
- package/build/esm/__tests__/support/utilities/calendarToolBeltInteractor.js +20 -0
- package/package.json +30 -6
- package/build/esm/index-module.d.ts +0 -31
- package/build/esm/index-module.js +0 -8
- package/build/index-module.d.ts +0 -31
- package/build/index-module.js +0 -34
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { CalendarEvent, CalendarToolBeltContext, UpdateCalendarToolBeltContextHandler } from '../../types/calendar.types';
|
|
2
|
+
import CalendarEventManager, { CalendarEventManagerOptions } from '../../utilities/CalendarEventManager';
|
|
3
|
+
import SpyRemoteEventStore from './SpyRemoteEventStore';
|
|
4
|
+
import SpyRemotePreferencesStore from './SpyRemotePreferencesStore';
|
|
5
|
+
export default class SpyEventManager extends CalendarEventManager {
|
|
6
|
+
updateContext?: UpdateCalendarToolBeltContextHandler<CalendarToolBeltContext>;
|
|
7
|
+
getShouldIgnoreNextContextUpdate(): boolean;
|
|
8
|
+
constructor(options: SpyEventManagerOptions);
|
|
9
|
+
getRemoteEventsStore(): SpyRemoteEventStore;
|
|
10
|
+
getStateMachine(): import("../../types/calendar.types").CalendarToolBeltStateMachine<CalendarToolBeltContext>;
|
|
11
|
+
getPreferences(): SpyRemotePreferencesStore;
|
|
12
|
+
silentlySetAllEvents(events: CalendarEvent[]): void;
|
|
13
|
+
silentlyMixinEvents(events: CalendarEvent[]): void;
|
|
14
|
+
silentlyAddEvent(event: CalendarEvent): void;
|
|
15
|
+
updateEventInContext(updates: Partial<CalendarEvent>): Promise<{
|
|
16
|
+
isBusy: boolean;
|
|
17
|
+
id: string;
|
|
18
|
+
target: import("@sprucelabs/spruce-core-schemas").SpruceSchemas.CalendarUtils.v2021_05_19.CalendarEventTarget;
|
|
19
|
+
calendarId: string;
|
|
20
|
+
eventTypeSlug?: string | null | undefined;
|
|
21
|
+
startDateTimeMs: number;
|
|
22
|
+
isResizeable?: boolean | null | undefined;
|
|
23
|
+
style?: "draft" | "tentative" | "upcoming" | "unavailable" | "blocked" | "active" | "past" | "warn" | "critical" | null | undefined;
|
|
24
|
+
groupId?: string | null | undefined;
|
|
25
|
+
timeBlocks: import("@sprucelabs/spruce-core-schemas").SpruceSchemas.CalendarUtils.v2021_05_19.EventTimeBlock[];
|
|
26
|
+
repeats?: "weekly" | "monthly" | "daily" | null | undefined;
|
|
27
|
+
daysOfWeek?: ("sun" | "mon" | "tue" | "wed" | "thur" | "fri" | "sat")[] | null | undefined;
|
|
28
|
+
daysOfMonth?: ("1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" | "10" | "11" | "12" | "13" | "14" | "15" | "16" | "17" | "18" | "19" | "20" | "21" | "22" | "23" | "24" | "25" | "26" | "27" | "28" | "29" | "30" | "31")[] | null | undefined;
|
|
29
|
+
repeatsUntil?: number | null | undefined;
|
|
30
|
+
occurrences?: number | null | undefined;
|
|
31
|
+
interval?: number | null | undefined;
|
|
32
|
+
nthOccurrences?: number[] | null | undefined;
|
|
33
|
+
activeUntilDate?: number | null | undefined;
|
|
34
|
+
exclusionDates?: import("@sprucelabs/spruce-core-schemas").SpruceSchemas.CalendarUtils.v2021_05_19.EventExclusionDate[] | null | undefined;
|
|
35
|
+
nthInRepeating?: number | null | undefined;
|
|
36
|
+
totalInRepeating?: number | null | undefined;
|
|
37
|
+
error?: Error | null | undefined;
|
|
38
|
+
isSelected?: boolean | null | undefined;
|
|
39
|
+
controller?: import("@sprucelabs/heartwood-view-controllers").CalendarEventViewController | null | undefined;
|
|
40
|
+
}>;
|
|
41
|
+
}
|
|
42
|
+
export declare type SpyEventManagerOptions = CalendarEventManagerOptions;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const CalendarEventManager_1 = __importDefault(require("../../utilities/CalendarEventManager"));
|
|
7
|
+
class SpyEventManager extends CalendarEventManager_1.default {
|
|
8
|
+
constructor(options) {
|
|
9
|
+
super(options);
|
|
10
|
+
}
|
|
11
|
+
getShouldIgnoreNextContextUpdate() {
|
|
12
|
+
return this.shouldIgnoreNextContextUpdate;
|
|
13
|
+
}
|
|
14
|
+
getRemoteEventsStore() {
|
|
15
|
+
return this.events;
|
|
16
|
+
}
|
|
17
|
+
getStateMachine() {
|
|
18
|
+
return this.sm;
|
|
19
|
+
}
|
|
20
|
+
getPreferences() {
|
|
21
|
+
return this.prefs;
|
|
22
|
+
}
|
|
23
|
+
silentlySetAllEvents(events) {
|
|
24
|
+
this.allEvents = events;
|
|
25
|
+
}
|
|
26
|
+
silentlyMixinEvents(events) {
|
|
27
|
+
this.allEvents = [...this.allEvents, ...events];
|
|
28
|
+
}
|
|
29
|
+
silentlyAddEvent(event) {
|
|
30
|
+
this.allEvents.push(event);
|
|
31
|
+
}
|
|
32
|
+
async updateEventInContext(updates) {
|
|
33
|
+
return super.updateEventInContext(updates);
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
exports.default = SpyEventManager;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import CalendarPeopleManager, { PeopleManagerOptions, SetVisiblePeolpeOptions } from '../../utilities/CalendarPeopleManager';
|
|
2
|
+
import { PersonMode } from '../../viewControllers/PersonSelectTool.vc';
|
|
3
|
+
export default class SpyPeopleManager extends CalendarPeopleManager {
|
|
4
|
+
visiblePeopleIds?: string[];
|
|
5
|
+
peopleVisibilityMode?: PersonMode;
|
|
6
|
+
constructor(options: PeopleManagerOptions);
|
|
7
|
+
protected getVisiblePeopleIds(): string[];
|
|
8
|
+
getVisibilityMode(): PersonMode;
|
|
9
|
+
setVisiblePeopleIds(ids: string[], options?: SetVisiblePeolpeOptions): Promise<void>;
|
|
10
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const CalendarPeopleManager_1 = __importDefault(require("../../utilities/CalendarPeopleManager"));
|
|
7
|
+
class SpyPeopleManager extends CalendarPeopleManager_1.default {
|
|
8
|
+
constructor(options) {
|
|
9
|
+
super(options);
|
|
10
|
+
}
|
|
11
|
+
getVisiblePeopleIds() {
|
|
12
|
+
var _a;
|
|
13
|
+
return (_a = this.visiblePeopleIds) !== null && _a !== void 0 ? _a : super.getVisiblePeopleIds();
|
|
14
|
+
}
|
|
15
|
+
getVisibilityMode() {
|
|
16
|
+
var _a;
|
|
17
|
+
return (_a = this.peopleVisibilityMode) !== null && _a !== void 0 ? _a : super.getVisibilityMode();
|
|
18
|
+
}
|
|
19
|
+
async setVisiblePeopleIds(ids, options) {
|
|
20
|
+
return super.setVisiblePeopleIds(ids, options);
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
exports.default = SpyPeopleManager;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { MercuryClient } from '@sprucelabs/mercury-client';
|
|
2
|
+
import { SpruceSchemas } from '@sprucelabs/spruce-core-schemas';
|
|
3
|
+
import RemoteEventStoreImpl, { RemoteEventStoreOptions } from '../../stores/RemoteEventStore';
|
|
4
|
+
import { Calendar, UpdateEvent } from '../../types/calendar.types';
|
|
5
|
+
export default class SpyRemoteEventStore extends RemoteEventStoreImpl {
|
|
6
|
+
private calendars?;
|
|
7
|
+
lastPersistedEvent?: SpruceSchemas.CalendarUtils.v2021_05_19.CalendarEvent;
|
|
8
|
+
constructor(options: Omit<RemoteEventStoreOptions, 'connectToApi'> & {
|
|
9
|
+
calendars?: Calendar[];
|
|
10
|
+
locationId?: string;
|
|
11
|
+
organizationId?: string;
|
|
12
|
+
client: MercuryClient;
|
|
13
|
+
});
|
|
14
|
+
setOrganizationId(id: string): void;
|
|
15
|
+
cancelEvent(_id: string): Promise<void>;
|
|
16
|
+
getCalendars(): Promise<SpruceSchemas.Calendar.v2021_05_19.Calendar[] | import("@sprucelabs/schema").SchemaStaticValues<SpruceSchemas.Calendar.v2021_05_19.CalendarSchema, false, import("@sprucelabs/schema").SchemaOptionalFieldNames<SpruceSchemas.Calendar.v2021_05_19.CalendarSchema>, import("@sprucelabs/schema").StaticSchemaAllValues<SpruceSchemas.Calendar.v2021_05_19.CalendarSchema, false>>[]>;
|
|
17
|
+
persist(event: UpdateEvent): Promise<SpruceSchemas.CalendarUtils.v2021_05_19.CalendarEvent>;
|
|
18
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const test_utils_1 = require("@sprucelabs/test-utils");
|
|
7
|
+
const RemoteEventStore_1 = __importDefault(require("../../stores/RemoteEventStore"));
|
|
8
|
+
class SpyRemoteEventStore extends RemoteEventStore_1.default {
|
|
9
|
+
constructor(options) {
|
|
10
|
+
const { calendars, client, locationId, organizationId } = options;
|
|
11
|
+
super({ connectToApi: async () => client });
|
|
12
|
+
this.client = client;
|
|
13
|
+
this.calendars = calendars;
|
|
14
|
+
this.locationId = locationId !== null && locationId !== void 0 ? locationId : (0, test_utils_1.generateId)();
|
|
15
|
+
this.organizationId = organizationId !== null && organizationId !== void 0 ? organizationId : (0, test_utils_1.generateId)();
|
|
16
|
+
}
|
|
17
|
+
setOrganizationId(id) {
|
|
18
|
+
this.organizationId = id;
|
|
19
|
+
}
|
|
20
|
+
async cancelEvent(_id) { }
|
|
21
|
+
async getCalendars() {
|
|
22
|
+
var _a;
|
|
23
|
+
return (_a = this.calendars) !== null && _a !== void 0 ? _a : super.getCalendars();
|
|
24
|
+
}
|
|
25
|
+
async persist(event) {
|
|
26
|
+
const results = await super.persist(event);
|
|
27
|
+
this.lastPersistedEvent = results;
|
|
28
|
+
return results;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
exports.default = SpyRemoteEventStore;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { MercuryClient } from '@sprucelabs/mercury-client';
|
|
2
|
+
import RemotePreferencesStore from '../../stores/RemotePreferencesStore';
|
|
3
|
+
export default class SpyRemotePreferencesStore extends RemotePreferencesStore {
|
|
4
|
+
constructor(options: {
|
|
5
|
+
client: MercuryClient;
|
|
6
|
+
visibleCalendarIds?: string[];
|
|
7
|
+
});
|
|
8
|
+
protected save(): Promise<void>;
|
|
9
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const RemotePreferencesStore_1 = __importDefault(require("../../stores/RemotePreferencesStore"));
|
|
7
|
+
class SpyRemotePreferencesStore extends RemotePreferencesStore_1.default {
|
|
8
|
+
constructor(options) {
|
|
9
|
+
const { visibleCalendarIds, client } = options;
|
|
10
|
+
super({ connectToApi: async () => client });
|
|
11
|
+
this.client = client;
|
|
12
|
+
this.isLoaded = true;
|
|
13
|
+
this.visibleCalendarIds = visibleCalendarIds;
|
|
14
|
+
}
|
|
15
|
+
async save() { }
|
|
16
|
+
}
|
|
17
|
+
exports.default = SpyRemotePreferencesStore;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { CalendarEvent, SpruceSchemas, ViewController } from '@sprucelabs/heartwood-view-controllers';
|
|
2
|
+
declare type Calendar = SpruceSchemas.HeartwoodViewControllers.v2021_02_11.Calendar;
|
|
3
|
+
declare type Event = SpruceSchemas.HeartwoodViewControllers.v2021_02_11.CalendarEvent;
|
|
4
|
+
declare const calendarAssert: {
|
|
5
|
+
rendersTotalEvents(vc: ViewController<Calendar>, expected: number): void;
|
|
6
|
+
hasEvent(vc: ViewController<Calendar>, lookup: Partial<Event>): SpruceSchemas.HeartwoodViewControllers.v2021_02_11.CalendarEvent;
|
|
7
|
+
eventsAreEqual(actual: Event[], expected: Event[]): void;
|
|
8
|
+
includesInEvent(events: Event[], lookup: Partial<Event>): SpruceSchemas.HeartwoodViewControllers.v2021_02_11.CalendarEvent;
|
|
9
|
+
eventIsDuration(event: Event, expectedDuration: number): void;
|
|
10
|
+
eventsFallOnDows(events: CalendarEvent[], expectedDows: string[]): void;
|
|
11
|
+
eventEquals(actual: Partial<CalendarEvent> | undefined | null, expected: Partial<CalendarEvent> | undefined | null): void;
|
|
12
|
+
};
|
|
13
|
+
export default calendarAssert;
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const calendar_utils_1 = require("@sprucelabs/calendar-utils");
|
|
7
|
+
const heartwood_view_controllers_1 = require("@sprucelabs/heartwood-view-controllers");
|
|
8
|
+
const test_1 = require("@sprucelabs/test");
|
|
9
|
+
const just_clone_1 = __importDefault(require("just-clone"));
|
|
10
|
+
const calendarAssert = {
|
|
11
|
+
rendersTotalEvents(vc, expected) {
|
|
12
|
+
const model = heartwood_view_controllers_1.renderUtil.render(vc);
|
|
13
|
+
test_1.assert.isLength(model.events, expected);
|
|
14
|
+
},
|
|
15
|
+
hasEvent(vc, lookup) {
|
|
16
|
+
const { events } = heartwood_view_controllers_1.renderUtil.render(vc);
|
|
17
|
+
return this.includesInEvent(events, lookup);
|
|
18
|
+
},
|
|
19
|
+
eventsAreEqual(actual, expected) {
|
|
20
|
+
function sort(a, b) {
|
|
21
|
+
return a.id > b.id ? 1 : -1;
|
|
22
|
+
}
|
|
23
|
+
actual.sort(sort);
|
|
24
|
+
expected.sort(sort);
|
|
25
|
+
test_1.assert.isEqualDeep(actual, expected);
|
|
26
|
+
},
|
|
27
|
+
includesInEvent(events, lookup) {
|
|
28
|
+
const match = events.find((e) => {
|
|
29
|
+
try {
|
|
30
|
+
test_1.assert.doesInclude(e, lookup);
|
|
31
|
+
return e;
|
|
32
|
+
// eslint-disable-next-line no-empty
|
|
33
|
+
}
|
|
34
|
+
catch (_a) { }
|
|
35
|
+
return null;
|
|
36
|
+
});
|
|
37
|
+
test_1.assert.isTruthy(match, `I could not find an event that matched:\n\n${test_1.assertUtil.stringify(lookup)}`);
|
|
38
|
+
return match;
|
|
39
|
+
},
|
|
40
|
+
eventIsDuration(event, expectedDuration) {
|
|
41
|
+
const duration = event.timeBlocks.reduce((minutes, timeBlock) => {
|
|
42
|
+
minutes += timeBlock.durationMinutes;
|
|
43
|
+
return minutes;
|
|
44
|
+
}, 0);
|
|
45
|
+
test_1.assert.isEqual(duration, expectedDuration);
|
|
46
|
+
},
|
|
47
|
+
eventsFallOnDows(events, expectedDows) {
|
|
48
|
+
const remaining = [...expectedDows];
|
|
49
|
+
for (const event of events) {
|
|
50
|
+
const dow = calendar_utils_1.dateUtil.getDayOfWeek(event.startDateTimeMs);
|
|
51
|
+
const idx = remaining.indexOf(dow);
|
|
52
|
+
if (idx === -1) {
|
|
53
|
+
test_1.assert.fail(`Checking days of week and got ${dow} but it wasn't in the array of expected dows.`);
|
|
54
|
+
}
|
|
55
|
+
remaining.splice(idx, 1);
|
|
56
|
+
}
|
|
57
|
+
if (remaining.length > 0) {
|
|
58
|
+
test_1.assert.fail(`Didn't find the following days of week in events:\n\n${test_1.assertUtil.stringify(remaining)}`);
|
|
59
|
+
}
|
|
60
|
+
},
|
|
61
|
+
eventEquals(actual, expected) {
|
|
62
|
+
var _a, _b, _c;
|
|
63
|
+
test_1.assert.isTruthy(actual, 'Event is missing');
|
|
64
|
+
test_1.assert.isTruthy(expected, 'Event is missing');
|
|
65
|
+
test_1.assert.isEqual(actual.startDateTimeMs, expected.startDateTimeMs, 'startDateTimeMs does not match');
|
|
66
|
+
test_1.assert.isEqual((_a = actual.isBusy) !== null && _a !== void 0 ? _a : false, (_b = expected.isBusy) !== null && _b !== void 0 ? _b : false, `isBusy does not match, needs to be '${(_c = expected.isBusy) !== null && _c !== void 0 ? _c : false}'`);
|
|
67
|
+
const cleanedActual = (0, just_clone_1.default)(actual);
|
|
68
|
+
const cleanedExpected = (0, just_clone_1.default)(expected);
|
|
69
|
+
cleanEvent(cleanedActual);
|
|
70
|
+
cleanEvent(cleanedExpected);
|
|
71
|
+
test_1.assert.isEqualDeep(cleanedActual, cleanedExpected, 'Your event did not equal what I expected!');
|
|
72
|
+
},
|
|
73
|
+
};
|
|
74
|
+
function cleanEvent(obj, propsToIgnore = [
|
|
75
|
+
'isSelected',
|
|
76
|
+
'source',
|
|
77
|
+
'dateCreated',
|
|
78
|
+
'isBusy',
|
|
79
|
+
'controller',
|
|
80
|
+
]) {
|
|
81
|
+
for (const prop in obj) {
|
|
82
|
+
const value = obj[prop];
|
|
83
|
+
if (propsToIgnore.indexOf(prop) > -1 ||
|
|
84
|
+
value === null ||
|
|
85
|
+
typeof value === 'undefined') {
|
|
86
|
+
delete obj[prop];
|
|
87
|
+
}
|
|
88
|
+
else if (typeof value === 'object') {
|
|
89
|
+
cleanEvent(value);
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
exports.default = calendarAssert;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { ToolBeltState, AbstractCalendarEventViewController, ToolBeltStateMachine, SpruceSchemas } from '@sprucelabs/heartwood-view-controllers';
|
|
2
|
+
import { MercuryClient } from '@sprucelabs/mercury-client';
|
|
3
|
+
import { ViewFixture } from '@sprucelabs/spruce-test-fixtures';
|
|
4
|
+
import AbstractCalendarEventToolBeltState from '../../../toolBelt/states/AbstractCalendarEventToolBeltState';
|
|
5
|
+
export interface AssertRemoteToolsOptions {
|
|
6
|
+
client: MercuryClient;
|
|
7
|
+
state: ToolBeltState;
|
|
8
|
+
views: ViewFixture;
|
|
9
|
+
}
|
|
10
|
+
interface TypeWithVcId {
|
|
11
|
+
typeSlug: string;
|
|
12
|
+
vcId: string;
|
|
13
|
+
}
|
|
14
|
+
export declare type AssertTypeSlug = string | TypeWithVcId;
|
|
15
|
+
declare const calendarSkillAssert: {
|
|
16
|
+
createdEventTypes: SpruceSchemas.Calendar.v2021_05_19.CalendarEventType[];
|
|
17
|
+
createdCalendars: SpruceSchemas.Calendar.v2021_05_19.Calendar[];
|
|
18
|
+
beforeEach(views: ViewFixture): Promise<void>;
|
|
19
|
+
createsCalendarOnInstall(calendarSlug: string, client: MercuryClient, typeSlugs?: string[]): Promise<void>;
|
|
20
|
+
createsCalendarsWithMultipleInstalls(calendarSlug: string, client: MercuryClient): Promise<void>;
|
|
21
|
+
createsEventTypesOnBoot(types: AssertTypeSlug[], client: MercuryClient, boot: () => Promise<any>): Promise<void>;
|
|
22
|
+
createsEventTypesWithMultipleBoots(types: AssertTypeSlug[], client: MercuryClient, boot: () => Promise<any>): Promise<void>;
|
|
23
|
+
isValidEventViewController(options: {
|
|
24
|
+
views: ViewFixture;
|
|
25
|
+
CalendarEventClass: typeof AbstractCalendarEventViewController;
|
|
26
|
+
ToolBeltStateClass: any;
|
|
27
|
+
}): void;
|
|
28
|
+
stateFetchesAndRendersRemoteTools(options: AssertRemoteToolsOptions): Promise<{
|
|
29
|
+
toolId: string;
|
|
30
|
+
Class: any;
|
|
31
|
+
}[]>;
|
|
32
|
+
toolBeltStateProperlyInheritsAbstractToolBeltState(stateMachine: ToolBeltStateMachine, state: AbstractCalendarEventToolBeltState): Promise<void>;
|
|
33
|
+
toolBeltStateAddsTool(options: {
|
|
34
|
+
state: AbstractCalendarEventToolBeltState;
|
|
35
|
+
toolId: string;
|
|
36
|
+
views: ViewFixture;
|
|
37
|
+
Class?: any;
|
|
38
|
+
}): Promise<SpruceSchemas.HeartwoodViewControllers.v2021_02_11.ToolBeltTool>;
|
|
39
|
+
};
|
|
40
|
+
export default calendarSkillAssert;
|