async def test_workspace_button_shared_with(qtbot, workspace_fs, client_config,
                                            bob, alice_user_info,
                                            bob_user_info):
    switch_language(client_config, "en")

    roles = {
        bob.user_id: (WorkspaceRole.READER, bob_user_info),
        alice_user_info.user_id: (WorkspaceRole.OWNER, alice_user_info),
    }
    w = WorkspaceButton(
        workspace_name="Workspace",
        workspace_fs=workspace_fs,
        users_roles=roles,
        is_mounted=True,
        files=[],
    )

    qtbot.addWidget(w)
    w.show()
    assert w.widget_empty.isVisible() is True
    assert w.label_owner.isVisible() is True
    assert w.label_shared.isVisible() is True
    assert w.name == "Workspace"
    assert w.label_title.text().startswith("Workspace")
    assert w.label_title.toolTip() == "Workspace (shared with Boby McBobFace)"
    assert w.label_role.text() == _("TEXT_WORKSPACE_ROLE_OWNER")
async def test_workspace_button_files(qtbot, workspace_fs, client_config,
                                      alice_user_info):
    switch_language(client_config, "en")

    roles = {alice_user_info.user_id: (WorkspaceRole.OWNER, alice_user_info)}
    w = WorkspaceButton(
        workspace_name="Workspace",
        workspace_fs=workspace_fs,
        users_roles=roles,
        is_mounted=True,
        files=[],
    )

    qtbot.addWidget(w)
    w.show()
    assert w.widget_empty.isVisible() is True
    assert w.label_owner.isVisible() is True
    assert w.label_shared.isVisible() is False
    assert w.name == "Workspace"