Skip to content

Commit

Permalink
Remove duplicate property
Browse files Browse the repository at this point in the history
  • Loading branch information
SmitaNachan committed Aug 11, 2024
1 parent e16d09c commit c961a32
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 28 deletions.
9 changes: 3 additions & 6 deletions docs/docs/cmd/teams/tab/tab-list.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,7 @@ m365 teams tab list --teamId 00000000-0000-0000-0000-000000000000 --channelId 19
"externalId": null,
"displayName": "My Contoso Tab",
"distributionMethod": "store"
},
"teamsAppTabId": "1542629c-01b3-4a6d-8f76-1938b779e48d"
}
}
]
```
Expand All @@ -79,15 +78,14 @@ m365 teams tab list --teamId 00000000-0000-0000-0000-000000000000 --channelId 19
``` text
displayName : My Contoso Tab
id : 34991fbf-59f4-48d9-b094-b9d64d550e23
teamsAppTabId: 1542629c-01b3-4a6d-8f76-1938b779e48d
```

</TabItem>
<TabItem value="CSV">

``` text
id,displayName,teamsAppTabId
34991fbf-59f4-48d9-b094-b9d64d550e23,My Contoso Tab,1542629c-01b3-4a6d-8f76-1938b779e48d
id,displayName
34991fbf-59f4-48d9-b094-b9d64d550e23,My Contoso Tab
```

</TabItem>
Expand All @@ -105,7 +103,6 @@ m365 teams tab list --teamId 00000000-0000-0000-0000-000000000000 --channelId 19
id | 34991fbf-59f4-48d9-b094-b9d64d550e23
displayName | My Contoso Tab
webUrl | https://teams.microsoft.com/l/entity/1542629c-01b3-4a6d-8f76-1938b779e48d/_djb2_msteams_prefix_34991fbf-59f4-48d9-b094-b9d64d550e23?webUrl=https%3a%2f%2fteams.contoso.ai%2fmsteams%2fcontent%2ftab%2fteam%3ftheme%3d%7btheme%7d&label=My%20Contoso%20Tab&context=%7b%0d%0a++%22canvasUrl%22%3a+%22https%3a%2f%2fteams.contoso.ai%2fmsteams%2fcontent%2ftab%2fteam%3ftheme%3d%7btheme%7d%22%2c%0d%0a++%22channelId%22%3a+%2219%3aB3nCnLKwwCoGDEADyUgQ5kJ5Pkekujyjmwxp7uhQeAE1%40thread.tacv2%22%2c%0d%0a++%22subEntityId%22%3a+null%0d%0a%7d&groupId=aee5a2c9-b1df-45ac-9964-c708e760a045&tenantId=92e59666-257b-49c3-b1fa-1bae8107f6ba
teamsAppTabId | 1542629c-01b3-4a6d-8f76-1938b779e48d
```

</TabItem>
Expand Down
26 changes: 9 additions & 17 deletions src/m365/teams/commands/tab/tab-list.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ describe(commands.TAB_LIST, () => {
});

it('defines correct properties for the default output', () => {
assert.deepStrictEqual(command.defaultProperties(), ['id', 'displayName', 'teamsAppTabId']);
assert.deepStrictEqual(command.defaultProperties(), ['id', 'displayName']);
});

it('fails validation for a incorrect channelId missing leading 19:.', async () => {
Expand Down Expand Up @@ -193,8 +193,7 @@ describe(commands.TAB_LIST, () => {
"externalId": null,
"displayName": "Document Library",
"distributionMethod": "store"
},
"teamsAppTabId": "com.microsoft.teamspace.tab.files.sharepoint"
}
},
{
"id": "ba38f554-9ce6-4719-bc9b-e38e4ca16860",
Expand All @@ -212,8 +211,7 @@ describe(commands.TAB_LIST, () => {
"externalId": null,
"displayName": "Website",
"distributionMethod": "store"
},
"teamsAppTabId": "com.microsoft.teamspace.tab.web"
}
},
{
"id": "b6c511f1-3ad7-4111-8a82-36b13aad4c9e",
Expand All @@ -230,8 +228,7 @@ describe(commands.TAB_LIST, () => {
"externalId": null,
"displayName": "Word",
"distributionMethod": "store"
},
"teamsAppTabId": "com.microsoft.teamspace.tab.file.staticviewer.word"
}
},
{
"id": "d9e972d8-e93d-4b87-beb2-3698912398ea",
Expand All @@ -251,8 +248,7 @@ describe(commands.TAB_LIST, () => {
"externalId": null,
"displayName": "Wiki",
"distributionMethod": "store"
},
"teamsAppTabId": "com.microsoft.teamspace.tab.wiki"
}
}]));
});

Expand Down Expand Up @@ -282,8 +278,7 @@ describe(commands.TAB_LIST, () => {
"externalId": null,
"displayName": "Document Library",
"distributionMethod": "store"
},
"teamsAppTabId": "com.microsoft.teamspace.tab.files.sharepoint"
}
},
{
"id": "ba38f554-9ce6-4719-bc9b-e38e4ca16860",
Expand All @@ -301,8 +296,7 @@ describe(commands.TAB_LIST, () => {
"externalId": null,
"displayName": "Website",
"distributionMethod": "store"
},
"teamsAppTabId": "com.microsoft.teamspace.tab.web"
}
},
{
"id": "b6c511f1-3ad7-4111-8a82-36b13aad4c9e",
Expand All @@ -319,8 +313,7 @@ describe(commands.TAB_LIST, () => {
"externalId": null,
"displayName": "Word",
"distributionMethod": "store"
},
"teamsAppTabId": "com.microsoft.teamspace.tab.file.staticviewer.word"
}
},
{
"id": "d9e972d8-e93d-4b87-beb2-3698912398ea",
Expand All @@ -340,8 +333,7 @@ describe(commands.TAB_LIST, () => {
"externalId": null,
"displayName": "Wiki",
"distributionMethod": "store"
},
"teamsAppTabId": "com.microsoft.teamspace.tab.wiki"
}
}]));
});
});
6 changes: 1 addition & 5 deletions src/m365/teams/commands/tab/tab-list.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ class TeamsTabListCommand extends GraphCommand {
}

public defaultProperties(): string[] | undefined {
return ['id', 'displayName', 'teamsAppTabId'];
return ['id', 'displayName'];
}

constructor() {
Expand Down Expand Up @@ -68,10 +68,6 @@ class TeamsTabListCommand extends GraphCommand {

try {
const items = await odata.getAllItems<TeamsTab>(endpoint);
items.forEach(i => {
(i as any).teamsAppTabId = i.teamsApp!.id;
});

await logger.log(items);
}
catch (err: any) {
Expand Down

0 comments on commit c961a32

Please sign in to comment.