Page MenuHomePhabricator

Add timestamp function to wdio-mediawiki
Closed, ResolvedPublic

Description

Two tasks (T214686: selenium-daily-beta Jenkins jobs should have junit publisher and T280970: Add timestamp to screenshot file name) need a timestamp in file name.

It's currently implemented as a simple constant, but it's duplicated in two files, 683294/1/tests/selenium/wdio.conf.js and 682665/6/tests/selenium/wdio-mediawiki/index.js.

const ISOString = new Date().toISOString().replace( /[:.]/g, '-' );

To reduce duplication, it would make sense to create a simple function in wdio-mediawiki.

Event Timeline

Change 683350 had a related patch set uploaded (by Zfilipin; author: Zfilipin):

[mediawiki/core@master] selenium: File name friendly version of ISO 8601 date and time

https://gerrit.wikimedia.org/r/683350

Change 683350 merged by jenkins-bot:

[mediawiki/core@master] selenium: File name friendly version of ISO 8601 date and time

https://gerrit.wikimedia.org/r/683350