docs(test-timeouts-js.md): fix inconsistent style of 'override' (#11766)

This commit is contained in:
Sanghyeon Lee 2022-02-02 08:59:30 +09:00 committed by GitHub
parent 6e2fcc4700
commit 731931ae58
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -12,9 +12,9 @@ Playwright Test has multiple configurable timeouts for various tasks.
|Timeout |Default |Description |
|:----------|:----------------|:--------------------------------|
|Test timeout|30000 ms|Timeout for each test, includes test, hooks and fixtures:<br/><span style={{textTransform:'uppercase',fontSize:'smaller',fontWeight:'bold',opacity:'0.6'}}>Set default</span><br/><code>{`config = { timeout: 60000 }`}</code><br/><span style={{textTransform: 'uppercase',fontSize: 'smaller', fontWeight: 'bold', opacity: '0.6'}}>Override</span><br/>```test.setTimeout(120000)``` |
|Expect timeout|5000 ms|Timeout for each assertion:<br/><span style={{textTransform:'uppercase',fontSize:'smaller',fontWeight:'bold',opacity:'0.6'}}>Set default</span><br/>```config = { expect: { timeout: 10000 } }```<br/><span >Override</span><br/>```expect(locator).toBeVisible({ timeout: 10000 })```|
|Action timeout| no timeout |Timeout for each action:<br/><span style={{textTransform:'uppercase',fontSize:'smaller',fontWeight:'bold',opacity:'0.6'}}>Set default</span><br/>```config = { use: { actionTimeout: 10000 } }```<br/><span >Override</span><br/>```locator.click({ timeout: 10000 })```|
|Navigation timeout| no timeout |Timeout for each navigation action:<br/><span style={{textTransform:'uppercase',fontSize:'smaller',fontWeight:'bold',opacity:'0.6'}}>Set default</span><br/>```config = { use: { navigationTimeout: 30000 } }```<br/><span >Override</span><br/>```page.goto('/', { timeout: 30000 })```|
|Expect timeout|5000 ms|Timeout for each assertion:<br/><span style={{textTransform:'uppercase',fontSize:'smaller',fontWeight:'bold',opacity:'0.6'}}>Set default</span><br/>```config = { expect: { timeout: 10000 } }```<br/><span style={{textTransform: 'uppercase',fontSize: 'smaller', fontWeight: 'bold', opacity: '0.6'}}>Override</span><br/>```expect(locator).toBeVisible({ timeout: 10000 })```|
|Action timeout| no timeout |Timeout for each action:<br/><span style={{textTransform:'uppercase',fontSize:'smaller',fontWeight:'bold',opacity:'0.6'}}>Set default</span><br/>```config = { use: { actionTimeout: 10000 } }```<br/><span style={{textTransform: 'uppercase',fontSize: 'smaller', fontWeight: 'bold', opacity: '0.6'}}>Override</span><br/>```locator.click({ timeout: 10000 })```|
|Navigation timeout| no timeout |Timeout for each navigation action:<br/><span style={{textTransform:'uppercase',fontSize:'smaller',fontWeight:'bold',opacity:'0.6'}}>Set default</span><br/>```config = { use: { navigationTimeout: 30000 } }```<br/><span style={{textTransform: 'uppercase',fontSize: 'smaller', fontWeight: 'bold', opacity: '0.6'}}>Override</span><br/>```page.goto('/', { timeout: 30000 })```|
|Global timeout|no timeout |Global timeout for the whole test run:<br/><span style={{textTransform:'uppercase',fontSize:'smaller',fontWeight:'bold',opacity:'0.6'}}>Set in config</span><br/>```config = { globalTimeout: 60*60*1000 }```<br/>|
## Test timeout