forked from mystiq/hydrogen-web
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
2 changed files with 2 additions and 2 deletions
|
@ -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 a new issue