File tree Expand file tree Collapse file tree 1 file changed +27
-0
lines changed
Expand file tree Collapse file tree 1 file changed +27
-0
lines changed Original file line number Diff line number Diff line change 1+ var assert = require ( "assert" ) ;
2+ var tester = require ( "../test-util/util.js" ) ;
3+ var webdriver = require ( "selenium-webdriver" ) ;
4+
5+ describe ( "Numbers at the REPL" , function ( ) {
6+ beforeEach ( tester . setup ) ;
7+ afterEach ( tester . teardown ) ;
8+
9+ it ( "should render toggle-able numbers" , function ( done ) {
10+ this . timeout ( 80000 ) ;
11+ var self = this ;
12+ this . browser . get ( this . base + "/editor" ) ;
13+ this . browser . wait ( function ( ) { return tester . pyretLoaded ( self . browser ) ; } ) ;
14+ tester . evalPyret ( this . browser , "1/7" ) ;
15+ console . log ( "Evaluated 1/7" ) ;
16+ this . browser . wait ( function ( ) {
17+ return self . browser . findElements ( webdriver . By . className ( "rationalRepeat" ) ) . then ( ( els ) => els . length > 0 ) ;
18+ } ) ;
19+ this . browser . findElements ( webdriver . By . className ( "rationalRepeat" ) ) . then ( function ( elements ) {
20+ elements [ 0 ] . getAttribute ( "innerText" ) . then ( function ( text ) {
21+ assert . equal ( text , "142857" ) ;
22+ } ) ;
23+ } ) ;
24+ this . browser . call ( done ) ;
25+
26+ } ) ;
27+ } ) ;
You can’t perform that action at this time.
0 commit comments