These are chat archives for cucumber/cucumber-ruby

31st
Oct 2016
Brian Colfer
@bcolferzd
Oct 31 2016 21:03
I want to test a rails application that has two factor authentication. Is there a way to pause the Scenario, wait for input and enter the TFA code?
Eric Kessler
@enkessler
Oct 31 2016 22:04
@bcolferzd Not through any Cucumber mechanism, no. However, you can write whatever Ruby code inside of a step definition that you want in order to make it wait on something.
Brian Colfer
@bcolferzd
Oct 31 2016 22:06
@enkessler I think I understand how to make a step wait … aruba has a similar mechanism. The alternative is to configure the rails app with dotenv or figaro and set the bypass password in a non-commited file ...
Asma Sikandar Khan
@AsmaSikandarKhn_twitter
Oct 31 2016 22:59
Hi! I am trying to establish an acceptance criteria for a test case that matches their checksum. But, since the checksums change everytime, it cannot be a god measure of acceptance. What can be done to workaround having different checksums everytime?
Brian Colfer
@bcolferzd
Oct 31 2016 23:05
@AsmaSikandarKhn_twitter what are you trying to test? That the files contents are what you expect?
Asma Sikandar Khan
@AsmaSikandarKhn_twitter
Oct 31 2016 23:10
I understand that md5 checksum would change for the same file as it is depended on the timestamp in the metadata. Testing a thick client app to make sure conversion of a file is correct by comparing the pre-saved checksum with the run-time calculated checksum. But they are understandably different because the difference in Metadata. Is there a workaround for this?
Brian Colfer
@bcolferzd
Oct 31 2016 23:14
echo foo > foo.txt
md5 foo.txt
MD5 (foo.txt) = d3b07384d113edec49eaa6238ad5ff00
rm foo.txt
echo foo > foo.txt
md5 foo.txt
MD5 (foo.txt) = d3b07384d113edec49eaa6238ad5ff00
@AsmaSikandarKhn_twitter the md5 command looks only at the contents of the file not the metadata
Asma Sikandar Khan
@AsmaSikandarKhn_twitter
Oct 31 2016 23:25
Digest::MD5.hexdigest(File.read("File location")
This is what I have been using to get the checksum
Brian Colfer
@bcolferzd
Oct 31 2016 23:52
@AsmaSikandarKhn_twitter
But are you testing the contents of the file or the digest function?