|
@@ -56,14 +56,10 @@ describe('<EditorLeftMenu />', function () {
|
|
|
})
|
|
})
|
|
|
|
|
|
|
|
it('render full menu', function () {
|
|
it('render full menu', function () {
|
|
|
- const scope = mockScope({
|
|
|
|
|
- ui: {
|
|
|
|
|
- leftMenuShown: true,
|
|
|
|
|
- },
|
|
|
|
|
- })
|
|
|
|
|
|
|
+ const scope = mockScope()
|
|
|
|
|
|
|
|
cy.mount(
|
|
cy.mount(
|
|
|
- <EditorProviders scope={scope}>
|
|
|
|
|
|
|
+ <EditorProviders scope={scope} layoutContext={{ leftMenuShown: true }}>
|
|
|
<EditorLeftMenu />
|
|
<EditorLeftMenu />
|
|
|
</EditorProviders>
|
|
</EditorProviders>
|
|
|
)
|
|
)
|
|
@@ -110,14 +106,12 @@ describe('<EditorLeftMenu />', function () {
|
|
|
|
|
|
|
|
describe('download menu', function () {
|
|
describe('download menu', function () {
|
|
|
it('have a correct source & pdf download url', function () {
|
|
it('have a correct source & pdf download url', function () {
|
|
|
- const scope = mockScope({
|
|
|
|
|
- ui: {
|
|
|
|
|
- leftMenuShown: true,
|
|
|
|
|
- },
|
|
|
|
|
- })
|
|
|
|
|
-
|
|
|
|
|
|
|
+ const scope = mockScope()
|
|
|
cy.mount(
|
|
cy.mount(
|
|
|
- <EditorProviders scope={scope}>
|
|
|
|
|
|
|
+ <EditorProviders
|
|
|
|
|
+ scope={scope}
|
|
|
|
|
+ layoutContext={{ leftMenuShown: true }}
|
|
|
|
|
+ >
|
|
|
<EditorLeftMenu />
|
|
<EditorLeftMenu />
|
|
|
</EditorProviders>
|
|
</EditorProviders>
|
|
|
)
|
|
)
|
|
@@ -142,14 +136,13 @@ describe('<EditorLeftMenu />', function () {
|
|
|
},
|
|
},
|
|
|
})
|
|
})
|
|
|
|
|
|
|
|
- const scope = mockScope({
|
|
|
|
|
- ui: {
|
|
|
|
|
- leftMenuShown: true,
|
|
|
|
|
- },
|
|
|
|
|
- })
|
|
|
|
|
|
|
+ const scope = mockScope()
|
|
|
|
|
|
|
|
cy.mount(
|
|
cy.mount(
|
|
|
- <EditorProviders scope={scope}>
|
|
|
|
|
|
|
+ <EditorProviders
|
|
|
|
|
+ scope={scope}
|
|
|
|
|
+ layoutContext={{ leftMenuShown: true }}
|
|
|
|
|
+ >
|
|
|
<EditorLeftMenu />
|
|
<EditorLeftMenu />
|
|
|
</EditorProviders>
|
|
</EditorProviders>
|
|
|
)
|
|
)
|
|
@@ -184,14 +177,13 @@ describe('<EditorLeftMenu />', function () {
|
|
|
},
|
|
},
|
|
|
}).as('wordCount')
|
|
}).as('wordCount')
|
|
|
|
|
|
|
|
- const scope = mockScope({
|
|
|
|
|
- ui: {
|
|
|
|
|
- leftMenuShown: true,
|
|
|
|
|
- },
|
|
|
|
|
- })
|
|
|
|
|
|
|
+ const scope = mockScope()
|
|
|
|
|
|
|
|
cy.mount(
|
|
cy.mount(
|
|
|
- <EditorProviders scope={scope}>
|
|
|
|
|
|
|
+ <EditorProviders
|
|
|
|
|
+ scope={scope}
|
|
|
|
|
+ layoutContext={{ leftMenuShown: true }}
|
|
|
|
|
+ >
|
|
|
<EditorLeftMenu />
|
|
<EditorLeftMenu />
|
|
|
</EditorProviders>
|
|
</EditorProviders>
|
|
|
)
|
|
)
|
|
@@ -217,9 +209,6 @@ describe('<EditorLeftMenu />', function () {
|
|
|
})
|
|
})
|
|
|
|
|
|
|
|
const scope = mockScope({
|
|
const scope = mockScope({
|
|
|
- ui: {
|
|
|
|
|
- leftMenuShown: true,
|
|
|
|
|
- },
|
|
|
|
|
project: {
|
|
project: {
|
|
|
members: [],
|
|
members: [],
|
|
|
owner: {
|
|
owner: {
|
|
@@ -234,7 +223,10 @@ describe('<EditorLeftMenu />', function () {
|
|
|
})
|
|
})
|
|
|
|
|
|
|
|
cy.mount(
|
|
cy.mount(
|
|
|
- <EditorProviders scope={scope}>
|
|
|
|
|
|
|
+ <EditorProviders
|
|
|
|
|
+ scope={scope}
|
|
|
|
|
+ layoutContext={{ leftMenuShown: true }}
|
|
|
|
|
+ >
|
|
|
<EditorLeftMenu />
|
|
<EditorLeftMenu />
|
|
|
</EditorProviders>
|
|
</EditorProviders>
|
|
|
)
|
|
)
|
|
@@ -245,9 +237,6 @@ describe('<EditorLeftMenu />', function () {
|
|
|
|
|
|
|
|
it('shows git modal correctly', function () {
|
|
it('shows git modal correctly', function () {
|
|
|
const scope = mockScope({
|
|
const scope = mockScope({
|
|
|
- ui: {
|
|
|
|
|
- leftMenuShown: true,
|
|
|
|
|
- },
|
|
|
|
|
project: {
|
|
project: {
|
|
|
owner: {
|
|
owner: {
|
|
|
_id: '123',
|
|
_id: '123',
|
|
@@ -259,7 +248,10 @@ describe('<EditorLeftMenu />', function () {
|
|
|
})
|
|
})
|
|
|
|
|
|
|
|
cy.mount(
|
|
cy.mount(
|
|
|
- <EditorProviders scope={scope}>
|
|
|
|
|
|
|
+ <EditorProviders
|
|
|
|
|
+ scope={scope}
|
|
|
|
|
+ layoutContext={{ leftMenuShown: true }}
|
|
|
|
|
+ >
|
|
|
<EditorLeftMenu />
|
|
<EditorLeftMenu />
|
|
|
</EditorProviders>
|
|
</EditorProviders>
|
|
|
)
|
|
)
|
|
@@ -271,9 +263,6 @@ describe('<EditorLeftMenu />', function () {
|
|
|
|
|
|
|
|
it('shows git modal paywall correctly', function () {
|
|
it('shows git modal paywall correctly', function () {
|
|
|
const scope = mockScope({
|
|
const scope = mockScope({
|
|
|
- ui: {
|
|
|
|
|
- leftMenuShown: true,
|
|
|
|
|
- },
|
|
|
|
|
project: {
|
|
project: {
|
|
|
owner: {
|
|
owner: {
|
|
|
_id: '123',
|
|
_id: '123',
|
|
@@ -285,7 +274,10 @@ describe('<EditorLeftMenu />', function () {
|
|
|
})
|
|
})
|
|
|
|
|
|
|
|
cy.mount(
|
|
cy.mount(
|
|
|
- <EditorProviders scope={scope}>
|
|
|
|
|
|
|
+ <EditorProviders
|
|
|
|
|
+ scope={scope}
|
|
|
|
|
+ layoutContext={{ leftMenuShown: true }}
|
|
|
|
|
+ >
|
|
|
<EditorLeftMenu />
|
|
<EditorLeftMenu />
|
|
|
</EditorProviders>
|
|
</EditorProviders>
|
|
|
)
|
|
)
|
|
@@ -304,14 +296,13 @@ describe('<EditorLeftMenu />', function () {
|
|
|
enabled: false,
|
|
enabled: false,
|
|
|
}).as('project-status')
|
|
}).as('project-status')
|
|
|
|
|
|
|
|
- const scope = mockScope({
|
|
|
|
|
- ui: {
|
|
|
|
|
- leftMenuShown: true,
|
|
|
|
|
- },
|
|
|
|
|
- })
|
|
|
|
|
|
|
+ const scope = mockScope()
|
|
|
|
|
|
|
|
cy.mount(
|
|
cy.mount(
|
|
|
- <EditorProviders scope={scope}>
|
|
|
|
|
|
|
+ <EditorProviders
|
|
|
|
|
+ scope={scope}
|
|
|
|
|
+ layoutContext={{ leftMenuShown: true }}
|
|
|
|
|
+ >
|
|
|
<EditorLeftMenu />
|
|
<EditorLeftMenu />
|
|
|
</EditorProviders>
|
|
</EditorProviders>
|
|
|
)
|
|
)
|
|
@@ -335,14 +326,13 @@ describe('<EditorLeftMenu />', function () {
|
|
|
|
|
|
|
|
describe('settings menu', function () {
|
|
describe('settings menu', function () {
|
|
|
it('shows compiler menu correctly', function () {
|
|
it('shows compiler menu correctly', function () {
|
|
|
- const scope = mockScope({
|
|
|
|
|
- ui: {
|
|
|
|
|
- leftMenuShown: true,
|
|
|
|
|
- },
|
|
|
|
|
- })
|
|
|
|
|
|
|
+ const scope = mockScope()
|
|
|
|
|
|
|
|
cy.mount(
|
|
cy.mount(
|
|
|
- <EditorProviders scope={scope}>
|
|
|
|
|
|
|
+ <EditorProviders
|
|
|
|
|
+ scope={scope}
|
|
|
|
|
+ layoutContext={{ leftMenuShown: true }}
|
|
|
|
|
+ >
|
|
|
<EditorLeftMenu />
|
|
<EditorLeftMenu />
|
|
|
</EditorProviders>
|
|
</EditorProviders>
|
|
|
)
|
|
)
|
|
@@ -369,14 +359,13 @@ describe('<EditorLeftMenu />', function () {
|
|
|
})
|
|
})
|
|
|
|
|
|
|
|
it('shows texlive version menu correctly', function () {
|
|
it('shows texlive version menu correctly', function () {
|
|
|
- const scope = mockScope({
|
|
|
|
|
- ui: {
|
|
|
|
|
- leftMenuShown: true,
|
|
|
|
|
- },
|
|
|
|
|
- })
|
|
|
|
|
|
|
+ const scope = mockScope()
|
|
|
|
|
|
|
|
cy.mount(
|
|
cy.mount(
|
|
|
- <EditorProviders scope={scope}>
|
|
|
|
|
|
|
+ <EditorProviders
|
|
|
|
|
+ scope={scope}
|
|
|
|
|
+ layoutContext={{ leftMenuShown: true }}
|
|
|
|
|
+ >
|
|
|
<EditorLeftMenu />
|
|
<EditorLeftMenu />
|
|
|
</EditorProviders>
|
|
</EditorProviders>
|
|
|
)
|
|
)
|
|
@@ -410,14 +399,14 @@ describe('<EditorLeftMenu />', function () {
|
|
|
folders: [],
|
|
folders: [],
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- const scope = mockScope({
|
|
|
|
|
- ui: {
|
|
|
|
|
- leftMenuShown: true,
|
|
|
|
|
- },
|
|
|
|
|
- })
|
|
|
|
|
|
|
+ const scope = mockScope()
|
|
|
|
|
|
|
|
cy.mount(
|
|
cy.mount(
|
|
|
- <EditorProviders scope={scope} rootFolder={[rootFolder as any]}>
|
|
|
|
|
|
|
+ <EditorProviders
|
|
|
|
|
+ layoutContext={{ leftMenuShown: true }}
|
|
|
|
|
+ scope={scope}
|
|
|
|
|
+ rootFolder={[rootFolder as any]}
|
|
|
|
|
+ >
|
|
|
<EditorLeftMenu />
|
|
<EditorLeftMenu />
|
|
|
</EditorProviders>
|
|
</EditorProviders>
|
|
|
)
|
|
)
|
|
@@ -451,14 +440,13 @@ describe('<EditorLeftMenu />', function () {
|
|
|
|
|
|
|
|
window.metaAttributesCache.set('ol-languages', languages)
|
|
window.metaAttributesCache.set('ol-languages', languages)
|
|
|
|
|
|
|
|
- const scope = mockScope({
|
|
|
|
|
- ui: {
|
|
|
|
|
- leftMenuShown: true,
|
|
|
|
|
- },
|
|
|
|
|
- })
|
|
|
|
|
|
|
+ const scope = mockScope()
|
|
|
|
|
|
|
|
cy.mount(
|
|
cy.mount(
|
|
|
- <EditorProviders scope={scope}>
|
|
|
|
|
|
|
+ <EditorProviders
|
|
|
|
|
+ scope={scope}
|
|
|
|
|
+ layoutContext={{ leftMenuShown: true }}
|
|
|
|
|
+ >
|
|
|
<EditorLeftMenu />
|
|
<EditorLeftMenu />
|
|
|
</EditorProviders>
|
|
</EditorProviders>
|
|
|
)
|
|
)
|
|
@@ -475,14 +463,13 @@ describe('<EditorLeftMenu />', function () {
|
|
|
})
|
|
})
|
|
|
|
|
|
|
|
it('shows dictionary modal correctly', function () {
|
|
it('shows dictionary modal correctly', function () {
|
|
|
- const scope = mockScope({
|
|
|
|
|
- ui: {
|
|
|
|
|
- leftMenuShown: true,
|
|
|
|
|
- },
|
|
|
|
|
- })
|
|
|
|
|
|
|
+ const scope = mockScope()
|
|
|
|
|
|
|
|
cy.mount(
|
|
cy.mount(
|
|
|
- <EditorProviders scope={scope}>
|
|
|
|
|
|
|
+ <EditorProviders
|
|
|
|
|
+ scope={scope}
|
|
|
|
|
+ layoutContext={{ leftMenuShown: true }}
|
|
|
|
|
+ >
|
|
|
<EditorLeftMenu />
|
|
<EditorLeftMenu />
|
|
|
</EditorProviders>
|
|
</EditorProviders>
|
|
|
)
|
|
)
|
|
@@ -493,14 +480,13 @@ describe('<EditorLeftMenu />', function () {
|
|
|
})
|
|
})
|
|
|
|
|
|
|
|
it('shows auto-complete menu correctly', function () {
|
|
it('shows auto-complete menu correctly', function () {
|
|
|
- const scope = mockScope({
|
|
|
|
|
- ui: {
|
|
|
|
|
- leftMenuShown: true,
|
|
|
|
|
- },
|
|
|
|
|
- })
|
|
|
|
|
|
|
+ const scope = mockScope()
|
|
|
|
|
|
|
|
cy.mount(
|
|
cy.mount(
|
|
|
- <EditorProviders scope={scope}>
|
|
|
|
|
|
|
+ <EditorProviders
|
|
|
|
|
+ scope={scope}
|
|
|
|
|
+ layoutContext={{ leftMenuShown: true }}
|
|
|
|
|
+ >
|
|
|
<EditorLeftMenu />
|
|
<EditorLeftMenu />
|
|
|
</EditorProviders>
|
|
</EditorProviders>
|
|
|
)
|
|
)
|
|
@@ -517,14 +503,13 @@ describe('<EditorLeftMenu />', function () {
|
|
|
})
|
|
})
|
|
|
|
|
|
|
|
it('shows auto-close brackets menu correctly', function () {
|
|
it('shows auto-close brackets menu correctly', function () {
|
|
|
- const scope = mockScope({
|
|
|
|
|
- ui: {
|
|
|
|
|
- leftMenuShown: true,
|
|
|
|
|
- },
|
|
|
|
|
- })
|
|
|
|
|
|
|
+ const scope = mockScope()
|
|
|
|
|
|
|
|
cy.mount(
|
|
cy.mount(
|
|
|
- <EditorProviders scope={scope}>
|
|
|
|
|
|
|
+ <EditorProviders
|
|
|
|
|
+ scope={scope}
|
|
|
|
|
+ layoutContext={{ leftMenuShown: true }}
|
|
|
|
|
+ >
|
|
|
<EditorLeftMenu />
|
|
<EditorLeftMenu />
|
|
|
</EditorProviders>
|
|
</EditorProviders>
|
|
|
)
|
|
)
|
|
@@ -541,14 +526,13 @@ describe('<EditorLeftMenu />', function () {
|
|
|
})
|
|
})
|
|
|
|
|
|
|
|
it('shows code check menu correctly', function () {
|
|
it('shows code check menu correctly', function () {
|
|
|
- const scope = mockScope({
|
|
|
|
|
- ui: {
|
|
|
|
|
- leftMenuShown: true,
|
|
|
|
|
- },
|
|
|
|
|
- })
|
|
|
|
|
|
|
+ const scope = mockScope()
|
|
|
|
|
|
|
|
cy.mount(
|
|
cy.mount(
|
|
|
- <EditorProviders scope={scope}>
|
|
|
|
|
|
|
+ <EditorProviders
|
|
|
|
|
+ scope={scope}
|
|
|
|
|
+ layoutContext={{ leftMenuShown: true }}
|
|
|
|
|
+ >
|
|
|
<EditorLeftMenu />
|
|
<EditorLeftMenu />
|
|
|
</EditorProviders>
|
|
</EditorProviders>
|
|
|
)
|
|
)
|
|
@@ -579,14 +563,13 @@ describe('<EditorLeftMenu />', function () {
|
|
|
legacyEditorThemes
|
|
legacyEditorThemes
|
|
|
)
|
|
)
|
|
|
|
|
|
|
|
- const scope = mockScope({
|
|
|
|
|
- ui: {
|
|
|
|
|
- leftMenuShown: true,
|
|
|
|
|
- },
|
|
|
|
|
- })
|
|
|
|
|
|
|
+ const scope = mockScope()
|
|
|
|
|
|
|
|
cy.mount(
|
|
cy.mount(
|
|
|
- <EditorProviders scope={scope}>
|
|
|
|
|
|
|
+ <EditorProviders
|
|
|
|
|
+ scope={scope}
|
|
|
|
|
+ layoutContext={{ leftMenuShown: true }}
|
|
|
|
|
+ >
|
|
|
<EditorLeftMenu />
|
|
<EditorLeftMenu />
|
|
|
</EditorProviders>
|
|
</EditorProviders>
|
|
|
)
|
|
)
|
|
@@ -619,14 +602,13 @@ describe('<EditorLeftMenu />', function () {
|
|
|
})
|
|
})
|
|
|
|
|
|
|
|
it('shows overall theme menu correctly', function () {
|
|
it('shows overall theme menu correctly', function () {
|
|
|
- const scope = mockScope({
|
|
|
|
|
- ui: {
|
|
|
|
|
- leftMenuShown: true,
|
|
|
|
|
- },
|
|
|
|
|
- })
|
|
|
|
|
|
|
+ const scope = mockScope()
|
|
|
|
|
|
|
|
cy.mount(
|
|
cy.mount(
|
|
|
- <EditorProviders scope={scope}>
|
|
|
|
|
|
|
+ <EditorProviders
|
|
|
|
|
+ scope={scope}
|
|
|
|
|
+ layoutContext={{ leftMenuShown: true }}
|
|
|
|
|
+ >
|
|
|
<EditorLeftMenu />
|
|
<EditorLeftMenu />
|
|
|
</EditorProviders>
|
|
</EditorProviders>
|
|
|
)
|
|
)
|
|
@@ -643,14 +625,13 @@ describe('<EditorLeftMenu />', function () {
|
|
|
})
|
|
})
|
|
|
|
|
|
|
|
it('shows keybindings menu correctly', function () {
|
|
it('shows keybindings menu correctly', function () {
|
|
|
- const scope = mockScope({
|
|
|
|
|
- ui: {
|
|
|
|
|
- leftMenuShown: true,
|
|
|
|
|
- },
|
|
|
|
|
- })
|
|
|
|
|
|
|
+ const scope = mockScope()
|
|
|
|
|
|
|
|
cy.mount(
|
|
cy.mount(
|
|
|
- <EditorProviders scope={scope}>
|
|
|
|
|
|
|
+ <EditorProviders
|
|
|
|
|
+ scope={scope}
|
|
|
|
|
+ layoutContext={{ leftMenuShown: true }}
|
|
|
|
|
+ >
|
|
|
<EditorLeftMenu />
|
|
<EditorLeftMenu />
|
|
|
</EditorProviders>
|
|
</EditorProviders>
|
|
|
)
|
|
)
|
|
@@ -667,14 +648,13 @@ describe('<EditorLeftMenu />', function () {
|
|
|
})
|
|
})
|
|
|
|
|
|
|
|
it('shows font size menu correctly', function () {
|
|
it('shows font size menu correctly', function () {
|
|
|
- const scope = mockScope({
|
|
|
|
|
- ui: {
|
|
|
|
|
- leftMenuShown: true,
|
|
|
|
|
- },
|
|
|
|
|
- })
|
|
|
|
|
|
|
+ const scope = mockScope()
|
|
|
|
|
|
|
|
cy.mount(
|
|
cy.mount(
|
|
|
- <EditorProviders scope={scope}>
|
|
|
|
|
|
|
+ <EditorProviders
|
|
|
|
|
+ scope={scope}
|
|
|
|
|
+ layoutContext={{ leftMenuShown: true }}
|
|
|
|
|
+ >
|
|
|
<EditorLeftMenu />
|
|
<EditorLeftMenu />
|
|
|
</EditorProviders>
|
|
</EditorProviders>
|
|
|
)
|
|
)
|
|
@@ -713,14 +693,13 @@ describe('<EditorLeftMenu />', function () {
|
|
|
})
|
|
})
|
|
|
|
|
|
|
|
it('shows font family menu correctly', function () {
|
|
it('shows font family menu correctly', function () {
|
|
|
- const scope = mockScope({
|
|
|
|
|
- ui: {
|
|
|
|
|
- leftMenuShown: true,
|
|
|
|
|
- },
|
|
|
|
|
- })
|
|
|
|
|
|
|
+ const scope = mockScope()
|
|
|
|
|
|
|
|
cy.mount(
|
|
cy.mount(
|
|
|
- <EditorProviders scope={scope}>
|
|
|
|
|
|
|
+ <EditorProviders
|
|
|
|
|
+ scope={scope}
|
|
|
|
|
+ layoutContext={{ leftMenuShown: true }}
|
|
|
|
|
+ >
|
|
|
<EditorLeftMenu />
|
|
<EditorLeftMenu />
|
|
|
</EditorProviders>
|
|
</EditorProviders>
|
|
|
)
|
|
)
|
|
@@ -741,14 +720,13 @@ describe('<EditorLeftMenu />', function () {
|
|
|
})
|
|
})
|
|
|
|
|
|
|
|
it('shows line height menu correctly', function () {
|
|
it('shows line height menu correctly', function () {
|
|
|
- const scope = mockScope({
|
|
|
|
|
- ui: {
|
|
|
|
|
- leftMenuShown: true,
|
|
|
|
|
- },
|
|
|
|
|
- })
|
|
|
|
|
|
|
+ const scope = mockScope()
|
|
|
|
|
|
|
|
cy.mount(
|
|
cy.mount(
|
|
|
- <EditorProviders scope={scope}>
|
|
|
|
|
|
|
+ <EditorProviders
|
|
|
|
|
+ scope={scope}
|
|
|
|
|
+ layoutContext={{ leftMenuShown: true }}
|
|
|
|
|
+ >
|
|
|
<EditorLeftMenu />
|
|
<EditorLeftMenu />
|
|
|
</EditorProviders>
|
|
</EditorProviders>
|
|
|
)
|
|
)
|
|
@@ -765,14 +743,13 @@ describe('<EditorLeftMenu />', function () {
|
|
|
})
|
|
})
|
|
|
|
|
|
|
|
it('shows pdf viewer menu correctly', function () {
|
|
it('shows pdf viewer menu correctly', function () {
|
|
|
- const scope = mockScope({
|
|
|
|
|
- ui: {
|
|
|
|
|
- leftMenuShown: true,
|
|
|
|
|
- },
|
|
|
|
|
- })
|
|
|
|
|
|
|
+ const scope = mockScope()
|
|
|
|
|
|
|
|
cy.mount(
|
|
cy.mount(
|
|
|
- <EditorProviders scope={scope}>
|
|
|
|
|
|
|
+ <EditorProviders
|
|
|
|
|
+ scope={scope}
|
|
|
|
|
+ layoutContext={{ leftMenuShown: true }}
|
|
|
|
|
+ >
|
|
|
<EditorLeftMenu />
|
|
<EditorLeftMenu />
|
|
|
</EditorProviders>
|
|
</EditorProviders>
|
|
|
)
|
|
)
|
|
@@ -791,14 +768,13 @@ describe('<EditorLeftMenu />', function () {
|
|
|
|
|
|
|
|
describe('help menu', function () {
|
|
describe('help menu', function () {
|
|
|
it('shows hotkeys modal correctly', function () {
|
|
it('shows hotkeys modal correctly', function () {
|
|
|
- const scope = mockScope({
|
|
|
|
|
- ui: {
|
|
|
|
|
- leftMenuShown: true,
|
|
|
|
|
- },
|
|
|
|
|
- })
|
|
|
|
|
|
|
+ const scope = mockScope()
|
|
|
|
|
|
|
|
cy.mount(
|
|
cy.mount(
|
|
|
- <EditorProviders scope={scope}>
|
|
|
|
|
|
|
+ <EditorProviders
|
|
|
|
|
+ scope={scope}
|
|
|
|
|
+ layoutContext={{ leftMenuShown: true }}
|
|
|
|
|
+ >
|
|
|
<EditorLeftMenu />
|
|
<EditorLeftMenu />
|
|
|
</EditorProviders>
|
|
</EditorProviders>
|
|
|
)
|
|
)
|
|
@@ -808,14 +784,13 @@ describe('<EditorLeftMenu />', function () {
|
|
|
})
|
|
})
|
|
|
|
|
|
|
|
it('shows correct url for documentation', function () {
|
|
it('shows correct url for documentation', function () {
|
|
|
- const scope = mockScope({
|
|
|
|
|
- ui: {
|
|
|
|
|
- leftMenuShown: true,
|
|
|
|
|
- },
|
|
|
|
|
- })
|
|
|
|
|
|
|
+ const scope = mockScope()
|
|
|
|
|
|
|
|
cy.mount(
|
|
cy.mount(
|
|
|
- <EditorProviders scope={scope}>
|
|
|
|
|
|
|
+ <EditorProviders
|
|
|
|
|
+ scope={scope}
|
|
|
|
|
+ layoutContext={{ leftMenuShown: true }}
|
|
|
|
|
+ >
|
|
|
<EditorLeftMenu />
|
|
<EditorLeftMenu />
|
|
|
</EditorProviders>
|
|
</EditorProviders>
|
|
|
)
|
|
)
|
|
@@ -828,14 +803,13 @@ describe('<EditorLeftMenu />', function () {
|
|
|
})
|
|
})
|
|
|
|
|
|
|
|
it('shows correct contact us modal', function () {
|
|
it('shows correct contact us modal', function () {
|
|
|
- const scope = mockScope({
|
|
|
|
|
- ui: {
|
|
|
|
|
- leftMenuShown: true,
|
|
|
|
|
- },
|
|
|
|
|
- })
|
|
|
|
|
|
|
+ const scope = mockScope()
|
|
|
|
|
|
|
|
cy.mount(
|
|
cy.mount(
|
|
|
- <EditorProviders scope={scope}>
|
|
|
|
|
|
|
+ <EditorProviders
|
|
|
|
|
+ scope={scope}
|
|
|
|
|
+ layoutContext={{ leftMenuShown: true }}
|
|
|
|
|
+ >
|
|
|
<EditorLeftMenu />
|
|
<EditorLeftMenu />
|
|
|
</EditorProviders>
|
|
</EditorProviders>
|
|
|
)
|
|
)
|
|
@@ -848,16 +822,13 @@ describe('<EditorLeftMenu />', function () {
|
|
|
|
|
|
|
|
describe('for anonymous users', function () {
|
|
describe('for anonymous users', function () {
|
|
|
it('render minimal menu', function () {
|
|
it('render minimal menu', function () {
|
|
|
- const scope = mockScope({
|
|
|
|
|
- ui: {
|
|
|
|
|
- leftMenuShown: true,
|
|
|
|
|
- },
|
|
|
|
|
- })
|
|
|
|
|
|
|
+ const scope = mockScope()
|
|
|
|
|
+
|
|
|
window.metaAttributesCache.set('ol-anonymous', true)
|
|
window.metaAttributesCache.set('ol-anonymous', true)
|
|
|
Object.assign(getMeta('ol-ExposedSettings'), { ieeeBrandId: 123 })
|
|
Object.assign(getMeta('ol-ExposedSettings'), { ieeeBrandId: 123 })
|
|
|
|
|
|
|
|
cy.mount(
|
|
cy.mount(
|
|
|
- <EditorProviders scope={scope}>
|
|
|
|
|
|
|
+ <EditorProviders scope={scope} layoutContext={{ leftMenuShown: true }}>
|
|
|
<EditorLeftMenu />
|
|
<EditorLeftMenu />
|
|
|
</EditorProviders>
|
|
</EditorProviders>
|
|
|
)
|
|
)
|