-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #119 from degica/update/declareCompatibility
Update KOMOJU Plugin for WooCommerce Cart Checkout Block & HPOS
- Loading branch information
Showing
11 changed files
with
78 additions
and
149 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
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 |
---|---|---|
|
@@ -39,31 +39,27 @@ Cypress.Commands.add('installWordpress', () => { | |
cy.contains('English (United States)').click(); | ||
cy.get('#language-continue').click(); | ||
|
||
cy.get('#weblog_title').type('Degica Mart').type('{selectAll}Degica Mart'); | ||
cy.get('#user_login').type('degica'); | ||
cy.get('#pass1').type('{selectAll}deg1kaX7reme!'); | ||
cy.get('#admin_email').type('[email protected]'); | ||
cy.get('#weblog_title').clear().type('Degica Mart'); | ||
cy.get('#user_login').clear().type('degica'); | ||
cy.get('#pass1').clear().type('deg1kaX7reme!'); | ||
cy.get('#admin_email').clear().type('[email protected]'); | ||
cy.get('#submit').click(); | ||
}); | ||
}); | ||
|
||
Cypress.Commands.add('signinToWordpress', () => { | ||
cy.visit('/wp-admin'); | ||
|
||
cy.window().then(win => { | ||
if (!win.document.querySelector('#loginform')) { | ||
cy.get('body').then(($body) => { | ||
if (!$body.find('#loginform').length) { | ||
cy.log('Already logged in'); | ||
return; | ||
} | ||
cy.log('Logging in'); | ||
|
||
cy.get('#user_login').type('degica').type('{selectAll}degica'); | ||
cy.wait(100); | ||
cy.get('#user_pass').type('deg1kaX7reme!'); | ||
cy.wait(100); | ||
cy.get('#wp-submit').click(); | ||
cy.get('#user_login').should('be.visible').clear().type('degica'); | ||
cy.get('#user_pass').should('be.visible').clear().type('deg1kaX7reme!'); | ||
cy.get('#wp-submit').should('be.visible').click(); | ||
}); | ||
cy.wait(1000); | ||
}); | ||
|
||
Cypress.Commands.add('installWooCommerce', () => { | ||
|
@@ -112,13 +108,13 @@ Cypress.Commands.add('setupKomoju', ( | |
) => { | ||
cy.visit('/wp-admin/admin.php?page=wc-settings&tab=komoju_settings§ion=api_settings'); | ||
|
||
cy.get('#komoju_woocommerce_secret_key').type('{selectAll}').type(secretKey); | ||
cy.get('#komoju_woocommerce_publishable_key').type('{selectAll}').type(publishableKey); | ||
cy.get('#komoju_woocommerce_secret_key').clear().type(secretKey); | ||
cy.get('#komoju_woocommerce_publishable_key').clear().type(publishableKey); | ||
cy.get('.komoju-endpoint-komoju_woocommerce_fields_url').then($element => { | ||
const $edit = $element.find('.komoju-endpoint-edit'); | ||
if ($edit.length > 0) { return cy.wrap($edit).click(); } | ||
}); | ||
cy.get('#komoju_woocommerce_fields_url').type('{selectAll}').type('https://multipay-staging.test.komoju.com/fields.js'); | ||
cy.get('#komoju_woocommerce_fields_url').clear().type('https://multipay-staging.test.komoju.com/fields.js'); | ||
cy.contains('Save changes').click(); | ||
|
||
cy.contains('Payment methods').click(); | ||
|
@@ -150,14 +146,14 @@ Cypress.Commands.add('goToStore', () => { | |
}); | ||
|
||
Cypress.Commands.add('fillInAddress', () => { | ||
cy.get('#billing-last_name').type('{selectAll}Johnson'); | ||
cy.get('#billing-first_name').type('{selectAll}Test'); | ||
cy.get('#billing-last_name').clear().type('Johnson'); | ||
cy.get('#billing-first_name').clear().type('Test'); | ||
cy.get('#billing-country').find('#components-form-token-input-0').type('Japan').first().click(); | ||
cy.get('#billing-state').find('input').type('Tokyo').first().click(); | ||
cy.get('#billing-postcode').type('{selectAll}180-0004'); | ||
cy.get('#billing-city').type('Musashino'); | ||
cy.get('#billing-address_1').type('address'); | ||
cy.get('#billing-phone').type('{selectAll}123123213213213'); | ||
cy.get('#billing-postcode').clear().type('180-0004'); | ||
cy.get('#billing-city').clear().type('Musashino'); | ||
cy.get('#billing-address_1').clear().type('address'); | ||
cy.get('#billing-phone').clear().type('123123213213213'); | ||
}); | ||
|
||
Cypress.Commands.add('iframe', { prevSubject: 'element' }, ($iframe) => { | ||
|
@@ -200,10 +196,8 @@ Cypress.Commands.add('addItemAndProceedToCheckout', () => { | |
} | ||
}); | ||
|
||
cy.get('.wc-block-mini-cart__button').click(); | ||
cy.wait(100); | ||
cy.contains('Go to checkout').click(); | ||
cy.wait(100); | ||
cy.get('.wc-block-mini-cart__button').should('be.visible').click(); | ||
cy.contains('Go to checkout').should('be.visible').click(); | ||
}); | ||
|
||
Cypress.Commands.add('clickPaymentTab', () => { | ||
|
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
Oops, something went wrong.