PATH:
home
/
lab2454c
/
carbonbullion.net
/
wp-content
/
plugins
/
woocommerce
/
e2e
/
tests
/
merchant
const { test, expect } = require( '@playwright/test' ); test.describe( 'Add New Coupon Page', () => { test.use( { storageState: 'e2e/storage/adminState.json' } ); test( 'can create new coupon', async ( { page } ) => { await page.goto( 'wp-admin/post-new.php?post_type=shop_coupon' ); await page.fill( '#title', `code-${ new Date().getTime().toString() }` ); await page.fill( '#woocommerce-coupon-description', 'test coupon' ); await page.fill( '#coupon_amount', '100' ); await page.click( '#publish' ); await expect( page.locator( 'div.notice.notice-success' ) ).toHaveText( 'Coupon updated.Dismiss this notice.' ); // delete the coupon await page.dispatchEvent( 'a.submitdelete', 'click' ); } ); } );
[-] product-settings.spec.js
[edit]
[-] order-status-filter.spec.js
[edit]
[-] order-emails.spec.js
[edit]
[-] customer-payment-page.spec.js
[edit]
[-] product-search.spec.js
[edit]
[+]
..
[-] settings-tax.spec.js
[edit]
[-] create-variable-product.spec.js
[edit]
[-] order-edit.spec.js
[edit]
[-] order-coupon.spec.js
[edit]
[-] product-import-csv.spec.js
[edit]
[-] create-shipping-classes.spec.js
[edit]
[-] create-coupon.spec.js
[edit]
[-] create-simple-product.spec.js
[edit]
[-] order-refund.spec.js
[edit]
[-] create-shipping-zones.spec.js
[edit]
[-] settings-general.spec.js
[edit]
[-] create-order.spec.js
[edit]
[-] page-loads.spec.js
[edit]
[-] product-edit.spec.js
[edit]
[-] order-search.spec.js
[edit]