<div class="bl">
<div class="element">
//your content
</div>
`</div>`
css
.bl{
display:inline-block;
align-items: center;
justify-content: center;
height: 400px;
width: 100%;
}
.element{
vertical-align:top/middle;
width:40px;
}
我想用额外的参数
创建相同的定义为Admin用户提供电子邮件和角色以及删除表
尝试编写此灯具
Given Admin user with email and role:
所以如果不存在parametar,默认情况下会为false,但如果我们在定义drop table中,则应该是drop_tables =&gt; true
Given(/^Admin user with email and role(?: and drop table (.*)):$/) do |table, drop|
add_location :drop_tables => drop || false
table.hashes.each_with_index do |value, key|
value[:"Postal Code"] ||= nil
add_admin_user :role_name => value[:"Role"], :admin_email => value[:"Email"]
end
clear_memcache
end
答案 0 :(得分:0)
我认为你要求的是
Given(/^Admin user with email and role( and drop table)?:$/) do |drop,table|
add_location :drop_tables => !!drop
table.hashes.each_with_index do |value, key|
value[:"Postal Code"] ||= nil
add_admin_user :role_name => value[:"Role"], :admin_email => value[:"Email"]
end
clear_memcache
end
如果&#34;那将设置drop_tables: true
和放桌&#34;使用了文字和&#39; drop_table:false&#39;如果它不是