Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

调整 mipComponentsPolyfill 安装时机以修复 phantomjs 环境报错 #407

Merged
merged 1 commit into from
Dec 10, 2018

Conversation

zoumiaojiang
Copy link
Contributor

@zoumiaojiang zoumiaojiang commented Dec 10, 2018

相关 ISSUE: (ISSUE 链接地址)

#402

1、升级点 (清晰准确的描述升级的功能点)

  • 调整 polyfill 的安装时机

2、影响范围 (描述该需求上线会影响什么功能)

  • phontomjs 环境
  • 低端机需要回归

3、自测 Checklist

  • phontomjs 环境已自测

4、需要覆盖的场景和 Case

  • 是否覆盖了 sf 打开 MIP 页
  • 是否验证了极速服务 MIP 页面效果

5、自测机型和浏览器

  • 是否覆盖了 iOS 系统手机
  • 是否覆盖了 Android 系统手机
  • 是否覆盖了 iPhone 版式浏览器(比如 QQ、UC、Chrome、Safari、安卓自带浏览器)
  • 是否覆盖了手百

@coveralls
Copy link

coveralls commented Dec 10, 2018

Pull Request Test Coverage Report for Build 738

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage decreased (-0.002%) to 94.813%

Totals Coverage Status
Change from base Build 734: -0.002%
Covered Lines: 3556
Relevant Lines: 3673

💛 - Coveralls

@zoumiaojiang
Copy link
Contributor Author

phantomjs 环境测试步骤:

1、安装 phantomjs

brew install phantomjs

2、保存 https://github.com/ariya/phantomjs/blob/master/examples/rasterize.js 文件到本地的 rasterize.js

3、在文件最后添加如下代码:

page.onResourceRequested = function (requestData, networkRequest) {
  if (~requestData.url.indexOf('mip.js')) {
    // changeUrl 方法的参数 URL 为测试环境的 mip.js
    return networkRequest.changeUrl('http://bos.nj.bpc.baidu.com/v1/assets/mip/projects/mip.js?v=' + Date.now())
  }
}

4、执行如下命令查看图片截图结果:

# url 为指定测试的 mip 页面
phantomjs rasterize.js https://www.mipengine.org/doc/00-mip-101.html aaa.png

5、如果图片 aaa.png 正确显示截图表示测试 OK

@zoumiaojiang zoumiaojiang changed the title 调整 mipComponentsPolyfill 安装时机以修复 phontomjs 环境报错 调整 mipComponentsPolyfill 安装时机以修复 phantomjs 环境报错 Dec 10, 2018
@PengXing PengXing merged commit d87f7c6 into dev Dec 10, 2018
@yenshih yenshih deleted the dev-402-bugfix branch December 25, 2018 07:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants