MOBILE-4470 behat: Fix grades behat tests
In LMS there was a nasty hack to return different content based on whether the site was running behat or not. This hack has been removed in MDL-77685, so now we can remove the isAutomated check from the grades code
This commit is contained in:
		
							parent
							
								
									66df465d15
								
							
						
					
					
						commit
						4dd7b45678
					
				@ -43,7 +43,6 @@ import { CoreError } from '@classes/errors/error';
 | 
				
			|||||||
import { CoreCourseHelper } from '@features/course/services/course-helper';
 | 
					import { CoreCourseHelper } from '@features/course/services/course-helper';
 | 
				
			||||||
import { CoreCourseModuleDelegate } from '@features/course/services/module-delegate';
 | 
					import { CoreCourseModuleDelegate } from '@features/course/services/module-delegate';
 | 
				
			||||||
import { CoreCourseAccess } from '@features/course/services/course-options-delegate';
 | 
					import { CoreCourseAccess } from '@features/course/services/course-options-delegate';
 | 
				
			||||||
import { CorePlatform } from '@services/platform';
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
export const GRADES_PAGE_NAME = 'grades';
 | 
					export const GRADES_PAGE_NAME = 'grades';
 | 
				
			||||||
export const GRADES_PARTICIPANTS_PAGE_NAME = 'participant-grades';
 | 
					export const GRADES_PARTICIPANTS_PAGE_NAME = 'participant-grades';
 | 
				
			||||||
@ -105,8 +104,8 @@ export class CoreGradesHelperProvider {
 | 
				
			|||||||
                row.rowclass += itemNameColumn.class.indexOf('hidden') >= 0 ? ' hidden' : '';
 | 
					                row.rowclass += itemNameColumn.class.indexOf('hidden') >= 0 ? ' hidden' : '';
 | 
				
			||||||
                row.rowclass += itemNameColumn.class.indexOf('dimmed_text') >= 0 ? ' dimmed_text' : '';
 | 
					                row.rowclass += itemNameColumn.class.indexOf('dimmed_text') >= 0 ? ' dimmed_text' : '';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                if (!useLegacyLayout && !CorePlatform.isAutomated()) {
 | 
					                if (!useLegacyLayout) {
 | 
				
			||||||
                    // Activity name is only included in the webservice response from the latest version when behat is not running.
 | 
					                    // Remove the "title" of the row (activity name, 'Manual item', 'Aggregation', etc.).
 | 
				
			||||||
                    content = content.replace(/<span[^>]+>.+?<\/span>/i, '');
 | 
					                    content = content.replace(/<span[^>]+>.+?<\/span>/i, '');
 | 
				
			||||||
                }
 | 
					                }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user