I am trying to process a string with a date in Fitnesse
"2016-06-09T15:20:03.336+01:00 @ Perspective editor; User: admin"
The date part of the string will change on every test run.
My understanding is I can use =~/regex here/ in my results table i.e.
|name|Change String|Status|
|ui-comp/P1 Test Perspective.txt|=~/[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}.[0-9]{3}+01:00 @ Perspective editor; User: admin/|ADDED|
AFAIK the regex is good and should work
Still my test fails with:
=~/[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}.[0-9]{3}+01:00 @ Perspective editor; User: admin/ expected
2016-06-09T15:20:03.336+01:00 @ Perspective editor; User: admin actual
Any ideas what I am doing wrong here ?
The java code simply fetches some table rows via selenium and puts them in a setFixture
@Override
public SetFixture getEventTable() throws Exception {
return new SetFixture(getTableElement('EventTable').getRows('added'));
}
Aucun commentaire:
Enregistrer un commentaire