Created
July 31, 2018 16:40
-
-
Save DanielGallo/64c6512685ea4c5169bfa228a1d13a15 to your computer and use it in GitHub Desktop.
Getting and storing a grid cell value
This file contains 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/?classic#array-grid | |
describe('Grid', function() { | |
var recordTitle; | |
it('should get the cell text content', function() { | |
// Use the "getRecord" API to get a record's value | |
ST.grid('grid[title="Basic Grid"]') | |
.rowAt(1) | |
.getRecord() | |
.and(function(row) { | |
recordTitle = row.data.record.name; | |
}); | |
// Or, to get the cell's actual text content | |
/*ST.grid('grid[title="Basic Grid"]') | |
.rowAt(1) | |
.cellAt(0) | |
.get('innerText') | |
.and(function(future) { | |
recordTitle = future.data.innerText; | |
});*/ | |
}); | |
it('should compare the cell text with another value', function() { | |
expect(recordTitle).toContain('Voomm'); | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment