* feat: add language selection chore: update tests so we have less error message test: update test * test: update tests * chore: remove duplicate translation * chore: lint for console * chore: remove comments * chore: make sure the affect url frame refresh after the language selection change * chore: add whole_course_translation and language to courseware meta (#1305) * feat: Add feedback widget UI mock Add unit tests Fix snapshot Clean Sequence component logEvent calls Clean unit test Put feedback widget behind whole course translation flag Fix useFeedbackWidget test * chore: add src and dest translation * feat: first iteration of plugin translation chore: update plugin instruction * feat: Connect FeedbackWidget with backend services (#1325) Connect FeedbackWidget with backend services Move feedback widget to unit translation plugin * feat: Add authentication to WCT feedback endpoints (#1329) * chore: add fetch config and move feedback widget for the plugin chore: rewrite and test the api request chore: rebase chore: update translation feedback chore: test chore: add more tests * chore: rebase * chore: update requested change * chore: update package * chore: upgrade frontend-lib-special-exams and frontend-lib-learning-assistant * chore: update tests * chore: remove unneeded package * chore: update example config * chore: add source-map-loader * fix: feedback widget render error after submit feedback (#1335) * fix: feedback widget render error after submit feedback * fix: widget logic --------- Co-authored-by: Rodrigo Martin <rodrigom_94@hotmail.com>
205 lines
4.7 KiB
Plaintext
205 lines
4.7 KiB
Plaintext
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
|
|
exports[`<FeedbackWidget /> render feedback widget 1`] = `
|
|
<div
|
|
className="d-none"
|
|
>
|
|
<div
|
|
className="sequence w-100"
|
|
>
|
|
<div
|
|
className="ml-4 mr-2"
|
|
>
|
|
<ActionRow>
|
|
Rate this page translation
|
|
<Spacer />
|
|
<div>
|
|
<IconButton
|
|
alt="positive-feedback"
|
|
className="m-1"
|
|
iconAs="Icon"
|
|
id="positive-feedback-button"
|
|
onClick={[MockFunction onThumbsUpClick]}
|
|
src="ThumbUpOutline"
|
|
variant="secondary"
|
|
/>
|
|
<IconButton
|
|
alt="negative-feedback"
|
|
className="mr-2"
|
|
iconAs="Icon"
|
|
id="negative-feedback-button"
|
|
onClick={[MockFunction onThumbsDownClick]}
|
|
src="ThumbDownOffAlt"
|
|
variant="secondary"
|
|
/>
|
|
</div>
|
|
<div
|
|
className="mb-1 text-light action-row-divider"
|
|
>
|
|
|
|
|
</div>
|
|
<div>
|
|
<IconButton
|
|
alt="close-feedback"
|
|
className="ml-1 mr-2 float-right"
|
|
iconAs="Icon"
|
|
id="close-feedback-button"
|
|
onClick={[MockFunction closeFeedbackWidget]}
|
|
src="Close"
|
|
variant="secondary"
|
|
/>
|
|
</div>
|
|
</ActionRow>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
`;
|
|
|
|
exports[`<FeedbackWidget /> render gratitude text 1`] = `
|
|
<div
|
|
className="d-none"
|
|
>
|
|
<div
|
|
className="sequence w-100"
|
|
>
|
|
<div
|
|
className="ml-4 mr-4"
|
|
>
|
|
<ActionRow
|
|
className="m-2 justify-content-center"
|
|
>
|
|
Thank you! Your feedback matters.
|
|
</ActionRow>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
`;
|
|
|
|
exports[`<FeedbackWidget /> renders hidden by default 1`] = `
|
|
<div
|
|
className="d-none"
|
|
>
|
|
<div
|
|
className="sequence w-100"
|
|
>
|
|
<div
|
|
className="ml-4 mr-2"
|
|
>
|
|
<ActionRow>
|
|
Rate this page translation
|
|
<Spacer />
|
|
<div>
|
|
<IconButton
|
|
alt="positive-feedback"
|
|
className="m-1"
|
|
iconAs="Icon"
|
|
id="positive-feedback-button"
|
|
onClick={[MockFunction onThumbsUpClick]}
|
|
src="ThumbUpOutline"
|
|
variant="secondary"
|
|
/>
|
|
<IconButton
|
|
alt="negative-feedback"
|
|
className="mr-2"
|
|
iconAs="Icon"
|
|
id="negative-feedback-button"
|
|
onClick={[MockFunction onThumbsDownClick]}
|
|
src="ThumbDownOffAlt"
|
|
variant="secondary"
|
|
/>
|
|
</div>
|
|
<div
|
|
className="mb-1 text-light action-row-divider"
|
|
>
|
|
|
|
|
</div>
|
|
<div>
|
|
<IconButton
|
|
alt="close-feedback"
|
|
className="ml-1 mr-2 float-right"
|
|
iconAs="Icon"
|
|
id="close-feedback-button"
|
|
onClick={[MockFunction closeFeedbackWidget]}
|
|
src="Close"
|
|
variant="secondary"
|
|
/>
|
|
</div>
|
|
</ActionRow>
|
|
</div>
|
|
<div
|
|
className="ml-4 mr-4"
|
|
>
|
|
<ActionRow
|
|
className="m-2 justify-content-center"
|
|
>
|
|
Thank you! Your feedback matters.
|
|
</ActionRow>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
`;
|
|
|
|
exports[`<FeedbackWidget /> renders show when elemReady is true 1`] = `
|
|
<div
|
|
className="sequence-container d-inline-flex flex-row w-100"
|
|
>
|
|
<div
|
|
className="sequence w-100"
|
|
>
|
|
<div
|
|
className="ml-4 mr-2"
|
|
>
|
|
<ActionRow>
|
|
Rate this page translation
|
|
<Spacer />
|
|
<div>
|
|
<IconButton
|
|
alt="positive-feedback"
|
|
className="m-1"
|
|
iconAs="Icon"
|
|
id="positive-feedback-button"
|
|
onClick={[MockFunction onThumbsUpClick]}
|
|
src="ThumbUpOutline"
|
|
variant="secondary"
|
|
/>
|
|
<IconButton
|
|
alt="negative-feedback"
|
|
className="mr-2"
|
|
iconAs="Icon"
|
|
id="negative-feedback-button"
|
|
onClick={[MockFunction onThumbsDownClick]}
|
|
src="ThumbDownOffAlt"
|
|
variant="secondary"
|
|
/>
|
|
</div>
|
|
<div
|
|
className="mb-1 text-light action-row-divider"
|
|
>
|
|
|
|
|
</div>
|
|
<div>
|
|
<IconButton
|
|
alt="close-feedback"
|
|
className="ml-1 mr-2 float-right"
|
|
iconAs="Icon"
|
|
id="close-feedback-button"
|
|
onClick={[MockFunction closeFeedbackWidget]}
|
|
src="Close"
|
|
variant="secondary"
|
|
/>
|
|
</div>
|
|
</ActionRow>
|
|
</div>
|
|
<div
|
|
className="ml-4 mr-4"
|
|
>
|
|
<ActionRow
|
|
className="m-2 justify-content-center"
|
|
>
|
|
Thank you! Your feedback matters.
|
|
</ActionRow>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
`;
|