Commit 53c325d6 authored by Kevin Paxman's avatar Kevin Paxman
Browse files

Merge branch 'feature/ISTWCMS-4919-ISTWCMS-4920-l26yan-Sort-by-date-field-desc' into '3.0.x'

ISTWCMS-4919-ISTWCMS-4920 Sort by date field desc instead of asc

See merge request !172
parents 260fc52b 08585f23
......@@ -412,6 +412,12 @@ class UwWcmsBasicTest extends BrowserTestBase {
'2021-07-01',
];
$expected_date_fields = [
'2021-08-01',
'2021-07-01',
'2021-06-01',
];
$page_views = [
'events',
'blog',
......@@ -431,7 +437,12 @@ class UwWcmsBasicTest extends BrowserTestBase {
// Get the actual date from the text above.
foreach ($rows as $key => $row) {
preg_match("/\d{4}\-\d{2}-\d{2}/", $row->getText(), $matches);
$this->assertEqual($matches[0], $expected_dates[$key]);
if ($view == 'events') {
$this->assertEqual($matches[0], $expected_dates[$key]);
}
else {
$this->assertEqual($matches[0], $expected_date_fields[$key]);
}
}
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment