wc-e2e-page-objects
Version:
WooCommerce Page Objects to be used on end-to-end tests with Selenium WebDriver
76 lines (50 loc) • 3.96 kB
JavaScript
Object.defineProperty(exports, "__esModule", {
value: true
});
var _wpE2ePageObjects = require('wp-e2e-page-objects');
var _componentOrderDetails = require('../components/component-order-details');
var _componentOrderDetails2 = _interopRequireDefault(_componentOrderDetails);
var _componentOrderCustomerDetails = require('../components/component-order-customer-details');
var _componentOrderCustomerDetails2 = _interopRequireDefault(_componentOrderCustomerDetails);
var _componentOrderBillingAddress = require('../components/component-order-billing-address');
var _componentOrderBillingAddress2 = _interopRequireDefault(_componentOrderBillingAddress);
var _componentOrderShippingAddress = require('../components/component-order-shipping-address');
var _componentOrderShippingAddress2 = _interopRequireDefault(_componentOrderShippingAddress);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } /**
* @module CheckoutOrderReceivedPage
*/
/**
* External dependencies
*/
/**
* Internal dependencies
*/
var defaultArgs = {
components: {
orderDetails: _componentOrderDetails2.default,
customerDetails: _componentOrderCustomerDetails2.default,
billingAddress: _componentOrderBillingAddress2.default,
shippingAddress: _componentOrderShippingAddress2.default
}
};
/**
* The front-end Checkout success page.
*
* @extends Page
*/
var CheckoutOrderReceivedPage = function (_Page) {
_inherits(CheckoutOrderReceivedPage, _Page);
function CheckoutOrderReceivedPage(driver) {
var args = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
_classCallCheck(this, CheckoutOrderReceivedPage);
args = Object.assign(defaultArgs, args);
return _possibleConstructorReturn(this, (CheckoutOrderReceivedPage.__proto__ || Object.getPrototypeOf(CheckoutOrderReceivedPage)).call(this, driver, args));
}
return CheckoutOrderReceivedPage;
}(_wpE2ePageObjects.Page);
exports.default = CheckoutOrderReceivedPage;
module.exports = exports['default'];
;