Skip to content

Instantly share code, notes, and snippets.

View Apiko-tutorials's full-sized avatar

Code Tutorials [by Apiko] Apiko-tutorials

View GitHub Profile
export const NotificationTypes = {
invitation: [SendMethod.email, SendMethod.push],
};
const SendMethod = {
SMS: 'SMS',
email: 'email',
push: 'push',
buildin: 'buildin',
};
const i18n = {
__(key, { _locale, ...context }) {
// ... localize string here
console.log('localize', key, 'for', _locale, 'with', context);
},
};
const localizedStrings = {
en: {
'notifications.invitation.email': 'Wellcome to our system. Click this {$link} to accept invitation. It will expire after {$expirationDate}',
'notifications.invitation.push': 'Invitation was sent to your email address',
},
// ... other languages
fr: {
// ...
},
};
describe('Status payment', () => {
it('transaction status should be "PAYMENT OPENED"', () => {
browser.waitForExist('.transaction_status');
const status = browser.getText('.transaction_status');
assert.equal(status, 'PAYMENT OPENED');
});
it('should be status spinner', () => {
assert.isTrue(browser.isExisting('.payment_status_loading'));
});
it('transaction status should be "PAYMENT SUCCESS" after 5 sec', () => {
describe('Payment service page', () => {
it('should be redirected to "Payment status" page after submit Payment service form', () => {
common.click('input[value="paid"]');
common.click('.confirm-payment');
browser.waitForExist('.payment_status .card--confirm');
assert.match(browser.getUrl(), /success/);
});
});
describe('Confirm payment page', () => {
const testUserAddress = {
givenName: 'John',
familyName: 'Smith',
countryName: 'NL',
city: 'Amsterdam',
street1: 'John M. Keynesplein',
street2: '12-45',
state: 'Noord-Holland',
zip: '1066 EP',
describe('Payment methods page', () => {
it('"Credit Card" payment method should be active', () => {
browser.waitForExist('li.creditcard');
});
it('Redirect to "Credit card payment" page after click on "Pay with Credit Card" button', () => {
common.click('li.creditcard');
browser.waitForExist('.payment-confirm');
const currentUrl = browser.getUrl();
assert.match(currentUrl, /payment/);
assert.match(currentUrl, /creditcard/);
describe('Event booking page', () => {
/*...*/
it('"Book" button should be exist', () => {
browser.waitForExist('.book-button');
});
it('Redirect to "Event detail" page after click on "Book" button', () => {
common.click('terms-checkbox');
common.click('#book-button');
browser.waitForExist('.dynamic--payment');
describe('Event booking page', () => {
/*...*/
it('should be error when do not agree with terms', () => {
common.click('.book-button');
browser.waitForExist('.terms-error');
assert.equal(browser.getText('.terms-error'), 'Please agree with our terms to continue');
common.click(selector['Booking terms checkbox']);
});
});