Add experiment support to gentest
Summary: This diff does two things - Clean up some of the generated code making the files smaller. - Add experiment support to generated tests allowing us to use gentest for things still being experimented with such as more compliant flex-basis behavior. Reviewed By: gkassabli Differential Revision: D4226734 fbshipit-source-id: 2cc1471c21883e8e326f16e7a8bb1a3657acd84b
This commit is contained in:
committed by
Facebook Github Bot
parent
a0d560a24b
commit
22b0fdb3e6
@@ -1,10 +1,17 @@
|
||||
#!/usr/bin/env ruby
|
||||
|
||||
require 'watir-webdriver'
|
||||
require 'fileutils'
|
||||
|
||||
caps = Selenium::WebDriver::Remote::Capabilities.chrome(
|
||||
"loggingPrefs"=>{"browser"=>"ALL", "performance"=>"ALL"})
|
||||
"loggingPrefs"=>{
|
||||
"browser"=>"ALL",
|
||||
"performance"=>"ALL"
|
||||
}
|
||||
)
|
||||
browser = Watir::Browser.new(:chrome, :desired_capabilities => caps)
|
||||
Dir.chdir(File.dirname($0))
|
||||
|
||||
Dir['fixtures/*.html'].each do |file|
|
||||
fixture = File.read(file)
|
||||
name = File.basename(file, '.*')
|
||||
@@ -22,7 +29,7 @@ Dir['fixtures/*.html'].each do |file|
|
||||
|
||||
template = File.open('test-template.html').read
|
||||
f = File.open('test.html', 'w')
|
||||
f.write sprintf(template, ltr_fixture, rtl_fixture, fixture)
|
||||
f.write sprintf(template, name, ltr_fixture, rtl_fixture, fixture)
|
||||
f.close
|
||||
FileUtils.copy('test.html', "#{name}.html") if $DEBUG
|
||||
|
||||
|
Reference in New Issue
Block a user