mirror of
https://github.com/vector-im/hydrogen-web.git
synced 2024-12-23 03:25:12 +01:00
Merge pull request #773 from vector-im/madlittlemods/consistent-test-selector
Add a couple consistent selectors to reference in tests
This commit is contained in:
commit
ff2129f36a
@ -31,7 +31,7 @@ export function renderStaticAvatar(vm, size, extraClasses = undefined) {
|
||||
avatarClasses += ` ${extraClasses}`;
|
||||
}
|
||||
const avatarContent = hasAvatar ? renderImg(vm, size) : text(vm.avatarLetter);
|
||||
const avatar = tag.div({className: avatarClasses}, [avatarContent]);
|
||||
const avatar = tag.div({className: avatarClasses, "data-testid": "avatar"}, [avatarContent]);
|
||||
if (hasAvatar) {
|
||||
setAttribute(avatar, "data-avatar-letter", vm.avatarLetter);
|
||||
setAttribute(avatar, "data-avatar-color", vm.avatarColorNumber);
|
||||
|
@ -53,7 +53,7 @@ export class BaseMediaView extends BaseMessageView {
|
||||
children.push(progress);
|
||||
}
|
||||
return t.div({className: "Timeline_messageBody"}, [
|
||||
t.div({className: "media", style: `max-width: ${vm.width}px`}, children),
|
||||
t.div({className: "media", style: `max-width: ${vm.width}px`, "data-testid": "media"}, children),
|
||||
t.if(vm => vm.error, t => t.p({className: "error"}, vm.error))
|
||||
]);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user