-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Sanyi
committed
Jun 28, 2024
1 parent
51bfed0
commit a6786ef
Showing
15 changed files
with
108 additions
and
110 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
'use strict'; | ||
|
||
describe('Default behaviour with everything turned off', function() { | ||
describe('Default behaviour with everything turned off', function () { | ||
before(() => { | ||
cy.task('setConfig', {}); | ||
}); | ||
|
@@ -14,13 +14,13 @@ describe('Default behaviour with everything turned off', function() { | |
cy.task('clearMails'); | ||
}); | ||
|
||
context('MarketingEvents - Customer', function() { | ||
context('MarketingEvents - Customer', function () { | ||
afterEach(() => { | ||
cy.task('clearEvents'); | ||
cy.logout(); | ||
}); | ||
|
||
it('should not create customer_password_reset event', function() { | ||
it('should not create customer_password_reset event', function () { | ||
const newPassword = 'newPassword1'; | ||
|
||
cy.loginWithCustomer(this.defaultCustomer); | ||
|
@@ -36,7 +36,7 @@ describe('Default behaviour with everything turned off', function() { | |
}); | ||
}); | ||
|
||
it('should not create customer_email_changed event', function() { | ||
it('should not create customer_email_changed event', function () { | ||
const oldEmail = this.defaultCustomer.email; | ||
const newEmail = '[email protected]'; | ||
|
||
|
@@ -52,7 +52,7 @@ describe('Default behaviour with everything turned off', function() { | |
}); | ||
}); | ||
|
||
it('should not create customer_email_and_password_changed event', function() { | ||
it('should not create customer_email_and_password_changed event', function () { | ||
const newEmail = '[email protected]'; | ||
const newPassword = 'newPassword4'; | ||
|
||
|
@@ -70,7 +70,7 @@ describe('Default behaviour with everything turned off', function() { | |
}); | ||
}); | ||
|
||
context('MarketingEvents - Subscription', function() { | ||
context('MarketingEvents - Subscription', function () { | ||
const unsubscribe = email => { | ||
cy.task('getSubscription', email).then(subscription => { | ||
cy.visit(`/newsletter/subscriber/unsubscribe?id=${subscription.subscriber_id}\ | ||
|
@@ -84,8 +84,8 @@ describe('Default behaviour with everything turned off', function() { | |
cy.get('.action.subscribe.primary[type="submit"]').click(); | ||
}; | ||
|
||
context('guest with double optin off', function() { | ||
it('should not create subscription events', function() { | ||
context('guest with double optin off', function () { | ||
it('should not create subscription events', function () { | ||
const guestEmail = '[email protected]'; | ||
subscribe(guestEmail); | ||
|
||
|
@@ -110,7 +110,7 @@ describe('Default behaviour with everything turned off', function() { | |
}); | ||
}); | ||
|
||
context('guest with double optin on', function() { | ||
context('guest with double optin on', function () { | ||
before(() => { | ||
cy.task('setDoubleOptin', true); | ||
cy.task('flushMagentoCache'); | ||
|
@@ -120,7 +120,7 @@ describe('Default behaviour with everything turned off', function() { | |
cy.task('setDoubleOptin', false); | ||
}); | ||
|
||
it('should not create subscription events', function() { | ||
it('should not create subscription events', function () { | ||
const guestEmail = '[email protected]'; | ||
subscribe(guestEmail); | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
'use strict'; | ||
|
||
describe('Marketing Events', function() { | ||
describe('Marketing Events', function () { | ||
beforeEach(() => { | ||
cy.task('clearMails'); | ||
cy.task('getDefaultCustomer').as('defaultCustomer'); | ||
|
@@ -10,7 +10,7 @@ describe('Marketing Events', function() { | |
cy.logout(); | ||
}); | ||
|
||
context('magentoSendEmails config is disabled', function() { | ||
context('magentoSendEmails config is disabled', function () { | ||
before(() => { | ||
cy.task('setConfig', { | ||
collectMarketingEvents: 'enabled', | ||
|
@@ -19,7 +19,7 @@ describe('Marketing Events', function() { | |
cy.task('clearEvents'); | ||
}); | ||
|
||
it('should create customer_password_reset event', function() { | ||
it('should create customer_password_reset event', function () { | ||
const newPassword = 'newPassword2'; | ||
|
||
cy.loginWithCustomer(this.defaultCustomer); | ||
|
@@ -36,7 +36,7 @@ describe('Marketing Events', function() { | |
}); | ||
}); | ||
|
||
it('should create customer_email_changed event', function() { | ||
it('should create customer_email_changed event', function () { | ||
const newEmail = '[email protected]'; | ||
|
||
cy.loginWithCustomer(this.defaultCustomer); | ||
|
@@ -53,7 +53,7 @@ describe('Marketing Events', function() { | |
}); | ||
}); | ||
|
||
it('should create customer_email_and_password_changed event', function() { | ||
it('should create customer_email_and_password_changed event', function () { | ||
const newEmail = '[email protected]'; | ||
const newPassword = 'newPassword3'; | ||
|
||
|
@@ -72,7 +72,7 @@ describe('Marketing Events', function() { | |
}); | ||
}); | ||
|
||
context('magentoSendEmails config is enabled', function() { | ||
context('magentoSendEmails config is enabled', function () { | ||
before(() => { | ||
cy.task('setConfig', { | ||
collectMarketingEvents: 'enabled', | ||
|
@@ -81,7 +81,7 @@ describe('Marketing Events', function() { | |
cy.task('clearEvents'); | ||
}); | ||
|
||
it('should create customer_password_reset event', function() { | ||
it('should create customer_password_reset event', function () { | ||
const newPassword = 'newPassword2'; | ||
|
||
cy.loginWithCustomer(this.defaultCustomer); | ||
|
@@ -98,7 +98,7 @@ describe('Marketing Events', function() { | |
}); | ||
}); | ||
|
||
it('should create customer_email_changed event', function() { | ||
it('should create customer_email_changed event', function () { | ||
const oldEmail = this.defaultCustomer.email; | ||
const newEmail = '[email protected]'; | ||
|
||
|
@@ -116,7 +116,7 @@ describe('Marketing Events', function() { | |
}); | ||
}); | ||
|
||
it('should create customer_email_and_password_changed event', function() { | ||
it('should create customer_email_and_password_changed event', function () { | ||
const oldEmail = this.defaultCustomer.email; | ||
const newEmail = '[email protected]'; | ||
const newPassword = 'newPassword3'; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
'use strict'; | ||
|
||
describe('Marketing Events', function() { | ||
describe('Marketing Events', function () { | ||
const unsubscribe = email => { | ||
cy.task('getSubscription', email).then(subscription => { | ||
cy.visit(`/newsletter/subscriber/unsubscribe?id=${subscription.subscriber_id}\ | ||
|
@@ -19,16 +19,16 @@ describe('Marketing Events', function() { | |
cy.task('clearEvents'); | ||
}); | ||
|
||
context('magentoSendEmails config is disabled', function() { | ||
context('magentoSendEmails config is disabled', function () { | ||
before(() => { | ||
cy.task('setConfig', { | ||
collectMarketingEvents: 'enabled', | ||
magentoSendEmail: 'disabled' | ||
}); | ||
}); | ||
|
||
context('guest with double optin off', function() { | ||
it('should create subscription events', function() { | ||
context('guest with double optin off', function () { | ||
it('should create subscription events', function () { | ||
const guestEmail = '[email protected]'; | ||
subscribe(guestEmail); | ||
|
||
|
@@ -56,7 +56,7 @@ describe('Marketing Events', function() { | |
}); | ||
}); | ||
|
||
context('guest with double optin on', function() { | ||
context('guest with double optin on', function () { | ||
before(() => { | ||
cy.task('setDoubleOptin', true); | ||
cy.task('flushMagentoCache'); | ||
|
@@ -66,7 +66,7 @@ describe('Marketing Events', function() { | |
cy.task('setDoubleOptin', false); | ||
}); | ||
|
||
it('should create newsletter_send_confirmation_request_email event', function() { | ||
it('should create newsletter_send_confirmation_request_email event', function () { | ||
const guestEmail = '[email protected]'; | ||
subscribe(guestEmail); | ||
|
||
|
@@ -95,16 +95,16 @@ describe('Marketing Events', function() { | |
}); | ||
}); | ||
|
||
context('magentoSendEmails config is enabled', function() { | ||
context('magentoSendEmails config is enabled', function () { | ||
before(() => { | ||
cy.task('setConfig', { | ||
collectMarketingEvents: 'enabled', | ||
magentoSendEmail: 'enabled' | ||
}); | ||
}); | ||
|
||
context('guest with double optin off', function() { | ||
it('should create subscription events', function() { | ||
context('guest with double optin off', function () { | ||
it('should create subscription events', function () { | ||
const guestEmail = '[email protected]'; | ||
subscribe(guestEmail); | ||
|
||
|
@@ -133,7 +133,7 @@ describe('Marketing Events', function() { | |
}); | ||
}); | ||
|
||
context('guest with double optin on', function() { | ||
context('guest with double optin on', function () { | ||
before(() => { | ||
cy.task('setDoubleOptin', true); | ||
cy.task('flushMagentoCache'); | ||
|
@@ -143,7 +143,7 @@ describe('Marketing Events', function() { | |
cy.task('setDoubleOptin', false); | ||
}); | ||
|
||
it('should create newsletter_send_confirmation_request_email event', function() { | ||
it('should create newsletter_send_confirmation_request_email event', function () { | ||
const guestEmail = '[email protected]'; | ||
subscribe(guestEmail); | ||
|
||
|
Oops, something went wrong.