Skip to content

Commit

Permalink
Merge branch 'develop' into bugfix/MARP-993-Market-website-Website-fr…
Browse files Browse the repository at this point in the history
…eezed-when-details-contend-missing
  • Loading branch information
ntqdinh-axonivy committed Aug 28, 2024
2 parents a8f758a + 981074a commit e4342f3
Show file tree
Hide file tree
Showing 4 changed files with 41 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -67,10 +67,15 @@
<ul class="navbar-nav me-auto mb-lg-0 flex-row">
@for (link of socialMediaLinks; track $index) {
<li>
<a class="nav-link" aria-current="page" [href]="link.url">
<span class="d-flex justify-content-center align-items-center link-icon">
<i [class]="link.styleClass" class="w-100 h-100"></i>
</span>
<a
class="nav-link social-link text-primary"
aria-current="page"
target="_blank"
[href]="link.url"
[title]="link.title">
<span class="d-flex justify-content-center align-items-center link-icon">
<i [class]="link.styleClass" class="w-100 h-100"></i>
</span>
</a>
</li>
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { FooterComponent } from './footer.component';
import { TranslateModule, TranslateService } from '@ngx-translate/core';
import { By } from '@angular/platform-browser';
import { Viewport } from 'karma-viewport/dist/adapter/viewport';
import { SOCIAL_MEDIA_LINK } from '../../constants/common.constant';

declare const viewport: Viewport;

Expand Down Expand Up @@ -70,4 +71,19 @@ describe('FooterComponent', () => {
expect(getComputedStyle(logo.nativeElement).textAlign).toBe('center');
expect(getComputedStyle(ivyPolicy.nativeElement).textAlign).toBe('center');
});

it('should navigate to the correct URL when the link icon is clicked', () => {
const socialMediaLinks = fixture.debugElement.queryAll(
By.css('.social-link')
);

for (let index = 0; index < socialMediaLinks.length; index++) {
const socialMediaLinkElement: HTMLAnchorElement =
socialMediaLinks[index].nativeElement;

socialMediaLinkElement.click();

expect(socialMediaLinkElement.href).toBe(SOCIAL_MEDIA_LINK[index].url);
}
});
});
22 changes: 13 additions & 9 deletions marketplace-ui/src/app/shared/constants/common.constant.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,21 +36,25 @@ export const NAV_ITEMS: NavItem[] = [

export const SOCIAL_MEDIA_LINK = [
{
styleClass: 'fab fa-linkedin',
url: '/'
styleClass: 'fa-brands fa-linkedin-in',
title: 'Axon Ivy | LinkedIn',
url: 'https://www.linkedin.com/company/axon-ivy-ag'
},
{
styleClass: 'fab fa-xing',
url: '/'
styleClass: 'fa-brands fa-xing',
title: 'Axon Ivy | XING',
url: 'https://www.xing.com/companies/axonivyag'
},
{
styleClass: 'fab fa-youtube',
url: '/'
styleClass: 'fa-brands fa-facebook-f',
title: 'Axon Ivy | Facebook',
url: 'https://www.facebook.com/axonivy'
},
{
styleClass: 'fab fa-facebook',
url: '/'
}
styleClass: 'fa-brands fa-youtube',
title: 'Axon Ivy | Youtube',
url: 'https://www.youtube.com/channel/UCkoNcDoeDAVM7FB-txy3jnQ'
},
];

export const IVY_FOOTER_LINKS = [
Expand Down
6 changes: 3 additions & 3 deletions marketplace-ui/src/assets/i18n/en.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ common:
termsOfService: Terms of Service
product:
detail:
backToMainPage: Back to marketplace overview
backToMainPage: Back to overview
review: Review
installation: Downloads
times: Times
Expand Down Expand Up @@ -103,7 +103,7 @@ common:
detailedReviews: Detailed reviews
rateLinkLabel: Rate this connector
showMoreBtnLabel: Show more
noFeedbackMessage1: There are no feedbacks for this connector yet.
noFeedbackMessage2: Bet the first to share your opinion.
noFeedbackMessage1: There is no feedback for this connector yet.
noFeedbackMessage2: Be the first to share your opinion.
rateFeedbackBtnLabel: Rate this connector
reviewLabelNoYet: No reviews yet

0 comments on commit e4342f3

Please sign in to comment.