hootenanny-ui icon indicating copy to clipboard operation
hootenanny-ui copied to clipboard

Edit Export Cucumber Test for Check for Template Function

Open sisskind opened this issue 8 years ago • 0 comments

Currently not covered (in hoot/control/Export.js):

        function checkForTemplate(){
            var hidden=false;

            var exportType = d3.select('.fileExportFileType').value();
            var transType = d3.select('.fileExportTranslation').value();

            // Check if output type is File Geodatabase
            if (exportType===''){exportType=d3.select('.fileExportFileType').attr('placeholder');}
            if (transType===''){transType=d3.select('.fileExportTranslation').attr('placeholder');}

            if(exportType!=='File Geodatabase'){
                hidden=true;
            }

            var selTrans = _.find(transCombo,{'DESCRIPTION':transType});
            if(selTrans){
                if(selTrans.NAME.substring(0,3)!=='TDS'){
                    hidden=true;
                }
            } else {
                hidden=true;
            }

            d3.select('.cboxAppendFGDBTemplate').classed('hidden',hidden);
            if(hidden){
                d3.select('.cboxAppendFGDBTemplate').select('input').property('checked',false);
            }
        }

        function toggleForm(context) {
            var text = !(d3.select(context).classed('active'));
            d3.select(context)
                .classed('active', text);
        }
        return save;

sisskind avatar Sep 15 '16 17:09 sisskind