made test less dependent on python test data (#10424)

diff --git a/erpnext/schools/doctype/student_group_creation_tool/test_student_group_creation_tool.js b/erpnext/schools/doctype/student_group_creation_tool/test_student_group_creation_tool.js
index 366822e..a8567b3 100644
--- a/erpnext/schools/doctype/student_group_creation_tool/test_student_group_creation_tool.js
+++ b/erpnext/schools/doctype/student_group_creation_tool/test_student_group_creation_tool.js
@@ -19,9 +19,10 @@
 			cur_frm.set_value("program", "Standard Test");
 			frappe.tests.click_button('Get Courses');
 		},
-		() => frappe.timeout(0.5),
+		() => frappe.timeout(1),
 		() => {
-			assert.equal(cur_frm.doc.courses.length, 4, 'Successfully created groups using the tool');
+			let no_of_courses = $('input.grid-row-check.pull-left').size() - 1;
+			assert.equal(cur_frm.doc.courses.length, no_of_courses, 'Successfully created groups using the tool');
 		},
 
 		() => {