Skip to content
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

log sendSignal for testing #77

Merged
Merged
Changes from all commits
Commits
File filter
Filter file types
Jump to
Jump to file
Failed to load files.

Always

Just for now

@@ -66,7 +66,8 @@ class HotDog extends Component {
const offerId = props.reward.offer_id;
const message = {
offerId,
actionId
actionId,
origin: 'rewards-hotdog',
};
this.messageBackground('rewardSignal', message);
}
@@ -119,7 +119,8 @@ class OfferCard extends Component {
const offerId = props.reward.offer_id;
const message = {
offerId,
actionId
actionId,
origin: 'rewards-card',
};
this.messageBackground('rewardSignal', message);
}
@@ -86,7 +86,8 @@ export function sendSignal(actionId, offerId) {
type: SEND_SIGNAL,
data: {
actionId,
offerId
offerId,
origin: 'rewards-panel'
}
};
}
@@ -93,7 +93,8 @@ describe('app/panel/actions/RewardsActions.js', () => {

const actionId = 'action_id';
const offerId = 'offer_id';
const expectedPayload = { data: { actionId, offerId }, type: SEND_SIGNAL };
const origin = 'rewards-panel';
const expectedPayload = { data: { actionId, offerId, origin }, type: SEND_SIGNAL };
store.dispatch(rewardsActions.sendSignal(actionId, offerId));

const actions = store.getActions();
@@ -50,15 +50,16 @@ class Rewards {
}

sendSignal(message) {
const { offerId, actionId } = message;
const { offerId, actionId, origin } = message;
const signal = {
origin: 'ghostery',
origin: origin ? `ghostery-${origin}` : 'ghostery',
type: 'offer-action-signal',
data: {
action_id: actionId,
offer_id: offerId
}
};
log('sendSignal: ', signal);
cliqz.modules['offers-v2'].background.actions.processRealEstateMessage(signal);
}

ProTip! Use n and p to navigate between commits in a pull request.