Fix acceptance tests
This commit is contained in:
committed by
Veljko V
parent
e88aef03d9
commit
13eebc742c
@@ -6,7 +6,7 @@ import { Label, Inputs } from 'settings/components';
|
||||
|
||||
export default function InactiveSubscribers() {
|
||||
const [duration, setDuration] = useSetting('deactivate_subscriber_after_inactive_days');
|
||||
|
||||
const [trackingEnabled] = useSetting('tracking', 'enabled');
|
||||
return (
|
||||
<>
|
||||
<Label
|
||||
@@ -28,49 +28,56 @@ export default function InactiveSubscribers() {
|
||||
htmlFor=""
|
||||
/>
|
||||
<Inputs>
|
||||
<input
|
||||
type="radio"
|
||||
id="inactive-subscribers-disabled"
|
||||
value=""
|
||||
checked={duration === ''}
|
||||
onChange={onChange(setDuration)}
|
||||
/>
|
||||
<label htmlFor="inactive-subscribers-disabled">
|
||||
{t('never')}
|
||||
</label>
|
||||
<br />
|
||||
<input
|
||||
type="radio"
|
||||
id="inactive-subscribers-3-months"
|
||||
value="90"
|
||||
checked={duration === '90'}
|
||||
onChange={onChange(setDuration)}
|
||||
/>
|
||||
<label htmlFor="inactive-subscribers-3-months">
|
||||
{t('after3months')}
|
||||
</label>
|
||||
<br />
|
||||
<input
|
||||
type="radio"
|
||||
id="inactive-subscribers-6-months"
|
||||
value="180"
|
||||
checked={duration === '180'}
|
||||
onChange={onChange(setDuration)}
|
||||
/>
|
||||
<label htmlFor="inactive-subscribers-6-months">
|
||||
{t('after6months')}
|
||||
</label>
|
||||
<br />
|
||||
<input
|
||||
type="radio"
|
||||
id="inactive-subscribers-12-months"
|
||||
value="365"
|
||||
checked={duration === '365'}
|
||||
onChange={onChange(setDuration)}
|
||||
/>
|
||||
<label htmlFor="inactive-subscribers-12-months">
|
||||
{t('after12months')}
|
||||
</label>
|
||||
{!trackingEnabled && <p data-automation-id="inactive-subscribers-disabled">{t('disabledBecauseTrackingIs')}</p>}
|
||||
{trackingEnabled && (
|
||||
<div data-automation-id="inactive-subscribers-enabled">
|
||||
<input
|
||||
type="radio"
|
||||
id="inactive-subscribers-disabled"
|
||||
data-automation-id="inactive-subscribers-option-never"
|
||||
value=""
|
||||
checked={duration === ''}
|
||||
onChange={onChange(setDuration)}
|
||||
/>
|
||||
<label htmlFor="inactive-subscribers-disabled">
|
||||
{t('never')}
|
||||
</label>
|
||||
<br />
|
||||
<input
|
||||
type="radio"
|
||||
id="inactive-subscribers-3-months"
|
||||
value="90"
|
||||
checked={duration === '90'}
|
||||
onChange={onChange(setDuration)}
|
||||
/>
|
||||
<label htmlFor="inactive-subscribers-3-months">
|
||||
{t('after3months')}
|
||||
</label>
|
||||
<br />
|
||||
<input
|
||||
type="radio"
|
||||
id="inactive-subscribers-6-months"
|
||||
value="180"
|
||||
checked={duration === '180'}
|
||||
onChange={onChange(setDuration)}
|
||||
data-automation-id="inactive-subscribers-default"
|
||||
/>
|
||||
<label htmlFor="inactive-subscribers-6-months">
|
||||
{t('after6months')}
|
||||
</label>
|
||||
<br />
|
||||
<input
|
||||
type="radio"
|
||||
id="inactive-subscribers-12-months"
|
||||
value="365"
|
||||
checked={duration === '365'}
|
||||
onChange={onChange(setDuration)}
|
||||
/>
|
||||
<label htmlFor="inactive-subscribers-12-months">
|
||||
{t('after12months')}
|
||||
</label>
|
||||
</div>
|
||||
)}
|
||||
</Inputs>
|
||||
</>
|
||||
);
|
||||
|
@@ -27,7 +27,14 @@ export default function Reinstall() {
|
||||
htmlFor=""
|
||||
/>
|
||||
<Inputs>
|
||||
<button type="button" className="button" onClick={onClick}>{t('reinstallNow')}</button>
|
||||
<button
|
||||
type="button"
|
||||
className="button"
|
||||
onClick={onClick}
|
||||
data-automation-id="reinstall-button"
|
||||
>
|
||||
{t('reinstallNow')}
|
||||
</button>
|
||||
</Inputs>
|
||||
</>
|
||||
);
|
||||
|
@@ -24,7 +24,7 @@ export default function ShareData() {
|
||||
{t('readMore')}
|
||||
</a>
|
||||
</>
|
||||
)}
|
||||
)}
|
||||
htmlFor=""
|
||||
/>
|
||||
<Inputs>
|
||||
@@ -34,6 +34,7 @@ export default function ShareData() {
|
||||
value="1"
|
||||
checked={enabled === '1'}
|
||||
onChange={onChange(setEnabled)}
|
||||
data-automation-id="analytics-yes"
|
||||
/>
|
||||
<label htmlFor="share-data-enabled">
|
||||
{t('yes')}
|
||||
@@ -45,6 +46,7 @@ export default function ShareData() {
|
||||
value=""
|
||||
checked={enabled === ''}
|
||||
onChange={onChange(setEnabled)}
|
||||
data-automation-id="analytics-no"
|
||||
/>
|
||||
<label htmlFor="share-data-disabled">
|
||||
{t('no')}
|
||||
|
@@ -36,6 +36,7 @@ export default function TaskScheduler() {
|
||||
value="WordPress"
|
||||
checked={method === 'WordPress'}
|
||||
onChange={onChange(setMethod)}
|
||||
data-automation-id="wordress_cron_radio"
|
||||
/>
|
||||
<label htmlFor="cron_trigger-method-wordpress">
|
||||
{t('websiteVisitors')}
|
||||
@@ -47,6 +48,7 @@ export default function TaskScheduler() {
|
||||
value="MailPoet"
|
||||
checked={method === 'MailPoet'}
|
||||
onChange={onChange(setMethod)}
|
||||
data-automation-id="mailpoet_cron_radio"
|
||||
/>
|
||||
<label htmlFor="cron_trigger-method-mailpoet">
|
||||
{ReactStringReplace(t('mailpoetScript'),
|
||||
@@ -70,6 +72,7 @@ export default function TaskScheduler() {
|
||||
value="Linux Cron"
|
||||
checked={method === 'Linux Cron'}
|
||||
onChange={onChange(setMethod)}
|
||||
data-automation-id="linux_cron_radio"
|
||||
/>
|
||||
<label htmlFor="cron_trigger-method-cron">
|
||||
{t('serverCron')}
|
||||
|
@@ -21,6 +21,7 @@ export default function Tracking() {
|
||||
value="1"
|
||||
checked={enabled === '1'}
|
||||
onChange={onChange(setEnabled)}
|
||||
data-automation-id="tracking-enabled-radio"
|
||||
/>
|
||||
<label htmlFor="tracking-enabled">
|
||||
{t('yes')}
|
||||
@@ -32,6 +33,7 @@ export default function Tracking() {
|
||||
value=""
|
||||
checked={enabled === ''}
|
||||
onChange={onChange(setEnabled)}
|
||||
data-automation-id="tracking-disabled-radio"
|
||||
/>
|
||||
<label htmlFor="tracking-disabled">
|
||||
{t('no')}
|
||||
|
Reference in New Issue
Block a user