This repository has been archived by the owner on Sep 11, 2024. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 828
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #10010 from matrix-org/johannes/latest-room-in-space
Ensure room is actually in space hierarchy when resolving its latest version
- Loading branch information
Showing
3 changed files
with
297 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
159 changes: 159 additions & 0 deletions
159
test/components/structures/__snapshots__/SpaceHierarchy-test.tsx.snap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,159 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`SpaceHierarchy <HierarchyLevel /> renders 1`] = ` | ||
<div> | ||
<li | ||
class="mx_SpaceHierarchy_roomTileWrapper" | ||
role="treeitem" | ||
> | ||
<div | ||
class="mx_AccessibleButton mx_SpaceHierarchy_roomTile" | ||
role="button" | ||
tabindex="-1" | ||
> | ||
<div | ||
class="mx_SpaceHierarchy_roomTile_item" | ||
> | ||
<div | ||
class="mx_SpaceHierarchy_roomTile_avatar" | ||
> | ||
<img | ||
alt="" | ||
class="mx_BaseAvatar mx_BaseAvatar_image" | ||
data-testid="avatar-img" | ||
src="http://this.is.a.url/avatar.url/room.png" | ||
style="width: 20px; height: 20px;" | ||
/> | ||
</div> | ||
<div | ||
class="mx_SpaceHierarchy_roomTile_name" | ||
> | ||
Unnamed Room | ||
<div | ||
class="mx_SpaceHierarchy_roomTile_joined" | ||
> | ||
Joined | ||
</div> | ||
</div> | ||
<div | ||
class="mx_SpaceHierarchy_roomTile_info" | ||
> | ||
2 members | ||
· | ||
<span | ||
dir="auto" | ||
/> | ||
</div> | ||
</div> | ||
<div | ||
class="mx_SpaceHierarchy_actions" | ||
> | ||
<div | ||
class="mx_AccessibleButton mx_AccessibleButton_hasKind mx_AccessibleButton_kind_primary_outline" | ||
role="button" | ||
tabindex="-1" | ||
> | ||
View | ||
</div> | ||
<span | ||
class="mx_Checkbox mx_Checkbox_hasKind mx_Checkbox_kind_solid" | ||
> | ||
<input | ||
id="checkbox_abdefghi" | ||
tabindex="-1" | ||
type="checkbox" | ||
/> | ||
<label | ||
for="checkbox_abdefghi" | ||
> | ||
<div | ||
class="mx_Checkbox_background" | ||
> | ||
<div | ||
class="mx_Checkbox_checkmark" | ||
/> | ||
</div> | ||
</label> | ||
</span> | ||
</div> | ||
</div> | ||
</li> | ||
<li | ||
class="mx_SpaceHierarchy_roomTileWrapper" | ||
role="treeitem" | ||
> | ||
<div | ||
class="mx_AccessibleButton mx_SpaceHierarchy_roomTile" | ||
role="button" | ||
tabindex="-1" | ||
> | ||
<div | ||
class="mx_SpaceHierarchy_roomTile_item" | ||
> | ||
<div | ||
class="mx_SpaceHierarchy_roomTile_avatar" | ||
> | ||
<img | ||
alt="" | ||
class="mx_BaseAvatar mx_BaseAvatar_image" | ||
data-testid="avatar-img" | ||
src="http://this.is.a.url/avatar.url/room.png" | ||
style="width: 20px; height: 20px;" | ||
/> | ||
</div> | ||
<div | ||
class="mx_SpaceHierarchy_roomTile_name" | ||
> | ||
Unnamed Room | ||
<div | ||
class="mx_SpaceHierarchy_roomTile_joined" | ||
> | ||
Joined | ||
</div> | ||
</div> | ||
<div | ||
class="mx_SpaceHierarchy_roomTile_info" | ||
> | ||
3 members | ||
· | ||
<span | ||
dir="auto" | ||
/> | ||
</div> | ||
</div> | ||
<div | ||
class="mx_SpaceHierarchy_actions" | ||
> | ||
<div | ||
class="mx_AccessibleButton mx_AccessibleButton_hasKind mx_AccessibleButton_kind_primary_outline" | ||
role="button" | ||
tabindex="-1" | ||
> | ||
View | ||
</div> | ||
<span | ||
class="mx_Checkbox mx_Checkbox_hasKind mx_Checkbox_kind_solid" | ||
> | ||
<input | ||
id="checkbox_abdefghi" | ||
tabindex="-1" | ||
type="checkbox" | ||
/> | ||
<label | ||
for="checkbox_abdefghi" | ||
> | ||
<div | ||
class="mx_Checkbox_background" | ||
> | ||
<div | ||
class="mx_Checkbox_checkmark" | ||
/> | ||
</div> | ||
</label> | ||
</span> | ||
</div> | ||
</div> | ||
</li> | ||
; | ||
</div> | ||
`; |