Last active
November 29, 2018 23:47
-
-
Save DanielGallo/d6dd265ea4786b7900fa000b535dccf7 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
// Scenario URL: http://examples.sencha.com/extjs/6.5.3/examples/kitchensink/frame-index.html#array-grid | |
describe('Grid', function() { | |
it('should click a button on a grid row and check the popup message contains the clicked record name', function() { | |
var recordName; | |
// Locate the grid | |
ST.grid('array-grid') | |
.rowAt(2) | |
.getRecord() | |
.and(function(future) { | |
// Store the clicked row's record name, so it can be compared with the value shown in the popup messagebox shortly | |
recordName = future.data.record.name; | |
}) | |
.cellAt(5) | |
.down('>> .fa-check.green') // Click the button in the grid cell | |
.click(); | |
// Reference the popup messagebox | |
// Check the text value matches the clicked record name | |
ST.component('messagebox[title="Approve"]') | |
.down('>> .x-window-text') | |
.textLike(new RegExp(recordName)); | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment