Skip to content

Commit 0bc8ba0

Browse files
authored
Merge pull request #2143 from topcoder-platform/PM-5854
PM-5854: Make challenge link visually distinct
2 parents 3cabeb8 + dd84a92 commit 0bc8ba0

2 files changed

Lines changed: 17 additions & 2 deletions

File tree

src/apps/support/src/pages/ticket-details/TicketDetailPage.module.scss

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,11 @@
1212
text-decoration: none;
1313
}
1414

15-
.challengeLink {
16-
color: var(--Actived);
15+
.challengeLink,
16+
.challengeLink:hover {
17+
color: $link-blue-dark;
1718
font-weight: 700;
19+
text-decoration: underline;
1820
}
1921

2022
.header {

src/apps/support/src/pages/ticket-details/TicketDetailPage.spec.tsx

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
/* eslint-disable import/no-extraneous-dependencies, ordered-imports/ordered-imports, react/jsx-no-bind */
2+
import { readFileSync } from 'fs'
23
import {
34
fireEvent,
45
render,
@@ -17,6 +18,7 @@ import { TicketDetailPage } from './TicketDetailPage'
1718
const mockMutate = jest.fn()
1819
const mockUseSWR = jest.fn()
1920
let mockProfile: { roles: string[]; userId: number | string }
21+
const ticketDetailStyles = readFileSync(`${__dirname}/TicketDetailPage.module.scss`, 'utf8')
2022

2123
interface Deferred<T> {
2224
promise: Promise<T>
@@ -196,6 +198,17 @@ describe('TicketDetailPage reply access', () => {
196198
.toBeTruthy()
197199
})
198200

201+
it('styles the challenge anchor as a visible link', () => {
202+
const challengeLinkRule = ticketDetailStyles.match(
203+
/\.challengeLink,\s*\.challengeLink:hover \{[^}]*\}/,
204+
)?.[0]
205+
206+
expect(challengeLinkRule)
207+
.toContain('color: $link-blue-dark;')
208+
expect(challengeLinkRule)
209+
.toContain('text-decoration: underline;')
210+
})
211+
199212
it('identifies the support staff member who closed the ticket', () => {
200213
mockUseSWR.mockReturnValue({
201214
data: {

0 commit comments

Comments
 (0)