Merge pull request #17812 from woocommerce/update/wc-e2e-page-objects
Update wc-e2e-page-objects package to version 0.5.0
This commit is contained in:
commit
887003cc02
|
@ -45,7 +45,7 @@
|
|||
"istanbul": "^1.0.0-alpha",
|
||||
"mocha": "^3.0.2",
|
||||
"stylelint": "~8.2.0",
|
||||
"wc-e2e-page-objects": "0.4.0"
|
||||
"wc-e2e-page-objects": "0.5.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=6.9.4",
|
||||
|
|
|
@ -12,7 +12,8 @@ let manager;
|
|||
let driver;
|
||||
|
||||
test.describe( 'Cart page', function() {
|
||||
test.before( 'open browser', function() {
|
||||
// open browser
|
||||
test.before( function() {
|
||||
this.timeout( config.get( 'startBrowserTimeoutMs' ) );
|
||||
|
||||
manager = new WebDriverManager( 'chrome', { baseUrl: config.get( 'url' ) } );
|
||||
|
@ -93,7 +94,7 @@ test.describe( 'Cart page', function() {
|
|||
);
|
||||
} );
|
||||
|
||||
test.it( 'should go to the checkout page when "Proceed to Chcekout" is clicked', () => {
|
||||
test.it( 'should go to the checkout page when "Proceed to Checkout" is clicked', () => {
|
||||
const cartPage = new CartPage( driver, { url: manager.getPageUrl( '/cart' ) } );
|
||||
const checkoutPage = cartPage.checkout();
|
||||
|
||||
|
@ -104,7 +105,8 @@ test.describe( 'Cart page', function() {
|
|||
);
|
||||
} );
|
||||
|
||||
test.after( 'quit browser', () => {
|
||||
// quit browser
|
||||
test.after( () => {
|
||||
manager.quitBrowser();
|
||||
} );
|
||||
} );
|
||||
|
|
|
@ -26,7 +26,8 @@ let manager;
|
|||
let driver;
|
||||
|
||||
test.describe( 'Checkout Page', function() {
|
||||
test.before( 'open browser', function() {
|
||||
// open browser
|
||||
test.before( function() {
|
||||
this.timeout( config.get( 'startBrowserTimeoutMs' ) );
|
||||
|
||||
manager = new WebDriverManager( 'chrome', { baseUrl: config.get( 'url' ) } );
|
||||
|
@ -148,7 +149,8 @@ test.describe( 'Checkout Page', function() {
|
|||
);
|
||||
} );
|
||||
|
||||
test.after( 'quit browser', () => {
|
||||
// quit browser
|
||||
test.after( () => {
|
||||
manager.quitBrowser();
|
||||
} );
|
||||
} );
|
||||
|
|
|
@ -16,7 +16,8 @@ let manager;
|
|||
let driver;
|
||||
|
||||
test.describe( 'Single Product Page', function() {
|
||||
test.before( 'open browser', function() {
|
||||
// open browser
|
||||
test.before( function() {
|
||||
this.timeout( config.get( 'startBrowserTimeoutMs' ) );
|
||||
|
||||
manager = new WebDriverManager( 'chrome', { baseUrl: config.get( 'url' ) } );
|
||||
|
@ -52,7 +53,8 @@ test.describe( 'Single Product Page', function() {
|
|||
assert.eventually.equal( cartPage.hasItem( 'Hoodie - Green' ), true );
|
||||
} );
|
||||
|
||||
test.after( 'quit browser', () => {
|
||||
// quit browser
|
||||
test.after( () => {
|
||||
manager.quitBrowser();
|
||||
} );
|
||||
} );
|
||||
|
|
|
@ -12,7 +12,8 @@ let manager;
|
|||
let driver;
|
||||
|
||||
test.describe( 'Add New Coupon Page', function() {
|
||||
test.before( 'open browser', function() {
|
||||
// open browser
|
||||
test.before( function() {
|
||||
this.timeout( config.get( 'startBrowserTimeoutMs' ) );
|
||||
|
||||
manager = new WebDriverManager( 'chrome', { baseUrl: config.get( 'url' ) } );
|
||||
|
@ -45,7 +46,8 @@ test.describe( 'Add New Coupon Page', function() {
|
|||
assert.eventually.ok( couponPage.hasNotice( 'Coupon updated.' ) );
|
||||
} );
|
||||
|
||||
test.after( 'quit browser', () => {
|
||||
// quit browser
|
||||
test.after( () => {
|
||||
manager.quitBrowser();
|
||||
} );
|
||||
} );
|
||||
|
|
|
@ -12,7 +12,8 @@ let manager;
|
|||
let driver;
|
||||
|
||||
test.describe( 'Add New Order Page', function() {
|
||||
test.before( 'open browser', function() {
|
||||
// open browser
|
||||
test.before( function() {
|
||||
this.timeout( config.get( 'startBrowserTimeoutMs' ) );
|
||||
|
||||
manager = new WebDriverManager( 'chrome', { baseUrl: config.get( 'url' ) } );
|
||||
|
@ -46,7 +47,8 @@ test.describe( 'Add New Order Page', function() {
|
|||
assert.eventually.ok( orderNotes.hasNote( 'Order status changed from Pending payment to Processing.' ) );
|
||||
} );
|
||||
|
||||
test.after( 'quit browser', () => {
|
||||
// quit browser
|
||||
test.after( () => {
|
||||
manager.quitBrowser();
|
||||
} );
|
||||
} );
|
||||
|
|
|
@ -13,7 +13,8 @@ let manager;
|
|||
let driver;
|
||||
|
||||
test.describe( 'Add New Product Page', function() {
|
||||
test.before( 'open browser', function() {
|
||||
// open browser
|
||||
test.before( function() {
|
||||
this.timeout( config.get( 'startBrowserTimeoutMs' ) );
|
||||
|
||||
manager = new WebDriverManager( 'chrome', { baseUrl: config.get( 'url' ) } );
|
||||
|
@ -24,7 +25,8 @@ test.describe( 'Add New Product Page', function() {
|
|||
|
||||
this.timeout( config.get( 'mochaTimeoutMs' ) );
|
||||
|
||||
test.before( 'login', () => {
|
||||
// login
|
||||
test.before( () => {
|
||||
const wpLogin = new WPLogin( driver, { url: manager.getPageUrl( '/wp-login.php' ) } );
|
||||
wpLogin.login( config.get( 'users.admin.username' ), config.get( 'users.admin.password' ) );
|
||||
} );
|
||||
|
@ -121,7 +123,8 @@ test.describe( 'Add New Product Page', function() {
|
|||
assert.eventually.ok( product.hasNotice( '1 product moved to the Trash.' ) );
|
||||
} );
|
||||
|
||||
test.after( 'quit browser', () => {
|
||||
// quit browser
|
||||
test.after( () => {
|
||||
manager.quitBrowser();
|
||||
} );
|
||||
} );
|
||||
|
|
|
@ -13,7 +13,8 @@ let manager;
|
|||
let driver;
|
||||
|
||||
test.describe( 'WooCommerce General Settings', function() {
|
||||
test.before( 'open browser', function() {
|
||||
// open browser
|
||||
test.before( function() {
|
||||
this.timeout( config.get( 'startBrowserTimeoutMs' ) );
|
||||
|
||||
manager = new WebDriverManager( 'chrome', { baseUrl: config.get( 'url' ) } );
|
||||
|
@ -24,7 +25,8 @@ test.describe( 'WooCommerce General Settings', function() {
|
|||
|
||||
this.timeout( config.get( 'mochaTimeoutMs' ) );
|
||||
|
||||
test.before( 'login', () => {
|
||||
// login
|
||||
test.before( () => {
|
||||
const wpLogin = new WPLogin( driver, { url: manager.getPageUrl( '/wp-login.php' ) } );
|
||||
wpLogin.login( config.get( 'users.admin.username' ), config.get( 'users.admin.password' ) );
|
||||
} );
|
||||
|
@ -64,7 +66,8 @@ test.describe( 'WooCommerce General Settings', function() {
|
|||
assert.eventually.ok( settings.hasNotice( 'Your settings have been saved.' ) );
|
||||
} );
|
||||
|
||||
test.after( 'quit browser', () => {
|
||||
// quit browser
|
||||
test.after( () => {
|
||||
manager.quitBrowser();
|
||||
} );
|
||||
} );
|
||||
|
|
|
@ -13,7 +13,8 @@ let manager;
|
|||
let driver;
|
||||
|
||||
test.describe( 'WooCommerce Products > Downloadable Products Settings', function() {
|
||||
test.before( 'open browser', function() {
|
||||
// open browser
|
||||
test.before( function() {
|
||||
this.timeout( config.get( 'startBrowserTimeoutMs' ) );
|
||||
|
||||
manager = new WebDriverManager( 'chrome', { baseUrl: config.get( 'url' ) } );
|
||||
|
@ -24,7 +25,8 @@ test.describe( 'WooCommerce Products > Downloadable Products Settings', function
|
|||
|
||||
this.timeout( config.get( 'mochaTimeoutMs' ) );
|
||||
|
||||
test.before( 'login', () => {
|
||||
// login
|
||||
test.before( () => {
|
||||
const wpLogin = new WPLogin( driver, { url: manager.getPageUrl( '/wp-login.php' ) } );
|
||||
wpLogin.login( config.get( 'users.admin.username' ), config.get( 'users.admin.password' ) );
|
||||
} );
|
||||
|
@ -49,7 +51,8 @@ test.describe( 'WooCommerce Products > Downloadable Products Settings', function
|
|||
assert.eventually.ok( settings.hasNotice( 'Your settings have been saved.' ) );
|
||||
} );
|
||||
|
||||
test.after( 'quit browser', () => {
|
||||
// quit browser
|
||||
test.after( () => {
|
||||
manager.quitBrowser();
|
||||
} );
|
||||
} );
|
||||
|
|
|
@ -13,7 +13,8 @@ let manager;
|
|||
let driver;
|
||||
|
||||
test.describe( 'WooCommerce Tax Settings', function() {
|
||||
test.before( 'open browser', function() {
|
||||
// open browser
|
||||
test.before( function() {
|
||||
this.timeout( config.get( 'startBrowserTimeoutMs' ) );
|
||||
|
||||
manager = new WebDriverManager( 'chrome', { baseUrl: config.get( 'url' ) } );
|
||||
|
@ -24,7 +25,8 @@ test.describe( 'WooCommerce Tax Settings', function() {
|
|||
|
||||
this.timeout( config.get( 'mochaTimeoutMs' ) );
|
||||
|
||||
test.before( 'login', () => {
|
||||
// login
|
||||
test.before( () => {
|
||||
const wpLogin = new WPLogin( driver, { url: manager.getPageUrl( '/wp-login.php' ) } );
|
||||
wpLogin.login( config.get( 'users.admin.username' ), config.get( 'users.admin.password' ) );
|
||||
} );
|
||||
|
@ -93,7 +95,8 @@ test.describe( 'WooCommerce Tax Settings', function() {
|
|||
assert.eventually.ifError( settings.hasSubTab( 'Fancy rates' ) );
|
||||
} );
|
||||
|
||||
test.after( 'quit browser', () => {
|
||||
// quit browser
|
||||
test.after( () => {
|
||||
manager.quitBrowser();
|
||||
} );
|
||||
} );
|
||||
|
|
Loading…
Reference in New Issue