Skip to content

Commit 12685f2

Browse files
committed
Fixes after review
1 parent 1bd471d commit 12685f2

File tree

3 files changed

+7
-46
lines changed

3 files changed

+7
-46
lines changed

features/standard/ContentManagement.feature

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -143,11 +143,11 @@ Scenario: Content can be copied
143143
| title | short_title | intro |
144144
| TestArticleToHideLater | TestArticleToHideLater | TestArticleIntro |
145145
And I'm on Content view Page for "ContentManagement/TestArticleToHideLater"
146-
When I perform the "Hide" action
146+
And I perform the "Hide" action
147147
And I select hide "later" for field options
148148
And I perform the "Confirm" action
149149
And I should be on Content view Page for "ContentManagement/TestArticleToHideLater"
150-
Then I should see the alert contains "This Content item will be hidden and won't be publicly available after" appear
150+
And I should see the alert contains "This Content item will be hidden and won't be publicly available after" appear
151151
When I run the scheduled jobs
152152
And I clear the behat cache directory
153153
Then I should see the alert "This Content item or its Location is hidden." appear
@@ -161,10 +161,10 @@ Scenario: Content can be copied
161161
| title | short_title | intro |
162162
| TestArticleToCancelHideLater | TestArticleToCancelHideLater | TestArticleIntro |
163163
And I'm on Content view Page for "ContentManagement/TestArticleToCancelHideLater"
164-
When I perform the "Hide" action
164+
And I perform the "Hide" action
165165
And I select hide "later" for field options
166166
And I perform the "Confirm" action
167167
And I should be on Content view Page for "ContentManagement/TestArticleToCancelHideLater"
168-
Then I should see the alert contains "This Content item will be hidden and won't be publicly available after" appear
168+
And I should see the alert contains "This Content item will be hidden and won't be publicly available after" appear
169169
When I cancel scheduled hiding of the content item
170170
Then I should see the alert "Canceled scheduled hiding of Content item 'TestArticleToCancelHideLater'." appear

src/lib/Behat/Component/CancelContentDialog.php

Lines changed: 0 additions & 30 deletions
This file was deleted.

src/lib/Behat/Page/ContentViewPage.php

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -95,8 +95,6 @@ class ContentViewPage extends Page
9595

9696
private TableBuilder $tableBuilder;
9797

98-
private ?CancelContentDialog $cancelContentDialog;
99-
10098
public function __construct(
10199
Session $session,
102100
Router $router,
@@ -115,8 +113,7 @@ public function __construct(
115113
UpperMenu $upperMenu,
116114
DeleteContentDialog $deleteContentDialog,
117115
CreateUrlAliasModal $createUrlAliasModal,
118-
TableBuilder $tableBuilder,
119-
?CancelContentDialog $cancelContentDialog = null
116+
TableBuilder $tableBuilder
120117
) {
121118
parent::__construct($session, $router);
122119

@@ -136,16 +133,12 @@ public function __construct(
136133
$this->deleteContentDialog = $deleteContentDialog;
137134
$this->createUrlAliasModal = $createUrlAliasModal;
138135
$this->tableBuilder = $tableBuilder;
139-
$this->cancelContentDialog = $cancelContentDialog;
140136
}
141137

142-
public function startCreatingContent(string $contentTypeName, ?string $language = null)
138+
public function startCreatingContent(string $contentTypeName)
143139
{
144140
$this->contentActionsMenu->clickButton('Create content');
145141
$this->contentTypePicker->verifyIsLoaded();
146-
if ($language !== null) {
147-
$this->contentTypePicker->selectLanguage($language);
148-
}
149142
$this->contentTypePicker->select($contentTypeName);
150143
$this->contentTypePicker->confirm();
151144
}
@@ -430,8 +423,6 @@ public function cancelScheduledHiding(): void
430423
{
431424
$this->getHTMLPage()->find($this->getLocator('cancelScheduleButton'))->click();
432425
$this->dialog->verifyIsLoaded();
433-
if ($this->cancelContentDialog !== null) {
434-
$this->cancelContentDialog->confirmCanceling('Cancel scheduled hiding');
435-
}
426+
$this->dialog->confirm();
436427
}
437428
}

0 commit comments

Comments
 (0)