Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
…into DanishM/itwinui3_x
  • Loading branch information
DanishMehmood-bit committed Nov 30, 2023
2 parents c62d28b + 77e9241 commit 84582b3
Show file tree
Hide file tree
Showing 16 changed files with 447 additions and 132 deletions.
2 changes: 1 addition & 1 deletion packages/apps/storybook/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"@itwin/delete-itwin-react": "^1.0.0",
"@itwin/imodel-browser-react": "~1.1.1",
"@itwin/itwinui-react": "^3.0.4",
"@itwin/manage-versions-react": "~1.1.0",
"@itwin/manage-versions-react": "~1.2.0",
"@itwin/storybook-auth-addon": "^0.1.0",
"@storybook/addon-actions": "^6.2.5",
"@storybook/addon-essentials": "^6.2.5",
Expand Down
12 changes: 12 additions & 0 deletions packages/modules/manage-versions/CHANGELOG.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,18 @@
{
"name": "@itwin/manage-versions-react",
"entries": [
{
"version": "1.2.0",
"tag": "@itwin/manage-versions-react_v1.2.0",
"date": "Thu, 30 Nov 2023 12:17:00 GMT",
"comments": {
"minor": [
{
"comment": "Show included changesets in Named versions table on expand rows"
}
]
}
},
{
"version": "1.1.0",
"tag": "@itwin/manage-versions-react_v1.1.0",
Expand Down
9 changes: 8 additions & 1 deletion packages/modules/manage-versions/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
# Change Log - @itwin/manage-versions-react

This log was last generated on Thu, 16 Nov 2023 11:52:43 GMT and should not be manually modified.
This log was last generated on Thu, 30 Nov 2023 12:17:00 GMT and should not be manually modified.

## 1.2.0
Thu, 30 Nov 2023 12:17:00 GMT

### Minor changes

- Show included changesets in Named versions table on expand rows

## 1.1.0
Thu, 16 Nov 2023 11:52:43 GMT
Expand Down
2 changes: 1 addition & 1 deletion packages/modules/manage-versions/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "@itwin/manage-versions-react",
"description": "Components that allow a user to manage Named Versions and Changesets.",
"repository": "https://github.com/iTwin/admin-components-react/tree/main/packages/modules/manage-versions",
"version": "1.1.0",
"version": "1.2.0",
"main": "cjs/index.js",
"module": "esm/index.js",
"types": "cjs/index.d.ts",
Expand Down
5 changes: 4 additions & 1 deletion packages/modules/manage-versions/src/clients/urlBuilder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,13 @@ export class UrlBuilder {
skip?: number;
top?: number;
orderBy?: string;
lastIndex?: number;
}) => {
const query = Object.entries(params)
.filter(([key, value]) => !!value)
.map(([key, value]) => `$${key}=${value}`)
.map(([key, value]) =>
key === "lastIndex" ? `${key}=${value}` : `$${key}=${value}`
)
.join("&");
return query ? `?${query}` : "";
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,9 @@ describe("ChangesTab", () => {
rows.forEach((row, index) => {
const cells = row.querySelectorAll("._iui3-table-cell");
expect(cells.length).toBe(6);
expect(cells[0].textContent).toContain(MockedChangeset(index).index);
expect(cells[0].textContent).toContain(
MockedChangeset(index).index.toString()
);
expect(cells[1].textContent).toContain(
MockedChangeset(index).description
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ describe("ManageVersions", () => {
expect(cells.length).toBe(5);
expect(cells[0].textContent).toContain(MockedVersion(index).name);
expect(cells[1].textContent).toContain(MockedVersion(index).description);

expect(cells[2].textContent).toContain(MockedVersion(index).createdBy);
expect(cells[3].textContent).toContain(
new Date(MockedVersion(index).createdDateTime).toLocaleString()
Expand Down Expand Up @@ -105,7 +106,9 @@ describe("ManageVersions", () => {
changesetRows.forEach((row, index) => {
const cells = row.querySelectorAll("._iui3-table-cell");
expect(cells.length).toBe(6);
expect(cells[0].textContent).toContain(MockedChangeset(index).index);
expect(cells[0].textContent).toContain(
MockedChangeset(index).index.toString()
);
expect(cells[1].textContent).toContain(
MockedChangeset(index).description
);
Expand Down Expand Up @@ -322,7 +325,9 @@ it("should render with changesets tab opened", async () => {
changesetRows.forEach((row, index) => {
const cells = row.querySelectorAll("._iui3-table-cell");
expect(cells.length).toBe(6);
expect(cells[0].textContent).toContain(MockedChangeset(index).index);
expect(cells[0].textContent).toContain(
MockedChangeset(index).index.toString()
);
expect(cells[1].textContent).toContain(MockedChangeset(index).description);
expect(cells[2].textContent).toContain(MockedChangeset(index).createdBy);
expect(cells[3].textContent).toContain(
Expand Down
Loading

0 comments on commit 84582b3

Please sign in to comment.