Skip to content

Instantly share code, notes, and snippets.

@joelwatson
joelwatson / example.html
Created August 14, 2017 13:21
Choose HTML <select> option
https://developer.mozilla.org/en-US/docs/Web/HTML/Element/select
@joelwatson
joelwatson / spec.js
Created July 10, 2017 19:17
Click cell widget button
it('should click button widget in 3rd row', function () {
// fill in password field
ST.textField('[fieldLabel=Password]').type('a');
// click login button
ST.button('[text=Login]').click();
// do actions on Project Members grid
ST
.grid('[title^=Project Members]')
.rowAt(2) // get third row
.down('.x-btn') // traverse dom hierarchy to choose correct button
@joelwatson
joelwatson / data.csv
Created July 10, 2017 14:37
Simple example of a data-driven test using fast-csv
Make Model Price
Ford Escort 12000
Chevy Malibu 14000
Dodge Ram 20000
@joelwatson
joelwatson / arraygrid.js
Last active July 6, 2017 14:53
Selecting grid row based on column name and value with Page Object
http://examples.sencha.com/extjs/6.5.0/examples/kitchensink/?classic#array-grid
@joelwatson
joelwatson / combobox.js
Last active July 6, 2017 14:52
Asserting displayValue of ComboBox
Ext.define('Sandbox.view.test.combobox.Base', {
extend: 'Ext.form.field.ComboBox',
id: 'futureCmp',
displayField: 'text',
valueField: 'id',
store: {
fields: ['id', 'text'],
data: [
[1, 'Apples'],
[2, 'Oranges']
@joelwatson
joelwatson / iframeexample.html
Created July 5, 2017 17:27
Basic iframe interactions
http://www.littlewebhut.com/articles/html_iframe_example/
@joelwatson
joelwatson / arraygrid.js
Created July 5, 2017 14:36
Selecting grid row based on column name and value
http://examples.sencha.com/extjs/6.5.0/examples/kitchensink/?classic#array-grid
@joelwatson
joelwatson / combobox.js
Last active July 6, 2017 14:31
Retrieving value from ComboBox via displayField
Ext.define('Sandbox.view.test.combobox.Base', {
extend: 'Ext.form.field.ComboBox',
id: 'futureCmp',
displayField: 'text',
valueField: 'id',
store: {
fields: ['id', 'text'],
data: [
[1, 'Apples'],
[2, 'Oranges']
@joelwatson
joelwatson / index.html
Last active June 30, 2017 18:02
Interacting with native modals in Sencha Test
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title></title>
</head>
<body>
<input type="button" id="alert" onclick="onAlert()" value="Alert" />
<input type="button" id="prompt" onclick="onPrompt()" value="Prompt" />
@joelwatson
joelwatson / CheckBoxMenuItem.js
Created June 15, 2017 01:27
CheckBoxMenuItem Future
ST.future.define('CheckBoxMenuItem', {
extend: ST.future.Component,
playables: {
checked: {
is: function () {
var cmp = this.getComponent();
return cmp.checked;
},
wait: ['checkchange']
},