Skip to content

Commit

Permalink
fix(stache): set correct component URL for edit button (#75)
Browse files Browse the repository at this point in the history
  • Loading branch information
Blackbaud-SteveBrush authored Aug 3, 2023
1 parent fd82fe1 commit 42903c0
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ describe('StacheEditButtonComponent', () => {
it('should set the url for a gitHub repo', () => {
fixture.detectChanges();
expect(component['url']).toBe(
'https://github.com/blackbaud/skyux-lib-stache/tree/master/src/app%2Ftest%2Froute%2Findex.html'
'https://github.com/blackbaud/skyux-lib-stache/tree/master/src/app%2Ftest%2Froute%2Findex.component.html'
);
});

Expand All @@ -85,7 +85,7 @@ describe('StacheEditButtonComponent', () => {
component = fixture.componentInstance;
fixture.detectChanges();
expect(component['url']).toBe(
'https://blackbaud.visualstudio.com/Products/_git/skyux-spa-stache-test-pipeline?path=%2Fsrc%2Fapp%2Ftest%2Froute%2Findex.html&version=GBmaster'
'https://blackbaud.visualstudio.com/Products/_git/skyux-spa-stache-test-pipeline?path=%2Fsrc%2Fapp%2Ftest%2Froute%2Findex.component.html&version=GBmaster'
);
});

Expand All @@ -95,7 +95,7 @@ describe('StacheEditButtonComponent', () => {
component = fixture.componentInstance;
fixture.detectChanges();
expect(component.url).toEqual(
'https://github.com/blackbaud/skyux-lib-stache/tree/master/src/app%2Findex.html'
'https://github.com/blackbaud/skyux-lib-stache/tree/master/src/app%2Findex.component.html'
);
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,14 @@ export class StacheEditButtonComponent implements OnInit {

if (type === 'vsts') {
return (
base + ADO_FILE_PATH_ROOT + frag + 'index.html' + ADO_BRANCH_SELECTOR
base +
ADO_FILE_PATH_ROOT +
frag +
'index.component.html' +
ADO_BRANCH_SELECTOR
);
} else {
return base + GITHUB_FILE_PATH_ROOT + frag + 'index.html';
return base + GITHUB_FILE_PATH_ROOT + frag + 'index.component.html';
}
}
}

0 comments on commit 42903c0

Please sign in to comment.