Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -438,8 +438,8 @@ const SharedAssignmentCatalog = ({ group, isLoading, shared }) => {
</h3>
<button data-testid="shared-catalog-close" type="button" onClick={shared.handleCloseCatalog}>
<FormattedMessage
defaultMessage="Cancel"
description="Cancel button that leaves the shared catalog"
defaultMessage="Back"
description="Go back from the shared catalog to the assignment list"
id="gui.classroom.shared.catalogClose"
/>
</button>
Expand Down
2 changes: 1 addition & 1 deletion packages/scratch-gui/src/locales/en.js
Original file line number Diff line number Diff line change
Expand Up @@ -373,7 +373,7 @@ export default {
'gui.classroom.shared.published': 'Published to みんなの課題: "{title}" (© {author} / CC BY 4.0)',
'gui.classroom.shared.openCatalog': 'Find in みんなの課題',
'gui.classroom.shared.catalogTitle': 'みんなの課題 — assignments shared by teachers nationwide',
'gui.classroom.shared.catalogClose': 'Close',
'gui.classroom.shared.catalogClose': 'Back',
'gui.classroom.shared.tabAll': 'Browse all',
'gui.classroom.shared.tabMine': 'My posts',
'gui.classroom.shared.filterAllLevels': 'All school levels',
Expand Down
2 changes: 1 addition & 1 deletion packages/scratch-gui/src/locales/ja-Hira.js
Original file line number Diff line number Diff line change
Expand Up @@ -431,7 +431,7 @@ export default {
'gui.classroom.shared.passcodeImportBtn': 'このクラスにとりこむ',
'gui.classroom.shared.openCatalog': 'みんなのかだいからさがす',
'gui.classroom.shared.catalogTitle': 'みんなのかだい — ぜんこくのせんせいがきょうゆうしたかだい',
'gui.classroom.shared.catalogClose': 'キャンセル',
'gui.classroom.shared.catalogClose': 'もどる',
'gui.classroom.shared.tabAll': 'すべて',
'gui.classroom.shared.tabMine': 'じぶんのとうこう',
'gui.classroom.shared.filterAllLevels': 'すべてのがっこうしゅ',
Expand Down
2 changes: 1 addition & 1 deletion packages/scratch-gui/src/locales/ja.js
Original file line number Diff line number Diff line change
Expand Up @@ -422,7 +422,7 @@ export default {
'gui.classroom.shared.passcodeImportBtn': 'このクラスに取り込む',
'gui.classroom.shared.openCatalog': 'みんなの課題からさがす',
'gui.classroom.shared.catalogTitle': 'みんなの課題 — 全国の先生が共有した課題',
'gui.classroom.shared.catalogClose': 'キャンセル',
'gui.classroom.shared.catalogClose': '戻る',
'gui.classroom.shared.tabAll': 'すべて',
'gui.classroom.shared.tabMine': '自分の投稿',
'gui.classroom.shared.filterAllLevels': 'すべての学校種',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,19 @@ describe('SharedAssignmentCatalog (issue #1070)', () => {
expect(shared.handleLoadMoreCatalog).toHaveBeenCalled();
});

test('the header back button is labelled "Back" and returns to the assignment list (issue #1121)', () => {
const shared = sharedState();
renderCatalog(shared);
const back = byTestId('shared-catalog-close');
expect(back).toBeInTheDocument();
// Label must read "戻る" (Back), not "キャンセル"/"閉じる".
expect(back.textContent).toBe('Back');
// Clicking it only closes the catalog, returning to the assignment
// board (課題一覧) — it must not navigate to the class list.
fireEvent.click(back);
expect(shared.handleCloseCatalog).toHaveBeenCalled();
});

test('the mine tab hides the filters and marks unlisted items', () => {
renderCatalog(sharedState({
catalogTab: 'mine',
Expand Down
Loading