Skip to content

Commit c453bd3

Browse files
authored
Merge pull request #1788 from coderdojo-japan/rename-event-date-to-record-date
refactor: 開催日を記録日に変更 (/dojos/activity)
2 parents 4063cdc + bac508c commit c453bd3

2 files changed

Lines changed: 16 additions & 16 deletions

File tree

app/views/dojos/activity.html.erb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@
1919
<div class='form__terms list'>
2020
<ul style='list-style-type: "\2713\0020"; font-size: smaller;'>
2121
<li>「掲載日」は<%= link_to '統計情報 (道場別) ', dojos_path %> と同じロジックで表示しています。</li>
22-
<li>開催日」は<%= link_to '統計情報 (開催数)', stats_path %> から直近の開催日を表示しています</li>
23-
<li>開催日」のデータは <a href='https://doorkeeper.jp/'>Doorkeeper</a><a href='http://connpass.com/'>connpass</a> にのみ対応しています</li>
22+
<li>記録日」は<%= link_to '統計情報 (開催数)', stats_path %> や活動の確認/記録日を表示しています</li>
23+
<li>記録日」は <a href='https://doorkeeper.jp/'>Doorkeeper</a><a href='http://connpass.com/'>connpass</a> の場合、自動で更新されます</li>
2424
</ul>
2525
</div>
2626
</p>
@@ -47,7 +47,7 @@
4747
<small>
4848
🗓
4949
<br class='ignore-pc'>
50-
<a href='<%= events_path %>'>開催日</a>
50+
<a href='<%= events_path %>'>記録日</a>
5151
</small>
5252
</th>
5353
<th>

spec/requests/dojos_spec.rb

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -432,7 +432,7 @@
432432
it "displays proper column headers" do
433433
get activity_dojos_path
434434
expect(response.body).to include("掲載日")
435-
expect(response.body).to include("開催日")
435+
expect(response.body).to include("記録日")
436436
expect(response.body).to include("ノート")
437437
end
438438

@@ -530,16 +530,16 @@
530530

531531
dojo_row = dojo_row_match[0]
532532

533-
# The 開催日 (event date) column should show the newer note date (2025-03-16)
533+
# The 記録日 (recorded date) column should show the newer note date (2025-03-16)
534534
# not the older event history date (2017-03-12)
535535
expect(dojo_row).to include("2025-03-16"),
536-
"Expected to see note date 2025-03-16 in 開催日 column, but found: #{dojo_row}"
536+
"Expected to see note date 2025-03-16 in 記録日 column, but found: #{dojo_row}"
537537

538538
expect(dojo_row).not_to include("2017-03-12"),
539539
"Should not show old event history date 2017-03-12 when newer note date exists"
540540
end
541541

542-
it "should link to note URL when displaying note date in 開催日 column" do
542+
it "should link to note URL when displaying note date in 記録日 column" do
543543
get activity_dojos_path
544544

545545
# Find the dojo row
@@ -550,7 +550,7 @@
550550

551551
# Should contain a link to the note URL
552552
expect(dojo_row).to include("https://coderdojo-wakayama.hatenablog.com/entry/2025/03/16/230604"),
553-
"Expected to find note URL in the 開催日 column"
553+
"Expected to find note URL in the 記録日 column"
554554
end
555555

556556
it "handles multiple date formats in note (YYYY-MM-DD and YYYY/MM/DD)" do
@@ -641,22 +641,22 @@
641641

642642
dojo_row = dojo_row_match[0]
643643

644-
# Extract just the 開催日 column to check the date display
644+
# Extract just the 記録日 column to check the date display
645645
td_matches = dojo_row.scan(/<td[^>]*>(.*?)<\/td>/m)
646646

647-
# Based on debug output: td_matches[1] is the 開催日 column
647+
# Based on debug output: td_matches[1] is the 記録日 column
648648
# (道場名 column seems to be skipped in regex due to complex link structure)
649-
event_date_column = td_matches[1]&.first # 開催日 column
649+
event_date_column = td_matches[1]&.first # 記録日 column
650650

651-
expect(event_date_column).not_to be_nil, "Could not find 開催日 column"
651+
expect(event_date_column).not_to be_nil, "Could not find 記録日 column"
652652

653-
# Should show the newer event history date (2025-08-01) in the 開催日 column
653+
# Should show the newer event history date (2025-08-01) in the 記録日 column
654654
expect(event_date_column).to include("2025-08-01"),
655-
"Expected to see newer event history date 2025-08-01 in 開催日 column, but found: #{event_date_column}"
655+
"Expected to see newer event history date 2025-08-01 in 記録日 column, but found: #{event_date_column}"
656656

657-
# The 開催日 column should not contain the older note date
657+
# The 記録日 column should not contain the older note date
658658
expect(event_date_column).not_to include("2025-03-16"),
659-
"Should not show older note date 2025-03-16 in 開催日 column when newer event history exists"
659+
"Should not show older note date 2025-03-16 in 記録日 column when newer event history exists"
660660
end
661661
end
662662
end

0 commit comments

Comments
 (0)