Fixed and simplified tests
Gave buttons IDs for ease of access, fixed `fit-to` testing to better reflect purpose, and fixed occasional timing error in `testSkipFrame` caused by call overlap
This commit is contained in:
parent
019f61fda1
commit
5283e234a1
4 changed files with 16 additions and 16 deletions
|
|
@ -321,7 +321,7 @@ class Config extends React.Component {
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td className="top">
|
<td className="top">
|
||||||
<button className="btn btn-default" type="submit">Save</button>
|
<button id="btn-save-tlog-conf" className="btn btn-default" type="submit">Save</button>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<span style={{display: this.state.submitting}}>Saving...</span>
|
<span style={{display: this.state.submitting}}>Saving...</span>
|
||||||
|
|
@ -461,7 +461,7 @@ class SssdConfig extends React.Component {
|
||||||
</tr>
|
</tr>
|
||||||
}
|
}
|
||||||
<tr>
|
<tr>
|
||||||
<td><button className="btn btn-default" type="submit">Save</button></td>
|
<td><button id="btn-save-sssd-conf" className="btn btn-default" type="submit">Save</button></td>
|
||||||
<td>
|
<td>
|
||||||
<span style={{display: this.state.submitting}}>Saving...</span>
|
<span style={{display: this.state.submitting}}>Saving...</span>
|
||||||
</td>
|
</td>
|
||||||
|
|
|
||||||
|
|
@ -1276,7 +1276,7 @@ export class Player extends React.Component {
|
||||||
onClick={this.speedUp}>
|
onClick={this.speedUp}>
|
||||||
x2
|
x2
|
||||||
</button>
|
</button>
|
||||||
<span>{speedStr}</span>
|
<span id="player-speed">{speedStr}</span>
|
||||||
<span style={to_right}>
|
<span style={to_right}>
|
||||||
<span className="session_time">{formatDuration(this.currentTsPost)} / {formatDuration(this.buf.pos)}</span>
|
<span className="session_time">{formatDuration(this.currentTsPost)} / {formatDuration(this.buf.pos)}</span>
|
||||||
<button id="player-drag-pan" title="Drag'n'Pan" type="button" className="btn btn-default btn-lg"
|
<button id="player-drag-pan" title="Drag'n'Pan" type="button" className="btn btn-default btn-lg"
|
||||||
|
|
|
||||||
|
|
@ -970,7 +970,7 @@ class View extends React.Component {
|
||||||
<label className="control-label" htmlFor="config">{_("Configuration")}</label>
|
<label className="control-label" htmlFor="config">{_("Configuration")}</label>
|
||||||
</td>
|
</td>
|
||||||
<td className="top">
|
<td className="top">
|
||||||
<button className="btn btn-default" onClick={this.openConfig}><i className="fa fa-cog" aria-hidden="true" /></button>
|
<button id="btn-config" className="btn btn-default" onClick={this.openConfig}><i className="fa fa-cog" aria-hidden="true" /></button>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
|
|
|
||||||
|
|
@ -44,7 +44,7 @@ class TestApplication(MachineCase):
|
||||||
b.wait_attr(slider, "style", "left: 100%;")
|
b.wait_attr(slider, "style", "left: 100%;")
|
||||||
|
|
||||||
def testSpeedControls(self):
|
def testSpeedControls(self):
|
||||||
speed_val = ".panel-footer > span:nth-child(10)"
|
speed_val = "#player-speed"
|
||||||
b = self.browser
|
b = self.browser
|
||||||
m = self.machine
|
m = self.machine
|
||||||
self.login_and_go("/session-recording")
|
self.login_and_go("/session-recording")
|
||||||
|
|
@ -92,10 +92,11 @@ class TestApplication(MachineCase):
|
||||||
zoom_three_scale_sel = '.console-ct[style^="transform: scale(1.3)"]'
|
zoom_three_scale_sel = '.console-ct[style^="transform: scale(1.3)"]'
|
||||||
b = self.browser
|
b = self.browser
|
||||||
m = self.machine
|
m = self.machine
|
||||||
if m.image in ["rhel-8-0", "rhel-8-1", "rhel-8-2", "rhel-8-3"]:
|
zoom_fit_to = (
|
||||||
zoom_reset_scale_sel = '.console-ct[style*="transform: scale(0.8"]'
|
'.console-ct[style*="translate(-50%, -50%)"]'
|
||||||
else:
|
'[style*="top: 50%"]'
|
||||||
zoom_reset_scale_sel = '.console-ct[style*="transform: scale(0.9"]'
|
'[style*="left: 50%"]'
|
||||||
|
)
|
||||||
|
|
||||||
self.login_and_go("/session-recording")
|
self.login_and_go("/session-recording")
|
||||||
b.wait_present(".content-header-extra")
|
b.wait_present(".content-header-extra")
|
||||||
|
|
@ -113,9 +114,9 @@ class TestApplication(MachineCase):
|
||||||
# Zoom Out
|
# Zoom Out
|
||||||
b.click("#player-zoom-out")
|
b.click("#player-zoom-out")
|
||||||
b.wait_present(zoom_two_scale_sel)
|
b.wait_present(zoom_two_scale_sel)
|
||||||
# Reset Zoom
|
# Fit zoom to screen
|
||||||
b.click("#player-fit-to")
|
b.click("#player-fit-to")
|
||||||
b.wait_present(zoom_reset_scale_sel)
|
b.wait_present(zoom_fit_to)
|
||||||
|
|
||||||
def testSkipFrame(self):
|
def testSkipFrame(self):
|
||||||
term_first_line = ".xterm-accessibility-tree div:nth-child(1)"
|
term_first_line = ".xterm-accessibility-tree div:nth-child(1)"
|
||||||
|
|
@ -125,11 +126,10 @@ class TestApplication(MachineCase):
|
||||||
b.wait_present(".content-header-extra")
|
b.wait_present(".content-header-extra")
|
||||||
b.wait_present("#user")
|
b.wait_present("#user")
|
||||||
b.click(".listing-ct-item")
|
b.click(".listing-ct-item")
|
||||||
b.click("#player-skip-frame")
|
b.wait_present(term_first_line)
|
||||||
b.click("#player-skip-frame")
|
# loop until 3 valid frames have passed
|
||||||
b.click("#player-skip-frame")
|
while "localhost" not in b.text(term_first_line):
|
||||||
b.click("#player-skip-frame")
|
b.click("#player-skip-frame")
|
||||||
b.click("#player-skip-frame")
|
|
||||||
b.wait_timeout(20)
|
b.wait_timeout(20)
|
||||||
b.wait_in_text(term_first_line, "localhost")
|
b.wait_in_text(term_first_line, "localhost")
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue