-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ENH More Actions button is hidden if Campaign is published #288
ENH More Actions button is hidden if Campaign is published #288
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested locally, works good, some minor code changes
return State === 'open' | ||
? ( | ||
<PreviewComponent | ||
itemLinks={itemLinks} | ||
itemId={itemId} | ||
onBack={this.handleCloseItem} | ||
moreActions={this.getMoreActions()} | ||
className={previewClasses} | ||
/> | ||
) | ||
: ( | ||
<PreviewComponent | ||
itemLinks={itemLinks} | ||
itemId={itemId} | ||
onBack={this.handleCloseItem} | ||
className={previewClasses} | ||
/> | ||
); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
return State === 'open' | |
? ( | |
<PreviewComponent | |
itemLinks={itemLinks} | |
itemId={itemId} | |
onBack={this.handleCloseItem} | |
moreActions={this.getMoreActions()} | |
className={previewClasses} | |
/> | |
) | |
: ( | |
<PreviewComponent | |
itemLinks={itemLinks} | |
itemId={itemId} | |
onBack={this.handleCloseItem} | |
className={previewClasses} | |
/> | |
); | |
const props = { | |
itemLinks, | |
itemID, | |
onBack: this.handleCloseItem, | |
className: previewClasses, | |
}; | |
if (State) { | |
props.moreActions = this.getMoreActions(); | |
} | |
return <PreviewComponent {...props}/>; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated
tests/php/CampaignAdminTest.php
Outdated
@@ -159,4 +161,38 @@ public function testReadCampaign( | |||
$response = $this->get("/admin/campaigns/set/$changeSetID/show", null, ['Accept' => 'application/json']); | |||
$this->assertEquals($expectedResponseCode, $response->getStatusCode()); | |||
} | |||
|
|||
public function removeCampaignDataProvider() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
public function removeCampaignDataProvider() | |
public function provideRemoveCampaignItem(): array |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated
tests/php/CampaignAdminTest.php
Outdated
/** | ||
* @dataProvider removeCampaignDataProvider | ||
*/ | ||
public function testRemoveCampaignItem( | ||
bool $isPublished, | ||
bool $isWrongID, | ||
int $expectedResponseCode, | ||
) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/** | |
* @dataProvider removeCampaignDataProvider | |
*/ | |
public function testRemoveCampaignItem( | |
bool $isPublished, | |
bool $isWrongID, | |
int $expectedResponseCode, | |
) { | |
/** | |
* @dataProvider provideRemoveCampaignItem | |
*/ | |
public function testRemoveCampaignItem( | |
bool $isPublished, | |
bool $isWrongID, | |
int $expectedResponseCode, | |
): void { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated
28532dd
to
b088e1a
Compare
b088e1a
to
bdd34d7
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good
Description
Parent issue