From a1735bba60bc46bb6d357a4d80e85933e336d577 Mon Sep 17 00:00:00 2001 From: Kotana Sai Date: Mon, 15 Apr 2024 06:03:04 +0000 Subject: [PATCH] Merged PR 543517: [Angular Wrapper]: Update powerbi-client version to 2.23.1 Update powerbi-client version and fix failing unit tests We need to update the tests since we added a check for embedUrl in this [Pull Request 483438](https://dev.azure.com/powerbi/Embedded/_git/powerbi-javascript/pullrequest/483438): JS SDK - embed URL validation --- Angular/powerbi-client-angular/package.json | 2 +- .../powerbi-create-report.component.spec.ts | 4 ++-- .../powerbi-dashboard-embed.component.spec.ts | 14 ++++++------- ...i-paginated-report-embed.component.spec.ts | 18 ++++++++--------- .../powerbi-qna-embed.component.spec.ts | 16 +++++++-------- .../powerbi-report-embed.component.spec.ts | 20 +++++++++---------- .../powerbi-tile-embed.component.spec.ts | 14 ++++++------- .../powerbi-visual-embed.component.spec.ts | 14 ++++++------- 8 files changed, 51 insertions(+), 51 deletions(-) diff --git a/Angular/powerbi-client-angular/package.json b/Angular/powerbi-client-angular/package.json index df09848..f1a5e33 100644 --- a/Angular/powerbi-client-angular/package.json +++ b/Angular/powerbi-client-angular/package.json @@ -28,7 +28,7 @@ "tag": "beta" }, "dependencies": { - "powerbi-client": "^2.22.3", + "powerbi-client": "^2.23.1", "tslib": "^2.1.0" }, "devDependencies": { diff --git a/Angular/powerbi-client-angular/src/components/powerbi-create-report/powerbi-create-report.component.spec.ts b/Angular/powerbi-client-angular/src/components/powerbi-create-report/powerbi-create-report.component.spec.ts index c02d426..6969349 100644 --- a/Angular/powerbi-client-angular/src/components/powerbi-create-report/powerbi-create-report.component.spec.ts +++ b/Angular/powerbi-client-angular/src/components/powerbi-create-report/powerbi-create-report.component.spec.ts @@ -13,7 +13,7 @@ describe('PowerBICreateReportEmbedComponent', () => { let fixture: ComponentFixture; const config: IReportCreateConfiguration = { type: 'create', - embedUrl: 'fakeUrl', + embedUrl: 'https://app.powerbi.com/fakeEmbedUrl', accessToken: 'fakeToken', datasetId: 'fakeId', }; @@ -161,7 +161,7 @@ describe('PowerBICreateReportEmbedComponent', () => { // Embed URL of different create report const newConfig = { ...config, - embedUrl: 'newFakeUrl' + embedUrl: 'https://app.powerbi.com/newFakeEmbedUrl' }; // Act diff --git a/Angular/powerbi-client-angular/src/components/powerbi-dashboard-embed/powerbi-dashboard-embed.component.spec.ts b/Angular/powerbi-client-angular/src/components/powerbi-dashboard-embed/powerbi-dashboard-embed.component.spec.ts index 48e7286..2be6cf2 100644 --- a/Angular/powerbi-client-angular/src/components/powerbi-dashboard-embed/powerbi-dashboard-embed.component.spec.ts +++ b/Angular/powerbi-client-angular/src/components/powerbi-dashboard-embed/powerbi-dashboard-embed.component.spec.ts @@ -101,7 +101,7 @@ describe('PowerBIDashboardEmbedComponent', () => { const config = { type: 'dashboard', id: 'fakeId', - embedUrl: 'fakeUrl', + embedUrl: 'https://app.powerbi.com/fakeEmbedUrl', accessToken: 'fakeToken', }; @@ -120,7 +120,7 @@ describe('PowerBIDashboardEmbedComponent', () => { const config = { type: 'dashboard', id: 'dashboard', - embedUrl: 'fakeUrl', + embedUrl: 'https://app.powerbi.com/fakeEmbedUrl', }; // Act @@ -142,7 +142,7 @@ describe('PowerBIDashboardEmbedComponent', () => { const newConfig = { type: 'dashboard', id: 'fakeId', - embedUrl: 'fakeUrl', + embedUrl: 'https://app.powerbi.com/fakeEmbedUrl', accessToken: 'fakeToken', }; @@ -178,7 +178,7 @@ describe('PowerBIDashboardEmbedComponent', () => { const config = { type: 'dashboard', id: 'fakeId', - embedUrl: 'fakeUrl', + embedUrl: 'https://app.powerbi.com/fakeEmbedUrl', accessToken: 'fakeToken', }; @@ -188,7 +188,7 @@ describe('PowerBIDashboardEmbedComponent', () => { fixture.detectChanges(); // Embed URL of different dashboard - config.embedUrl = 'newFakeUrl'; + config.embedUrl = 'https://app.powerbi.com/newFakeEmbedUrl'; // Act component.embedConfig = config; @@ -203,14 +203,14 @@ describe('PowerBIDashboardEmbedComponent', () => { const config = { type: 'dashboard', id: 'fakeId', - embedUrl: 'fakeUrl', + embedUrl: 'https://app.powerbi.com/fakeEmbedUrl', accessToken: 'fakeToken', }; const newConfig = { type: 'dashboard', id: 'fakeId', - embedUrl: 'fakeUrl', + embedUrl: 'https://app.powerbi.com/fakeEmbedUrl', accessToken: 'fakeToken', }; diff --git a/Angular/powerbi-client-angular/src/components/powerbi-paginated-report-embed/powerbi-paginated-report-embed.component.spec.ts b/Angular/powerbi-client-angular/src/components/powerbi-paginated-report-embed/powerbi-paginated-report-embed.component.spec.ts index 3891114..5b47b1e 100644 --- a/Angular/powerbi-client-angular/src/components/powerbi-paginated-report-embed/powerbi-paginated-report-embed.component.spec.ts +++ b/Angular/powerbi-client-angular/src/components/powerbi-paginated-report-embed/powerbi-paginated-report-embed.component.spec.ts @@ -30,7 +30,7 @@ describe('PowerBIPaginatedReportEmbedComponent', () => { const config = { type: 'report', id: 'fakeId', - embedUrl: 'fakeUrl', + embedUrl: 'https://app.powerbi.com/fakeEmbedUrl', accessToken: 'fakeToken', }; @@ -47,7 +47,7 @@ describe('PowerBIPaginatedReportEmbedComponent', () => { const config = { type: 'report', id: 'fakeId', - embedUrl: 'fakeUrl', + embedUrl: 'https://app.powerbi.com/fakeEmbedUrl', accessToken: 'fakeToken', }; @@ -65,7 +65,7 @@ describe('PowerBIPaginatedReportEmbedComponent', () => { const config = { type: 'report', id: 'fakeId', - embedUrl: 'fakeUrl', + embedUrl: 'https://app.powerbi.com/fakeEmbedUrl', accessToken: 'fakeToken', }; @@ -85,7 +85,7 @@ describe('PowerBIPaginatedReportEmbedComponent', () => { const config = { type: 'report', id: 'fakeId', - embedUrl: 'fakeUrl', + embedUrl: 'https://app.powerbi.com/fakeEmbedUrl', accessToken: 'fakeToken', }; @@ -113,7 +113,7 @@ describe('PowerBIPaginatedReportEmbedComponent', () => { const config = { type: 'report', id: 'fakeId', - embedUrl: 'fakeUrl', + embedUrl: 'https://app.powerbi.com/fakeEmbedUrl', accessToken: 'fakeToken', }; @@ -131,7 +131,7 @@ describe('PowerBIPaginatedReportEmbedComponent', () => { const config = { type: 'report', id: 'fakeId', - embedUrl: 'fakeUrl', + embedUrl: 'https://app.powerbi.com/fakeEmbedUrl', accessToken: 'fakeToken', }; @@ -141,7 +141,7 @@ describe('PowerBIPaginatedReportEmbedComponent', () => { fixture.detectChanges(); // Embed URL of different paginated report - config.embedUrl = 'newFakeUrl'; + config.embedUrl = 'https://app.powerbi.com/newFakeEmbedUrl'; // Act component.embedConfig = config; @@ -156,14 +156,14 @@ describe('PowerBIPaginatedReportEmbedComponent', () => { const config = { type: 'report', id: 'fakeId', - embedUrl: 'fakeUrl', + embedUrl: 'https://app.powerbi.com/fakeEmbedUrl', accessToken: 'fakeToken', }; const newConfig = { type: 'report', id: 'fakeId', - embedUrl: 'fakeUrl', + embedUrl: 'https://app.powerbi.com/fakeEmbedUrl', accessToken: 'fakeToken', }; diff --git a/Angular/powerbi-client-angular/src/components/powerbi-qna-embed/powerbi-qna-embed.component.spec.ts b/Angular/powerbi-client-angular/src/components/powerbi-qna-embed/powerbi-qna-embed.component.spec.ts index f0d5ac2..ca9c5e9 100644 --- a/Angular/powerbi-client-angular/src/components/powerbi-qna-embed/powerbi-qna-embed.component.spec.ts +++ b/Angular/powerbi-client-angular/src/components/powerbi-qna-embed/powerbi-qna-embed.component.spec.ts @@ -106,7 +106,7 @@ describe('PowerBIQnaEmbedComponent', () => { type: 'qna', datasetIds: ['fakeId'], id: 'fakeId', - embedUrl: 'fakeUrl', + embedUrl: 'https://app.powerbi.com/fakeEmbedUrl', accessToken: 'fakeToken', }; @@ -126,7 +126,7 @@ describe('PowerBIQnaEmbedComponent', () => { type: 'qna', id: 'qna visual', datasetIds: [], - embedUrl: 'fakeUrl', + embedUrl: 'https://app.powerbi.com/fakeEmbedUrl', }; // Act @@ -150,7 +150,7 @@ describe('PowerBIQnaEmbedComponent', () => { type: 'qna', id: 'fakeId', datasetIds: ['fakeId'], - embedUrl: 'fakeUrl', + embedUrl: 'https://app.powerbi.com/fakeEmbedUrl', accessToken: 'fakeToken', }; @@ -187,7 +187,7 @@ describe('PowerBIQnaEmbedComponent', () => { type: 'qna', id: 'fakeId', datasetIds: ['fakeId'], - embedUrl: 'fakeUrl', + embedUrl: 'https://app.powerbi.com/fakeEmbedUrl', accessToken: 'fakeToken', }; @@ -197,7 +197,7 @@ describe('PowerBIQnaEmbedComponent', () => { fixture.detectChanges(); // Embed URL of different qna visual - config.embedUrl = 'newFakeUrl'; + config.embedUrl = 'https://app.powerbi.com/newFakeEmbedUrl'; // Act component.embedConfig = config; @@ -213,7 +213,7 @@ describe('PowerBIQnaEmbedComponent', () => { type: 'qna', id: 'fakeId', datasetIds: ['fakeId'], - embedUrl: 'fakeUrl', + embedUrl: 'https://app.powerbi.com/fakeEmbedUrl', accessToken: 'fakeToken', }; @@ -221,7 +221,7 @@ describe('PowerBIQnaEmbedComponent', () => { type: 'qna', id: 'fakeId', datasetIds: ['fakeId'], - embedUrl: 'fakeUrl', + embedUrl: 'https://app.powerbi.com/fakeEmbedUrl', accessToken: 'fakeToken', }; @@ -253,7 +253,7 @@ describe('PowerBIQnaEmbedComponent', () => { type: 'qna', id: 'fakeId', datasetIds: ['fakeId'], - embedUrl: 'fakeUrl', + embedUrl: 'https://app.powerbi.com/fakeEmbedUrl', accessToken: 'fakeToken', }; component.embedConfig = config; diff --git a/Angular/powerbi-client-angular/src/components/powerbi-report-embed/powerbi-report-embed.component.spec.ts b/Angular/powerbi-client-angular/src/components/powerbi-report-embed/powerbi-report-embed.component.spec.ts index 270ed9f..92b934e 100644 --- a/Angular/powerbi-client-angular/src/components/powerbi-report-embed/powerbi-report-embed.component.spec.ts +++ b/Angular/powerbi-client-angular/src/components/powerbi-report-embed/powerbi-report-embed.component.spec.ts @@ -103,7 +103,7 @@ describe('PowerBIReportEmbedComponent', () => { const config = { type: 'report', id: 'fakeId', - embedUrl: 'fakeUrl', + embedUrl: 'https://app.powerbi.com/fakeEmbedUrl', accessToken: 'fakeToken', }; @@ -122,7 +122,7 @@ describe('PowerBIReportEmbedComponent', () => { const config = { type: 'report', id: 'report', - embedUrl: 'fakeUrl', + embedUrl: 'https://app.powerbi.com/fakeEmbedUrl', }; // Act @@ -144,7 +144,7 @@ describe('PowerBIReportEmbedComponent', () => { const newConfig = { type: 'report', id: 'fakeId', - embedUrl: 'fakeUrl', + embedUrl: 'https://app.powerbi.com/fakeEmbedUrl', accessToken: 'fakeToken', }; @@ -180,7 +180,7 @@ describe('PowerBIReportEmbedComponent', () => { const config = { type: 'report', id: 'fakeId', - embedUrl: 'fakeUrl', + embedUrl: 'https://app.powerbi.com/fakeEmbedUrl', accessToken: 'fakeToken', }; @@ -190,7 +190,7 @@ describe('PowerBIReportEmbedComponent', () => { fixture.detectChanges(); // Embed URL of different report - config.embedUrl = 'newFakeUrl'; + config.embedUrl = 'https://app.powerbi.com/newFakeEmbedUrl'; // Act component.embedConfig = config; @@ -205,7 +205,7 @@ describe('PowerBIReportEmbedComponent', () => { const config = { type: 'report', id: 'fakeId', - embedUrl: 'fakeUrl', + embedUrl: 'https://app.powerbi.com/fakeEmbedUrl', accessToken: 'fakeToken', }; @@ -228,7 +228,7 @@ describe('PowerBIReportEmbedComponent', () => { const config = { type: 'report', id: 'fakeId', - embedUrl: 'fakeUrl', + embedUrl: 'https://app.powerbi.com/fakeEmbedUrl', accessToken: 'fakeToken', }; @@ -251,7 +251,7 @@ describe('PowerBIReportEmbedComponent', () => { const config = { type: 'report', id: 'fakeId', - embedUrl: 'fakeUrl', + embedUrl: 'https://app.powerbi.com/fakeEmbedUrl', accessToken: 'fakeToken', }; @@ -273,14 +273,14 @@ describe('PowerBIReportEmbedComponent', () => { const config = { type: 'report', id: 'fakeId', - embedUrl: 'fakeUrl', + embedUrl: 'https://app.powerbi.com/fakeEmbedUrl', accessToken: 'fakeToken', }; const newConfig = { type: 'report', id: 'fakeId', - embedUrl: 'fakeUrl', + embedUrl: 'https://app.powerbi.com/fakeEmbedUrl', accessToken: 'fakeToken', }; diff --git a/Angular/powerbi-client-angular/src/components/powerbi-tile-embed/powerbi-tile-embed.component.spec.ts b/Angular/powerbi-client-angular/src/components/powerbi-tile-embed/powerbi-tile-embed.component.spec.ts index 71fa28c..4beba84 100644 --- a/Angular/powerbi-client-angular/src/components/powerbi-tile-embed/powerbi-tile-embed.component.spec.ts +++ b/Angular/powerbi-client-angular/src/components/powerbi-tile-embed/powerbi-tile-embed.component.spec.ts @@ -106,7 +106,7 @@ describe('PowerBITileEmbedComponent', () => { dashboardId: 'fakeId', type: 'tile', id: 'fakeId', - embedUrl: 'fakeUrl', + embedUrl: 'https://app.powerbi.com/fakeEmbedUrl', accessToken: 'fakeToken', }; @@ -126,7 +126,7 @@ describe('PowerBITileEmbedComponent', () => { type: 'tile', id: 'tile', dashboardId: 'fakeId', - embedUrl: 'fakeUrl', + embedUrl: 'https://app.powerbi.com/fakeEmbedUrl', }; // Act @@ -150,7 +150,7 @@ describe('PowerBITileEmbedComponent', () => { type: 'tile', id: 'fakeId', dashboardId: 'fakeId', - embedUrl: 'fakeUrl', + embedUrl: 'https://app.powerbi.com/fakeEmbedUrl', accessToken: 'fakeToken', }; @@ -187,7 +187,7 @@ describe('PowerBITileEmbedComponent', () => { type: 'tile', id: 'fakeId', dashboardId: 'fakeId', - embedUrl: 'fakeUrl', + embedUrl: 'https://app.powerbi.com/fakeEmbedUrl', accessToken: 'fakeToken', }; @@ -197,7 +197,7 @@ describe('PowerBITileEmbedComponent', () => { fixture.detectChanges(); // Embed URL of different tile - config.embedUrl = 'newFakeUrl'; + config.embedUrl = 'https://app.powerbi.com/newFakeEmbedUrl'; // Act component.embedConfig = config; @@ -213,7 +213,7 @@ describe('PowerBITileEmbedComponent', () => { type: 'tile', id: 'fakeId', dashboardId: 'fakeId', - embedUrl: 'fakeUrl', + embedUrl: 'https://app.powerbi.com/fakeEmbedUrl', accessToken: 'fakeToken', }; @@ -221,7 +221,7 @@ describe('PowerBITileEmbedComponent', () => { type: 'tile', id: 'fakeId', dashboardId: 'fakeId', - embedUrl: 'fakeUrl', + embedUrl: 'https://app.powerbi.com/fakeEmbedUrl', accessToken: 'fakeToken', }; diff --git a/Angular/powerbi-client-angular/src/components/powerbi-visual-embed/powerbi-visual-embed.component.spec.ts b/Angular/powerbi-client-angular/src/components/powerbi-visual-embed/powerbi-visual-embed.component.spec.ts index 8ce9aef..bb336f7 100644 --- a/Angular/powerbi-client-angular/src/components/powerbi-visual-embed/powerbi-visual-embed.component.spec.ts +++ b/Angular/powerbi-client-angular/src/components/powerbi-visual-embed/powerbi-visual-embed.component.spec.ts @@ -108,7 +108,7 @@ describe('PowerBIVisualEmbedComponent', () => { pageName: 'fakePage', type: 'visual', id: 'fakeId', - embedUrl: 'fakeUrl', + embedUrl: 'https://app.powerbi.com/fakeEmbedUrl', accessToken: 'fakeToken', }; @@ -128,7 +128,7 @@ describe('PowerBIVisualEmbedComponent', () => { type: 'visual', id: 'visual', visualName: '', - embedUrl: 'fakeUrl', + embedUrl: 'https://app.powerbi.com/fakeEmbedUrl', }; // Act @@ -153,7 +153,7 @@ describe('PowerBIVisualEmbedComponent', () => { id: 'fakeId', visualName: 'fakeVisual', pageName: 'fakePage', - embedUrl: 'fakeUrl', + embedUrl: 'https://app.powerbi.com/fakeEmbedUrl', accessToken: 'fakeToken', }; @@ -191,7 +191,7 @@ describe('PowerBIVisualEmbedComponent', () => { id: 'fakeId', visualName: 'fakeVisual', pageName: 'fakePage', - embedUrl: 'fakeUrl', + embedUrl: 'https://app.powerbi.com/fakeEmbedUrl', accessToken: 'fakeToken', }; @@ -201,7 +201,7 @@ describe('PowerBIVisualEmbedComponent', () => { fixture.detectChanges(); // Embed URL of different visual - config.embedUrl = 'newFakeUrl'; + config.embedUrl = 'https://app.powerbi.com/newFakeEmbedUrl'; // Act component.embedConfig = config; @@ -218,7 +218,7 @@ describe('PowerBIVisualEmbedComponent', () => { id: 'fakeId', visualName: 'fakeVisual', pageName: 'fakePage', - embedUrl: 'fakeUrl', + embedUrl: 'https://app.powerbi.com/fakeEmbedUrl', accessToken: 'fakeToken', }; @@ -227,7 +227,7 @@ describe('PowerBIVisualEmbedComponent', () => { id: 'fakeId', visualName: 'fakeVisual', pageName: 'fakePage', - embedUrl: 'fakeUrl', + embedUrl: 'https://app.powerbi.com/fakeEmbedUrl', accessToken: 'fakeToken', };