如何检查ListView中项目的信息是否正确显示。
我需要检查 TODO标题样本这是一个TextView和 TODO位置样本,这也是一个TextView使用Espresso正确显示此文本。我有以下代码,但它不起作用:
onData(anything()).inAdapterView(withId(R.id.to_do_list_view)).atPosition(0).
check(matches(withChild(withId(R.id.item_title)).matches(withText("TODO Title Sample"))));
知道如何解决它?
答案 0 :(得分:1)
我能够弄明白,而且非常简单:
$("#quickevent").on("click",function(){
var date = $("#date").val();
var username = "<?php echo $_SESSION['username']; ?>";
if(swim){
var color = $("#swimming").css("background-color");
var detail = $("#swimming").text();
}
if(dan){
var color = $("#dancing").css("background-color");
var detail = $("#dancing").text();
}
if(eat){
var color = $("#eating").css("background-color");
var detail = $("#eating").text();
}
if(read){
var color = $("#reading").css("background-color");
var detail = $("#reading").text();
}
if(skate){
var color = $("#skating").css("background-color");
var detail = $("#skating").text();
}
var svg_color = Snap("#svg");
var svg_element = svg_color.selectAll("#innercalendar");
svg_element.attr({fill: color});
$.post("postdb.php",{"date" : date,"color" : color,"username" : username, "detail" : detail},function(data,status){});
$("#date").val("");
});