Skip to content

Commit

Permalink
test: update message list test to use correct items format (#8243)
Browse files Browse the repository at this point in the history
  • Loading branch information
web-padawan authored Nov 29, 2024
1 parent 276cce9 commit 0430bb1
Showing 1 changed file with 33 additions and 48 deletions.
81 changes: 33 additions & 48 deletions packages/message-list/test/message-list.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,35 +23,34 @@ describe('message-list', () => {
root.style.setProperty('--vaadin-user-color-2', 'blue');

messageList = fixtureSync('<vaadin-message-list></vaadin-message-list>');

// Transparent 1px gif
const img = 'data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7';
messages = [
{
text: 'A message in the stream of messages',
time: '9:34 AM',
userName: 'Joan Doe',
userAbbr: 'JD',
userImg: 'data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs=',
userImg: img,
userColorIndex: 1,
theme: 'fancy',
},
{
text: 'A message in the stream of messages',
time: '9:35 AM',
user: {
name: 'Joan Doe',
abbr: 'JD',
img: 'data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs=',
colorIndex: 1,
},
userName: 'Joan Doe',
userAbbr: 'JD',
userImg: img,
userColorIndex: 1,
},
{
text: 'A message in the stream of messages',
time: '9:36 AM',
user: {
name: 'Joan Doe',
abbr: 'JD',
img: 'data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs=',
colorIndex: 1,
},
userName: 'Joan Doe',
userAbbr: 'JD',
userImg: img,
userColorIndex: 1,
},
{
text: 'Call upon the times of glory',
Expand Down Expand Up @@ -169,11 +168,9 @@ describe('message-list', () => {
{
text: 'A new message arrives!',
time: '2:35 PM',
user: {
name: 'Steve Mops',
abbr: 'SM',
colorIndex: 2,
},
userName: 'Steve Mops',
userAbbr: 'SM',
userColorIndex: 2,
},
];
await nextRender(messageList);
Expand All @@ -187,11 +184,9 @@ describe('message-list', () => {
{
text: 'A new message arrives!',
time: '2:35 PM',
user: {
name: 'Steve Mops',
abbr: 'SM',
colorIndex: 2,
},
userName: 'Steve Mops',
userAbbr: 'SM',
userColorIndex: 2,
},
];
await nextRender(messageList);
Expand All @@ -214,20 +209,16 @@ describe('message-list', () => {
{
text: 'This is a new list',
time: '2:35 PM',
user: {
name: 'Steve Mops',
abbr: 'SM',
colorIndex: 2,
},
userName: 'Steve Mops',
userAbbr: 'SM',
userColorIndex: 2,
},
{
text: 'With two items',
time: '2:35 PM',
user: {
name: 'Steve Mops',
abbr: 'SM',
colorIndex: 2,
},
userName: 'Steve Mops',
userAbbr: 'SM',
userColorIndex: 2,
},
];
await nextRender(messageList);
Expand All @@ -245,11 +236,9 @@ describe('message-list', () => {
{
text: 'A new message arrives!',
time: '2:35 PM',
user: {
name: 'Steve Mops',
abbr: 'SM',
colorIndex: 2,
},
userName: 'Steve Mops',
userAbbr: 'SM',
userColorIndex: 2,
},
];
await nextRender(messageList);
Expand All @@ -269,20 +258,16 @@ describe('message-list', () => {
{
text: 'This is a new list',
time: '2:35 PM',
user: {
name: 'Steve Mops',
abbr: 'SM',
colorIndex: 2,
},
userName: 'Steve Mops',
userAbbr: 'SM',
userColorIndex: 2,
},
{
text: 'With two items',
time: '2:35 PM',
user: {
name: 'Steve Mops',
abbr: 'SM',
colorIndex: 2,
},
userName: 'Steve Mops',
userAbbr: 'SM',
userColorIndex: 2,
},
];

Expand Down

0 comments on commit 0430bb1

Please sign in to comment.