test(e2e): exam show tests (#51840)

This commit is contained in:
Dmitry Drepin
2023-10-18 09:04:32 -07:00
committed by GitHub
parent 4c859eaed2
commit f24ce22d9d
6 changed files with 223 additions and 3 deletions
@@ -8,6 +8,7 @@ exports[`<ChallengeTitle/> renders correctly 1`] = `
className="challenge-title"
>
<h1
data-playwright-test-label="challenge-title"
id="content-start"
>
title text
@@ -29,7 +29,9 @@ function ChallengeTitle({
</>
)}
<div className='challenge-title'>
<h1 id='content-start'>{children}</h1>
<h1 id='content-start' data-playwright-test-label='challenge-title'>
{children}
</h1>
{isCompleted && <GreenPass />}
</div>
</div>
@@ -387,9 +387,11 @@ class ShowExam extends Component<ShowExamProps, ShowExamState> {
) : (
<div className='exam-wrapper'>
<div className='exam-header'>
<div>{title}</div>
<div data-playwright-test-label='exam-show-title'>
{title}
</div>
<span>|</span>
<div>
<div data-playwright-test-label='exam-show-question-time'>
{t('learn.exam.time', {
t: formatSecondsToTime(examTimeInSeconds)
})}