MDL-44613 core_message: Update datetime format usages to strftime

Updates all existing datetime format usages to strftime in the
'time to timestamp' transformation in core_message behat tests.
This commit is contained in:
Mihail Geshoski
2021-03-15 08:26:17 +08:00
parent 3bc58c98d0
commit 70ae4664e6
5 changed files with 20 additions and 20 deletions
+6 -6
View File
@@ -57,7 +57,7 @@ Feature: Delete messages from conversations
And I click on "//button[@data-action='confirm-delete-selected-messages']" "xpath_element"
Then I should not see "Delete"
And I should not see "Hi!"
And I should see "##today##j F##" in the "Group 1" "core_message > Message conversation"
And I should see "##today##%d %B##" in the "Group 1" "core_message > Message conversation"
And I should see "How are you?" in the "Group 1" "core_message > Message conversation"
And I should see "Can somebody help me?" in the "Group 1" "core_message > Message conversation"
And I should not see "Messages selected"
@@ -78,7 +78,7 @@ Feature: Delete messages from conversations
And I click on "//button[@data-action='confirm-delete-selected-messages']" "xpath_element"
Then I should not see "Delete"
And I should not see "Hi!"
And I should see "##today##j F##" in the "Group 1" "core_message > Message conversation"
And I should see "##today##%d %B##" in the "Group 1" "core_message > Message conversation"
And I should not see "How are you?" in the "Group 1" "core_message > Message conversation"
And I should see "Can somebody help me?" in the "Group 1" "core_message > Message conversation"
And I should not see "Messages selected"
@@ -124,7 +124,7 @@ Feature: Delete messages from conversations
And I click on "//button[@data-action='confirm-delete-selected-messages']" "xpath_element"
Then I should not see "Delete"
And I should not see "Hi!"
And I should see "##today##j F##" in the "Student 2" "core_message > Message conversation"
And I should see "##today##%d %B##" in the "Student 2" "core_message > Message conversation"
And I should see "Hello!" in the "Student 2" "core_message > Message conversation"
And I should see "Are you free?" in the "Student 2" "core_message > Message conversation"
And I should not see "Messages selected"
@@ -148,7 +148,7 @@ Feature: Delete messages from conversations
Then I should not see "Delete"
And I should not see "Hi!"
And I should not see "Hello!" in the "Student 2" "core_message > Message conversation"
And I should see "##today##j F##" in the "Student 2" "core_message > Message conversation"
And I should see "##today##%d %B##" in the "Student 2" "core_message > Message conversation"
And I should see "Are you free?" in the "Student 2" "core_message > Message conversation"
And I should not see "Messages selected"
# Check messages were not deleted for the other user
@@ -197,7 +197,7 @@ Feature: Delete messages from conversations
And I click on "//button[@data-action='confirm-delete-selected-messages']" "xpath_element"
Then I should not see "Delete"
And I should not see "Hi!"
And I should see "##today##j F##" in the "Student 2" "core_message > Message conversation"
And I should see "##today##%d %B##" in the "Student 2" "core_message > Message conversation"
And I should see "Hello!" in the "Student 2" "core_message > Message conversation"
And I should not see "Messages selected"
@@ -221,7 +221,7 @@ Feature: Delete messages from conversations
Then I should not see "Delete"
And I should not see "Hi!"
And I should not see "Hello!" in the "Student 2" "core_message > Message conversation"
And I should see "##today##j F##" in the "Student 2" "core_message > Message conversation"
And I should see "##today##%d %B##" in the "Student 2" "core_message > Message conversation"
And I should see "Are you free?" in the "Student 2" "core_message > Message conversation"
And I should not see "Messages selected"
@@ -37,7 +37,7 @@ Feature: Message delete conversations
And I should not see "Delete"
And I should not see "Hi!" in the "Student 1" "core_message > Message conversation"
And I should not see "What do you need?" in the "Student 1" "core_message > Message conversation"
And I should not see "##today##j F##" in the "Student 1" "core_message > Message conversation"
And I should not see "##today##%d %B##" in the "Student 1" "core_message > Message conversation"
# Check user is deleting private conversation only for them
And I log out
And I log in as "student1"
@@ -45,7 +45,7 @@ Feature: Message delete conversations
And I select "Student 2" conversation in the "messages" conversations list
And I should see "Hi!" in the "Student 2" "core_message > Message conversation"
And I should see "What do you need?" in the "Student 2" "core_message > Message conversation"
And I should see "##today##j F##" in the "Student 2" "core_message > Message conversation"
And I should see "##today##%d %B##" in the "Student 2" "core_message > Message conversation"
Scenario: Cancel deleting a private conversation
Given I log in as "student1"
@@ -58,7 +58,7 @@ Feature: Message delete conversations
And I click on "//button[@data-action='cancel-confirm']" "xpath_element"
And I should not see "Cancel"
And I should see "Hi!" in the "Student 2" "core_message > Message conversation"
And I should see "##today##j F##" in the "Student 2" "core_message > Message conversation"
And I should see "##today##%d %B##" in the "Student 2" "core_message > Message conversation"
Scenario: Delete a starred conversation
Given the following "favourite conversations" exist:
@@ -75,7 +75,7 @@ Feature: Message delete conversations
And I should not see "Delete"
And I should not see "Hi!" in the "Student 2" "core_message > Message conversation"
And I should not see "What do you need?" in the "Student 2" "core_message > Message conversation"
And I should not see "##today##j F##" in the "Student 2" "core_message > Message conversation"
And I should not see "##today##%d %B##" in the "Student 2" "core_message > Message conversation"
# Check user is deleting private conversation only for them
And I log out
And I log in as "student2"
@@ -83,7 +83,7 @@ Feature: Message delete conversations
And I select "Student 1" conversation in the "messages" conversations list
And I should see "Hi!" in the "Student 1" "core_message > Message conversation"
And I should see "What do you need?" in the "Student 1" "core_message > Message conversation"
And I should see "##today##j F##" in the "Student 1" "core_message > Message conversation"
And I should see "##today##%d %B##" in the "Student 1" "core_message > Message conversation"
Scenario: Cancel deleting a starred conversation
Given the following "favourite conversations" exist:
@@ -93,7 +93,7 @@ Feature: Message delete conversations
And I open messaging
And I select "Student 2" conversation in the "favourites" conversations list
Then I should see "Hi!" in the "Student 2" "core_message > Message conversation"
And I should see "##today##j F##" in the "Student 2" "core_message > Message conversation"
And I should see "##today##%d %B##" in the "Student 2" "core_message > Message conversation"
And I open contact menu
And I click on "Delete conversation" "link" in the "//div[@data-region='header-container']" "xpath_element"
# Cancel deletion, so conversation should be there
@@ -101,7 +101,7 @@ Feature: Message delete conversations
And I click on "//button[@data-action='cancel-confirm']" "xpath_element"
And I should not see "Cancel"
And I should see "Hi!" in the "Student 2" "core_message > Message conversation"
And I should see "##today##j F##" in the "Student 2" "core_message > Message conversation"
And I should see "##today##%d %B##" in the "Student 2" "core_message > Message conversation"
Scenario: Check a deleted starred conversation is still starred
Given the following "favourite conversations" exist:
@@ -35,7 +35,7 @@ Feature: Message send messages
And I select "Group 1" conversation in messaging
When I send "Hi!" message in the message area
Then I should see "Hi!" in the "Group 1" "core_message > Message conversation"
And I should see "##today##j F##" in the "Group 1" "core_message > Message conversation"
And I should see "##today##%d %B##" in the "Group 1" "core_message > Message conversation"
And I log out
And I log in as "student2"
And I open messaging
@@ -57,7 +57,7 @@ Feature: Message send messages
And I select "Group 1" conversation in the "favourites" conversations list
And I send "Hi!" message in the message area
And I should see "Hi!" in the "Group 1" "core_message > Message conversation"
And I should see "##today##j F##" in the "Group 1" "core_message > Message conversation"
And I should see "##today##%d %B##" in the "Group 1" "core_message > Message conversation"
And I go back in "view-conversation" message drawer
And I open the "Group" conversations list
And I should not see "Group 1" in the "Group" "core_message > Message tab"
@@ -72,14 +72,14 @@ Feature: Message send messages
And I click on "Student 2" "link" in the "//*[@data-section='contacts']" "xpath_element"
When I send "Hi!" message in the message area
Then I should see "Hi!" in the "Student 2" "core_message > Message conversation"
And I should see "##today##j F##" in the "Student 2" "core_message > Message conversation"
And I should see "##today##%d %B##" in the "Student 2" "core_message > Message conversation"
Scenario: Try to send a message to a private conversation is not contact but you are allowed to send a message
Given I log in as "student1"
And I open messaging
When I send "Hi!" message to "Student 2" user
Then I should see "Hi!" in the "Student 2" "core_message > Message conversation"
And I should see "##today##j F##" in the "Student 2" "core_message > Message conversation"
And I should see "##today##%d %B##" in the "Student 2" "core_message > Message conversation"
And I log out
And I log in as "student2"
And I open messaging
@@ -55,7 +55,7 @@ Feature: Self conversation
And I select "Student 1" conversation in messaging
And I send "Hi!" message in the message area
And I should see "Hi!" in the "Student 1" "core_message > Message conversation"
And I should see "##today##j F##" in the "Student 1" "core_message > Message conversation"
And I should see "##today##%d %B##" in the "Student 1" "core_message > Message conversation"
Scenario: Send a message to a self-conversation via user profile
Given I log in as "student1"
@@ -64,4 +64,4 @@ Feature: Self conversation
And I click on "Message" "icon"
And I send "Hi!" message in the message area
And I should see "Hi!" in the "Student 1" "core_message > Message conversation"
And I should see "##today##j F##" in the "Student 1" "core_message > Message conversation"
And I should see "##today##%d %B##" in the "Student 1" "core_message > Message conversation"
+1 -1
View File
@@ -35,7 +35,7 @@ Feature: Unread messages
And I select "New group" conversation in messaging
And I send "Hi!" message in the message area
And I should see "Hi!" in the "New group" "core_message > Message conversation"
And I should see "##today##j F##" in the "New group" "core_message > Message conversation"
And I should see "##today##%d %B##" in the "New group" "core_message > Message conversation"
And I log out
And I log in as "student2"
And I should see "1" in the "//*[@title='Toggle messaging drawer']/../*[@data-region='count-container']" "xpath_element"