This file contains hidden or 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
| Meteor.methods({ | |
| 'fixtures.createEvent'(eventData) { | |
| check(eventData, Match.Maybe(Object)); | |
| // creation of fixture event data | |
| return createEvent(eventData || {}); | |
| }, | |
| }); | |
This file contains hidden or 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
| describe('Booking and payment via credit card', () => { | |
| let event; | |
| let userEmail; | |
| before(() => | |
| common.goToRoot() | |
| const guestUser = server.call('fixtures.createUser', { | |
| settings: { | |
| bookingType: true, | |
| }, |
This file contains hidden or 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
| click(clickElementSelector) { | |
| browser.scroll(clickElementSelector); | |
| browser.click(clickElementSelector); | |
| } |
This file contains hidden or 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
| describe('Event booking page', () => { | |
| const getPriceFromBooking = () => parseFloat(browser.getText('.price').slice(1)); | |
| it('Booking total price should be changed after changing guests number', () => { | |
| const guestsNumber = 2; | |
| const initPrice = getPriceFromBooking(); | |
| const selectField = browser.element('.guests-number-select-field'); | |
| selectField.click(); | |
| browser.waitForExist('.guests-count-select-field.active'); | |
| assert.equal(getPriceFromBooking(), initPrice * guestsnumber); |
This file contains hidden or 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
| 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']); | |
| }); | |
| }); |
This file contains hidden or 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
| 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/); |
This file contains hidden or 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
| 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', |
This file contains hidden or 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
| 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/); | |
| }); | |
| }); |
OlderNewer