allure修改logo和内容标题
2020-12-15 20:09
1431 查看
修改logo
cd /usr/local/Cellar/allure/2.13.7/libexec/config,在allure.yml配置文件中增加- custom-logo-plugin
plugins: - junit-xml-plugin - xunit-xml-plugin - trx-plugin - behaviors-plugin - packages-plugin - screen-diff-plugin - xctest-plugin - jira-plugin - xray-plugin - custom-logo-plugin
cd /usr/local/Cellar/allure/2.13.7/libexec/plugins/custom-logo-plugin/static
vi styles.css
.side-nav__brand { background: url('logo.png') no-repeat left center !important; margin-left: 15px; height: 55px; background-size: contain !important; } .side-nav__brand-text { display: none; }
保存,运行测试脚本,查看报告
2. 修改内容标题
在生成的index.html中增加js代码
<script src="https://code.jquery.com/jquery-3.1.1.min.js"></script> <script> jQuery.fn.wait = function (selector, func, times, interval) { var _times = times || -1, //100次 _interval = interval || 20, //20毫秒每次 _self = this, _selector = selector, //选择器 _iIntervalID; //定时器id if( this.length ){ //如果已经获取到了,就直接执行函数 func && func.call(this); } else { _iIntervalID = setInterval(function() { if(!_times) { //是0就退出 clearInterval(_iIntervalID); } _times <= 0 || _times--; //如果是正数就 -- _self = $(_selector); //再次选择 if( _self.length ) { //判断是否取到 func && func.call(_self); clearInterval(_iIntervalID); } }, _interval); } return this; } function showTime(){ var myDate = new Date; var year = myDate.getFullYear(); //获取当前年 var mon = myDate.getMonth() + 1; //获取当前月 var date = myDate.getDate(); //获取当前日 var h = myDate.getHours();//获取当前小时数(0-23) var m = myDate.getMinutes();//获取当前分钟数(0-59) var s = myDate.getSeconds();//获取当前秒 var time = year + '/' + mon + '/' + date + ' ' + h + ':' + m + ':' + s console.log(time) $('#content > div > div.app__content > div > div:nth-child(1) > div:nth-child(1) > div.widget__body > div > div > div:nth-child(1) > h2').html('自动化测试 ' + time); } $('#content > div > div.app__content > div > div:nth-child(1) > div:nth-child(1) > div.widget__body > div > div > div:nth-child(1) > h2').wait('#content > div > div.app__content > div > div:nth-child(1) > div:nth-child(1) > div.widget__body > div > div > div:nth-child(1) > h2', function(){showTime();}) </script>
相关文章推荐
- DEDE数据库批量修改替换文章标题和内容
- 如何修改pdf文件的标题及内容
- ActionBar 样式详解 -- 样式 主题 简介 Actionbar 的 icon logo 标题 菜单样式修改
- 【Android 应用开发】 ActionBar 样式详解 -- 样式 主题 简介 Actionbar 的 icon logo 标题 菜单样式修改
- 【Android 应用开发】 ActionBar 样式详解 -- 样式 主题 简介 Actionbar 的 icon logo 标题 菜单样式修改
- phpcms_v9内容发布页标题字数限制修改
- Android原生AlertDialog修改标题,内容,按钮颜色,字体大小等
- 【Android 应用开发】 ActionBar 样式详解 -- 样式 主题 简介 Actionbar 的 icon logo 标题 菜单样式修改
- 【Android 应用开发】 ActionBar 样式详解 -- 样式 主题 简介 Actionbar 的 icon logo 标题 菜单样式修改
- asp.net后台修改title值,去除title标题内容前面的空格
- IOS 修改UIAlertController的按钮标题的字体颜色,字号,内容
- DEDE织梦数据库批量修改替换文章标题和内容_诉言网
- 关于LOGO的修改和首页内容的调整
- !!声明:为了方便自己整理和助教检查,因此在最近几天将统一修改部分博客标题重新上传,或对内容做一定调整后再上传一次,以前的博客将删除部分!!
- ActionBar 样式详解 -- 样式 主题 简介 Actionbar 的 icon logo 标题 菜单样式修改
- AlertDialog修改标题、内容、按钮的颜色和字体大小
- sharepoint 2016 学习系列篇(8)-如何修改网站标题以及Logo
- 谣言信息有真有假,但有一些真谣言有人故意修改标题和内容部分词语导致错误的,把其标为假谣言。
- python 3.5 django 笔记(六)修改博客标题与内容
- Android原生AlertDialog修改标题,内容,按钮颜色,字体大小等