Skip to content

Commit 93adcd7

Browse files
author
Timur Karimov
committed
test
1 parent 0c4a296 commit 93adcd7

File tree

4 files changed

+19
-6
lines changed

4 files changed

+19
-6
lines changed

tests/e2e/config/jest.config.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ const e2ePaths = {
1212
subscriptions: path.resolve( __dirname, '../specs/subscriptions' ),
1313
blocks: path.resolve( __dirname, '../specs/blocks' ),
1414
upe: path.resolve( __dirname, '../specs/upe' ),
15-
upeSplit: path.resolve( __dirname, '../specs/upe-split' ),
1615
};
1716

1817
// Allow E2E tests to run specific tests - wcpay, subscriptions, blocks, all (default).

tests/e2e/specs/upe/shopper/shopper-deferred-intent-creation-upe-enabled.spec.js

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,16 @@ import {
1414
} from '../../../utils/payments';
1515
const { shopper, merchant } = require( '@woocommerce/e2e-utils' );
1616

17+
// const UPE_METHOD_CHECKBOXES = [
18+
// "//label[contains(text(), 'giropay')]/preceding-sibling::span/input[@type='checkbox']",
19+
// // "//label[contains(text(), 'Bancontact')]/preceding-sibling::span/input[@type='checkbox']",
20+
// // "//label[contains(text(), 'EPS')]/preceding-sibling::span/input[@type='checkbox']",
21+
// // "//label[contains(text(), 'iDEAL')]/preceding-sibling::span/input[@type='checkbox']",
22+
// // "//label[contains(text(), 'Sofort')]/preceding-sibling::span/input[@type='checkbox']",
23+
// ];
24+
1725
const UPE_METHOD_CHECKBOXES = [
18-
"//label[contains(text(), 'giropay')]/preceding-sibling::span/input[@type='checkbox']",
19-
"//label[contains(text(), 'Bancontact')]/preceding-sibling::span/input[@type='checkbox']",
20-
"//label[contains(text(), 'EPS')]/preceding-sibling::span/input[@type='checkbox']",
21-
"//label[contains(text(), 'iDEAL')]/preceding-sibling::span/input[@type='checkbox']",
22-
"//label[contains(text(), 'Sofort')]/preceding-sibling::span/input[@type='checkbox']",
26+
'#inspector-checkbox-control-7', // giropay
2327
];
2428

2529
describe( 'Enabled UPE with deferred intent creation', () => {
@@ -28,6 +32,7 @@ describe( 'Enabled UPE with deferred intent creation', () => {
2832
await merchantWCP.enablePaymentMethod( UPE_METHOD_CHECKBOXES );
2933
await merchant.logout();
3034
await shopper.login();
35+
console.log( 'a' );
3136
} );
3237

3338
afterAll( async () => {
@@ -39,11 +44,15 @@ describe( 'Enabled UPE with deferred intent creation', () => {
3944

4045
describe( 'Enabled UPE with deferred intent creation', () => {
4146
it( 'should successfully place order with Giropay', async () => {
47+
console.log( 'b' );
4248
await shopperWCP.goToShopWithCurrency( 'EUR' );
49+
console.log( 'c' );
4350
await setupProductCheckout(
4451
config.get( 'addresses.customer.billing' )
4552
);
53+
console.log( 'd' );
4654
await selectGiropayOnCheckout( page );
55+
console.log( 'e' );
4756
await shopper.placeOrder();
4857
await completeGiropayPayment( page, 'success' );
4958
await page.waitForNavigation( {

tests/e2e/utils/flows.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,9 +69,11 @@ export const shopperWCP = {
6969
},
7070

7171
goToShopWithCurrency: async ( currency ) => {
72+
console.log( 't' );
7273
await page.goto( SHOP_PAGE + `/?currency=${ currency }`, {
7374
waitUntil: 'networkidle0',
7475
} );
76+
console.log( 'h' );
7577
},
7678

7779
goToOrders: async () => {

tests/e2e/utils/payments.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -257,12 +257,14 @@ export async function setupProductCheckout(
257257
) {
258258
const cartItemsCounter = '.cart-contents .count';
259259

260+
console.log( 'productcheckout1' );
260261
await shopper.goToShop();
261262

262263
// Get the current number of items in the cart
263264
let cartSize = await page.$eval( cartItemsCounter, ( e ) =>
264265
Number( e.innerText.replace( /\D/g, '' ) )
265266
);
267+
console.log( 'productcheckout2' );
266268

267269
// Add items to the cart
268270
for ( const line of lineItems ) {
@@ -279,6 +281,7 @@ export async function setupProductCheckout(
279281
}
280282
}
281283

284+
console.log( 'productcheckout3' );
282285
await setupCheckout( billingDetails );
283286
}
284287

0 commit comments

Comments
 (0)