Skip to content

Commit 72776bf

Browse files
authored
Merge pull request #2103 from opensource-workshop/2.23.3
Merge v1.23.3 into 2
2 parents a5fedf6 + a0bc90a commit 72776bf

File tree

2 files changed

+12
-4
lines changed

2 files changed

+12
-4
lines changed

config/version.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
|
1313
*/
1414

15-
'cc_version' => '2.23.2',
15+
'cc_version' => '2.23.3',
1616

1717
'show_cc_version' => true,
1818
];

tests/Browser/Common/PasswordPageTest.php

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -80,15 +80,20 @@ private function setPassword()
8080
*/
8181
private function viewPage()
8282
{
83-
// ログアウト
83+
// *** ログアウト状態でパスワードページ>パスワード入力>ページの閲覧
8484
$this->browse(function (Browser $browser) {
8585
$browser->visit('/password')
8686
->assertTitleContains('Connect-CMS')
8787
->screenshot('common/password_page/viewPage/images/viewPage1')
8888
->type('password', 'pass123')
8989
->screenshot('common/password_page/viewPage/images/inputPassword')
9090
->press('ページ閲覧');
91+
});
9192

93+
// *** ログインして固定記事を作成
94+
// ※ $this->browse()内で$this->login(), $this->logout() はなるべく使わない。$this->login(), $this->logout() は内部で$this->browse()を使っているため、入れ子呼び出しになり、ログインできたり・できなかったりする事あり(github actions+php8.1等)
95+
$this->login(1);
96+
$this->browse(function (Browser $browser) {
9297
// データクリア
9398
$page = Page::where('permanent_link', '/password')->first();
9499
$frame = Frame::where('page_id', $page->id)->where('plugin_name', 'contents')->first();
@@ -102,7 +107,6 @@ private function viewPage()
102107
}
103108

104109
// 固定記事を作成
105-
$this->login(1);
106110
$this->addPluginModal('contents', '/password', 2, false);
107111
$bucket = Buckets::create(['bucket_name' => 'パスワード付きページテスト', 'plugin_name' => 'contents']);
108112

@@ -111,8 +115,12 @@ private function viewPage()
111115

112116
$this->frame = Frame::orderBy('id', 'desc')->first();
113117
$this->frame->update(['bucket_id' => $bucket->id]);
114-
$this->logout();
118+
});
119+
// パスワード入力済みセッションをクリアさせないため、ログアウトしない
120+
// $this->logout();
115121

122+
// *** パスワード入力済みのため、パスワード付きページの閲覧できる(固定記事あり)
123+
$this->browse(function (Browser $browser) {
116124
$browser->visit('/password')
117125
->screenshot('common/password_page/viewPage/images/viewPage2');
118126
});

0 commit comments

Comments
 (0)