augustash/backstop-js 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

augustash/backstop-js

最新稳定版本:1.0.0

Composer 安装命令:

composer require augustash/backstop-js

包简介

AugustAsh BackstopJS VRT setup

README 文档

README

This tool will use a globally installed version of Backstop to run Visual Regression Testing on your machine using a local url and comparing to a live url.

To properly run this tool you will need to ensure you are on Node Version 16 or higher and first install Backstop JS globally. npm install -g backstopjs

Setup and Use

  1. cd into your project root
  2. create a new directory called "tests" - mkdir tests
  3. cd into the new "tests" directory - cd tests
  4. Run backstop init to initialze backstop on this project
  5. Return to the root of your project.
  6. Ensure this package is installed with a composer require augustash/backstop-js
  7. Run composer backstop-setup from the root of your project and input your local and live urls when prompted
  8. cd back to the tests directory - cd tests
  9. Create a reference point for backstop to check against - backstop reference
  10. Run a test on your site once changes are made - backstop test
  11. Review and update anything as needed.

Note that it is a good idea to remove reference and test images before committing anything.

Options

  • When running the composer backstop-setup command you will be prompted for a few input items.
    • The two required options will be your local DDEV url to test with along with the live url to reference.
    • By default the test with run against nodes 1-5, but you will be prompted to pass any additional you may want to test.
    • By default the .captcha is hidden from the tests so it will be rendered with a visibility: hidden option, you can also pass additional items if needed.
    • By default the .eu-cookie-compliance-banner is removed from the tests and these will be removed from the DOM, you can also pass additional items to this as needed.

统计信息

  • 总下载量: 12
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 4
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2024-09-16