Skip to content

Commit

Permalink
Update tracking with the new CTA
Browse files Browse the repository at this point in the history
  • Loading branch information
starsirius committed Jun 9, 2020
1 parent 673d5bc commit bb667e7
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 28 deletions.
34 changes: 8 additions & 26 deletions src/v2/Apps/Order/Components/__tests__/StickyFooter.jest.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,7 @@ describe("Sticky footer", () => {
<StickyFooter orderType="OFFER" artworkId="whatever" />
)

component
.find("a")
.at(0)
.simulate("click")
component.find("a").at(0).simulate("click")

expect(window.open).toHaveBeenCalledWith(
"https://www.artsy.net/buy-now-feature-faq",
Expand All @@ -50,10 +47,7 @@ describe("Sticky footer", () => {
</SystemContextProvider>
)

component
.find("a")
.at(1)
.simulate("click")
component.find("a").at(1).simulate("click")

expect(mediatorMock.trigger).toHaveBeenCalledWith(
"openOrdersContactArtsyModal",
Expand All @@ -79,13 +73,10 @@ describe("Sticky footer", () => {
const component = mount(
<Component orderType="OFFER" artworkId="whatever" />
)
component
.find(Link)
.at(0)
.simulate("click")
component.find(Link).at(0).simulate("click")
expect(dispatch).toBeCalledWith({
action_type: "Click",
subject: "read faq",
subject: "Visit our help center",
flow: "make offer",
type: "button",
})
Expand All @@ -99,10 +90,7 @@ describe("Sticky footer", () => {
<Component orderType="OFFER" artworkId="whatever" />
</SystemContextProvider>
)
component
.find(Link)
.last()
.simulate("click")
component.find(Link).last().simulate("click")

expect(dispatch).toBeCalledWith({
action_type: "Click",
Expand All @@ -120,13 +108,10 @@ describe("Sticky footer", () => {
const component = mount(
<Component orderType="BUY" artworkId="whatever" />
)
component
.find(Link)
.at(0)
.simulate("click")
component.find(Link).at(0).simulate("click")
expect(dispatch).toBeCalledWith({
action_type: "Click",
subject: "read faq",
subject: "Visit our help center",
flow: "buy now",
type: "button",
})
Expand All @@ -140,10 +125,7 @@ describe("Sticky footer", () => {
<Component orderType="BUY" artworkId="whatever" />
</SystemContextProvider>
)
component
.find(Link)
.last()
.simulate("click")
component.find(Link).last().simulate("click")

expect(dispatch).toBeCalledWith({
action_type: "Click",
Expand Down
4 changes: 2 additions & 2 deletions src/v2/Artsy/Analytics/Schema/Values.ts
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ export enum Subject {
* Buy now checkout flow
*/
BNMOAskSpecialist = "ask a specialist",
BNMOReadFAQ = "read faq",
BNMOReadFAQ = "Visit our help center",
BNMOProvideShipping = "provide shipping address",
BNMOArrangePickup = "arrange for pickup",
BNMOUseShippingAddress = "use shipping address",
Expand All @@ -252,7 +252,7 @@ export enum Subject {
AuctionAskSpecialist = "ask a specialist",
AuctionBuyerPremium = "Buyer premium",

CollectorFAQ = "collector faq",
CollectorFAQ = "Visit our help center",

ConsignLearnMore = "learn more",

Expand Down

0 comments on commit bb667e7

Please sign in to comment.