Skip to content

Instantly share code, notes, and snippets.

View DanielGallo's full-sized avatar

Daniel Gallo DanielGallo

View GitHub Profile
@DanielGallo
DanielGallo / ModernSplitButton.js
Created December 18, 2017 22:48
Example Sencha Test suite for an Ext JS Modern SplitButton
describe('Split Buttons', function() {
it('Should find a particular Split Button', function() {
// Find the particular line of buttons we're interested in, by looking for the text "Raised".
// Then go up to the first parent Component.
// Then find a Split Button within that line, with the text "SMALL".
ST.button('[html=Raised] ^ component:first splitbutton[text=SMALL]')
.visible();
});
it('Should click on Menu button inside of Split Button', function() {
@DanielGallo
DanielGallo / RightClick.js
Created November 22, 2017 20:02
Example Sencha Test suite showing how to perform right-click actions in an Ext JS app
// This example demonstrates two methods of how to perform right-click actions on elements.
// Run this test suite against the following Ext JS example:
// http://examples.sencha.com/extjs/6.5.1/examples/classic/desktop/index.html
describe('Right Click', function() {
it('Should right-click on icon and show menu - Example 1', function() {
var driver = ST.defaultContext.driver;
// Pass in a locator (not a Ext Component Query, as WebDriver.io doesn't recognize them directly)
driver.rightClick('//span[text()="SystemStatus"]');
@DanielGallo
DanielGallo / SplitButton.js
Last active November 17, 2017 18:49
Example Sencha Test suite for an Ext JS Split Button
describe('Split Button', function() {
// Run this test suite against the following Kitchen Sink example:
// http://examples.sencha.com/extjs/6.5.1/examples/kitchensink/?classic#toolbar-menus
it('Should find the Split Button', function() {
ST.button('splitbutton[text=Split Button]')
.visible();
});
it('Should click the button part of the Split Button', function() {