Skip to content
Snippets Groups Projects
Commit 08585f23 authored by Lily Yan's avatar Lily Yan
Browse files

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

parent 260fc52b
No related branches found
No related tags found
2 merge requests!433ISTWCMS-6296 Create test for all event dates test cases,!172ISTWCMS-4919-ISTWCMS-4920 Sort by date field desc instead of asc
......@@ -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]);
}
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment