Revert "fix(h5): 小程序 nh=1 原生顶栏模式与 sbh 顶距(配 202608278)"
This reverts commit 580ba85b61.
This commit is contained in:
@@ -28,7 +28,7 @@ describe('mpEmbed', () => {
|
||||
expect(document.documentElement.style.getPropertyValue('--yxg-safe-top')).toBe('47px')
|
||||
})
|
||||
|
||||
it('uses native mini-program cover header with ?nh=1', () => {
|
||||
it('uses native mini-program header mode with ?nh=1', () => {
|
||||
window.history.replaceState({}, '', '/psy/?mp=1&nh=1')
|
||||
initMpEmbed()
|
||||
expect(isMpNativeHeader()).toBe(true)
|
||||
@@ -37,17 +37,6 @@ describe('mpEmbed', () => {
|
||||
expect(document.documentElement.style.getPropertyValue('--yxg-page-top')).toBe('4px')
|
||||
})
|
||||
|
||||
it('offsets content below native cover bar with ?nh=1&sbh=', () => {
|
||||
window.history.replaceState({}, '', '/psy/?mp=1&nh=1&sbh=87')
|
||||
initMpEmbed()
|
||||
expect(isMpNativeHeader()).toBe(true)
|
||||
expect(sessionStorage.getItem('yxg_sbh')).toBe('87')
|
||||
expect(document.documentElement.style.getPropertyValue('--yxg-page-top')).toBe('87px')
|
||||
window.history.replaceState({}, '', '/psy/?mp=1')
|
||||
applyMpEmbedDom()
|
||||
expect(document.documentElement.style.getPropertyValue('--yxg-page-top')).toBe('87px')
|
||||
})
|
||||
|
||||
it('returns false without mp query', () => {
|
||||
initMpEmbed()
|
||||
expect(isMpEmbed()).toBe(false)
|
||||
|
||||
Reference in New Issue
Block a user