Skip to content

Commit

Permalink
Merge pull request #5030 from rvykydal/test-error-report-log-editing
Browse files Browse the repository at this point in the history
webui: test editing of the log in error reporting dialog
  • Loading branch information
rvykydal authored Aug 11, 2023
2 parents b2e2cd0 + 7d65c93 commit e02759d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
1 change: 1 addition & 0 deletions ui/webui/src/components/Error.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,7 @@ export const CriticalError = ({ exception, isBootIso, reportLinkURL }) => {
onChange={setLogContent}
resizeOrientation="vertical"
id="critical-error-review-attached-log"
isDisabled={logContent === undefined || preparingReport}
rows={7}
/>
<FormHelperText isHidden={false}>
Expand Down
7 changes: 7 additions & 0 deletions ui/webui/test/check-basic
Original file line number Diff line number Diff line change
Expand Up @@ -152,5 +152,12 @@ class TestBasic(anacondalib.VirtInstallMachineCase):
# Reviewed log contains more than 100 lines
wait(lambda: int(m.execute(f"wc -l {logfile} | cut -d' ' -f1").strip()) > 100)

# Test editing of the log
user_text = "STRING_ADDED_BY_USER_TO_LOG"
b.set_input_text("#critical-error-review-attached-log", user_text)
b.click("#critical-error-modal .pf-c-button.pf-m-primary")
wait(lambda: (m.execute(f"cat {logfile}")) == user_text)


if __name__ == '__main__':
test_main()

0 comments on commit e02759d

Please sign in to comment.