element-web-Github/test/skinned-sdk.js
Kerry 61e3c38b19
Add configuration to disable relative date markers in timeline (#7405)
* add disabler elative dates setting

Signed-off-by: Kerry Archibald <kerrya@element.io>

* test existing DateSeparator

Signed-off-by: Kerry Archibald <kerrya@element.io>

* use full date format when TimelineDisableRelativeDates is truthy

Signed-off-by: Kerry Archibald <kerrya@element.io>

* add comment

Signed-off-by: Kerry Archibald <kerrya@element.io>

* flip timelineDisableRelativeDates -> timelineEnableRelativeDates to fit convention

Signed-off-by: Kerry Archibald <kerrya@element.io>

* mock date constructor in test

Signed-off-by: Kerry Archibald <kerrya@element.io>
2021-12-21 10:08:22 +01:00

29 lines
1.0 KiB
JavaScript

/*
* skinned-sdk.js
*
* Skins the react-sdk with a few stub components which we expect the
* application to provide
*/
/* this is a convenient place to ensure we load the compatibility libraries we expect our
* app to provide
*/
import * as sdk from "../src/index";
import stubComponent from "./components/stub-component";
const components = {};
components['structures.LeftPanel'] = stubComponent();
components['structures.RightPanel'] = stubComponent();
components['structures.RoomDirectory'] = stubComponent();
components['views.globals.GuestWarningBar'] = stubComponent();
components['views.globals.NewVersionBar'] = stubComponent();
components['views.elements.Spinner'] = stubComponent({ displayName: 'Spinner' });
components['views.messages.MessageTimestamp'] = stubComponent({ displayName: 'MessageTimestamp' });
components['views.messages.SenderProfile'] = stubComponent({ displayName: 'SenderProfile' });
components['views.rooms.SearchBar'] = stubComponent();
sdk.loadSkin({ components });
export default sdk;