Move map attribution to top right (#8621)
Signed-off-by: Michael Weimann <michaelw@matrix.org> Co-authored-by: Michael Telatynski <7t3chguy@gmail.com>
This commit is contained in:
parent
764b307e63
commit
1535ff0d6c
8 changed files with 71 additions and 13 deletions
|
@ -79,6 +79,11 @@ describe('<MBeaconBody />', () => {
|
|||
});
|
||||
|
||||
const modalSpy = jest.spyOn(Modal, 'createTrackedDialog').mockReturnValue(undefined);
|
||||
|
||||
beforeAll(() => {
|
||||
maplibregl.AttributionControl = jest.fn();
|
||||
});
|
||||
|
||||
beforeEach(() => {
|
||||
jest.clearAllMocks();
|
||||
});
|
||||
|
|
|
@ -56,6 +56,15 @@ describe("MLocationBody", () => {
|
|||
wrappingComponent: MatrixClientContext.Provider,
|
||||
wrappingComponentProps: { value: mockClient },
|
||||
});
|
||||
|
||||
beforeAll(() => {
|
||||
maplibregl.AttributionControl = jest.fn();
|
||||
});
|
||||
|
||||
beforeEach(() => {
|
||||
jest.clearAllMocks();
|
||||
});
|
||||
|
||||
describe('with error', () => {
|
||||
let sdkConfigSpy;
|
||||
|
||||
|
|
|
@ -124,7 +124,20 @@ exports[`MLocationBody <MLocationBody> without error renders map correctly 1`] =
|
|||
},
|
||||
"_eventsCount": 1,
|
||||
"_maxListeners": undefined,
|
||||
"addControl": [MockFunction],
|
||||
"addControl": [MockFunction] {
|
||||
"calls": Array [
|
||||
Array [
|
||||
mockConstructor {},
|
||||
"top-right",
|
||||
],
|
||||
],
|
||||
"results": Array [
|
||||
Object {
|
||||
"type": "return",
|
||||
"value": undefined,
|
||||
},
|
||||
],
|
||||
},
|
||||
"fitBounds": [MockFunction],
|
||||
"removeControl": [MockFunction],
|
||||
"setCenter": [MockFunction] {
|
||||
|
@ -135,22 +148,12 @@ exports[`MLocationBody <MLocationBody> without error renders map correctly 1`] =
|
|||
"lon": -0.1276,
|
||||
},
|
||||
],
|
||||
Array [
|
||||
Object {
|
||||
"lat": 51.5076,
|
||||
"lon": -0.1276,
|
||||
},
|
||||
],
|
||||
],
|
||||
"results": Array [
|
||||
Object {
|
||||
"type": "return",
|
||||
"value": undefined,
|
||||
},
|
||||
Object {
|
||||
"type": "return",
|
||||
"value": undefined,
|
||||
},
|
||||
],
|
||||
},
|
||||
"setStyle": [MockFunction],
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue