/*
 * Copyright (c) 2018, 2026, Oracle and/or its affiliates.
 * Licensed under The Universal Permissive License (UPL), Version 1.0
 * as shown at https://oss.oracle.com/licenses/upl/
 */
const RULENAME="wd-driver-sleep";const DESCRIPT="Do not use timed sleeps in tests, WebDriver commands automatically wait on BusyContext. "+"Ensure the application is properly reporting busy states for async activity.";const SHORT="Do not use timed sleeps in tests.";function Rule(){};Rule.prototype.getName=function(){return RULENAME};Rule.prototype.getShortDescription=function(){return SHORT};Rule.prototype.getDescription=function(){return DESCRIPT};Rule.prototype.register=function(){return{CallExpression:this._onCallExpr}};Rule.prototype._onCallExpr=function(ruleCtx,node){var cn=node.callee;if(cn&&cn.property&&cn.property.type==="Identifier"&&cn.property.name==="sleep"){if(cn.object&&cn.object.type==="Identifier"&&cn.object.name==="driver"){let issue=new ruleCtx.Issue("Do not use timed sleeps in tests. WebDriver commands automatically wait on BusyContext.");ruleCtx.reporter.addIssue(issue,ruleCtx)}}};module.exports=Rule;