@@ -223,9 +223,10 @@ describe('Importer2', function() {
223
223
await waitForColumnMapping ( ) ;
224
224
await driver . find ( '.test-importer-update-existing-records' ) . click ( ) ;
225
225
await driver . find ( '.test-importer-merge-fields-select' ) . click ( ) ;
226
- await driver . findContent (
226
+ await driver . findContentWait (
227
227
'.test-multi-select-menu .test-multi-select-menu-option' ,
228
- / C o u r s e I d /
228
+ / C o u r s e I d / ,
229
+ 100
229
230
) . click ( ) ;
230
231
await gu . sendKeys ( Key . ESCAPE ) ;
231
232
await gu . waitForServer ( ) ;
@@ -458,7 +459,7 @@ describe('Importer2', function() {
458
459
) ;
459
460
460
461
// Click 'Skip', and check that the column mapping section and preview both updated.
461
- await menu . findContent ( '.test-importer-column-match-menu-item' , / S k i p / ) . click ( ) ;
462
+ await menu . findContentWait ( '.test-importer-column-match-menu-item' , / S k i p / , 100 ) . click ( ) ;
462
463
await gu . waitForServer ( ) ;
463
464
assert . deepEqual ( await getColumnMatchingRows ( ) , [
464
465
{ destination : 'Name' , source : 'Name' } ,
@@ -484,7 +485,7 @@ describe('Importer2', function() {
484
485
485
486
// Click Country in the column mapping section, and clear the formula.
486
487
await driver . findContent ( '.test-importer-column-match-source' , / C o u n t r y / ) . click ( ) ;
487
- await driver . find ( '.test-importer-apply-formula' ) . click ( ) ;
488
+ await driver . findWait ( '.test-importer-apply-formula' , 100 ) . click ( ) ;
488
489
await gu . sendKeys ( await gu . selectAllKey ( ) , Key . DELETE , Key . ENTER ) ;
489
490
await gu . waitForServer ( ) ;
490
491
@@ -516,7 +517,7 @@ describe('Importer2', function() {
516
517
517
518
// We want to map the same column twice, which is not possible through the menu, so we will
518
519
// use the formula.
519
- await driver . find ( '.test-importer-apply-formula' ) . click ( ) ;
520
+ await driver . findWait ( '.test-importer-apply-formula' , 100 ) . click ( ) ;
520
521
await gu . sendKeys ( await gu . selectAllKey ( ) , Key . DELETE , '$Population' , Key . ENTER ) ;
521
522
await gu . waitForServer ( ) ;
522
523
assert . deepEqual ( await getColumnMatchingRows ( ) , [
@@ -541,7 +542,7 @@ describe('Importer2', function() {
541
542
542
543
// Click Country (with formula 'Skip') in the column mapping section, and start typing a formula.
543
544
await openSourceFor ( / C o u n t r y / ) ;
544
- await driver . find ( '.test-importer-apply-formula' ) . click ( ) ;
545
+ await driver . findWait ( '.test-importer-apply-formula' , 100 ) . click ( ) ;
545
546
await gu . sendKeys ( '$' ) ;
546
547
await gu . waitForServer ( ) ;
547
548
@@ -593,7 +594,7 @@ describe('Importer2', function() {
593
594
it ( 'should reflect mappings when import to new table is finished' , async function ( ) {
594
595
// Skip 'Population', so that we can test imports with skipped columns.
595
596
await openSourceFor ( / P o p u l a t i o n / ) ;
596
- await driver . findContent ( '.test-importer-column-match-menu-item' , 'Skip' ) . click ( ) ;
597
+ await driver . findContentWait ( '.test-importer-column-match-menu-item' , 'Skip' , 100 ) . click ( ) ;
597
598
await gu . waitForServer ( ) ;
598
599
599
600
// Finish importing, and check that the destination tables have the correct data.
@@ -681,14 +682,14 @@ describe('Importer2', function() {
681
682
682
683
// Set formula for 'Name' to 'city_name' by typing in the formula.
683
684
await openSourceFor ( / N a m e / ) ;
684
- await driver . find ( '.test-importer-apply-formula' ) . click ( ) ;
685
+ await driver . findWait ( '.test-importer-apply-formula' , 100 ) . click ( ) ;
685
686
await gu . sendKeys ( '$city_name' , Key . ENTER ) ;
686
687
await gu . waitForServer ( ) ;
687
688
688
689
// Map 'District' to 'city_district' via the column mapping menu.
689
690
await openSourceFor ( 'District' ) ;
690
691
const menu = gu . findOpenMenu ( ) ;
691
- await menu . findContent ( '.test-importer-column-match-menu-item' , / c i t y _ d i s t r i c t / ) . click ( ) ;
692
+ await menu . findContentWait ( '.test-importer-column-match-menu-item' , / c i t y _ d i s t r i c t / , 100 ) . click ( ) ;
692
693
await gu . waitForServer ( ) ;
693
694
694
695
// Check the column mapping section and preview both updated correctly.
@@ -715,9 +716,10 @@ describe('Importer2', function() {
715
716
// Now toggle 'Update existing records', and merge on 'Name' and 'District'.
716
717
await driver . find ( '.test-importer-update-existing-records' ) . click ( ) ;
717
718
await driver . find ( '.test-importer-merge-fields-select' ) . click ( ) ;
718
- await driver . findContent (
719
+ await driver . findContentWait (
719
720
'.test-multi-select-menu .test-multi-select-menu-option' ,
720
- / N a m e /
721
+ / N a m e / ,
722
+ 100
721
723
) . click ( ) ;
722
724
await driver . findContent (
723
725
'.test-multi-select-menu .test-multi-select-menu-option' ,
@@ -764,13 +766,13 @@ describe('Importer2', function() {
764
766
// we don't overwrite any values in the destination table. (A previous bug caused non-text
765
767
// skipped columns to overwrite data with default values, like 0.)
766
768
await openSourceFor ( / P o p u l a t i o n / ) ;
767
- await driver . find ( '.test-importer-apply-formula' ) . click ( ) ;
769
+ await driver . findWait ( '.test-importer-apply-formula' , 100 ) . click ( ) ;
768
770
await gu . sendKeys ( '$city_pop' , Key . ENTER ) ;
769
771
await gu . waitForServer ( ) ;
770
772
771
773
// For "Pop. '000", deliberately map a duplicate column (so we can later check if import succeeded).
772
774
await openSourceFor ( / P o p \. ' 0 0 0 / ) ;
773
- await driver . find ( '.test-importer-apply-formula' ) . click ( ) ;
775
+ await driver . findWait ( '.test-importer-apply-formula' , 100 ) . click ( ) ;
774
776
await gu . sendKeys ( '$city_pop' , Key . ENTER ) ;
775
777
await gu . waitForServer ( ) ;
776
778
0 commit comments