Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WiFi dialog: add dialog to the UI #1813

Merged
merged 56 commits into from
Jul 16, 2024
Merged
Changes from 1 commit
Commits
Show all changes
56 commits
Select commit Hold shift + click to select a range
42d06e0
Set up scripts for enabling/disabling WiFi network interface
jotaen Jun 13, 2024
d02832d
Fix bash style
jotaen Jun 13, 2024
9bbc056
Remove redundant entry
jotaen Jun 13, 2024
e245459
Add commentary
jotaen Jun 13, 2024
7637133
Read WiFi settings from CLI args
jotaen Jun 17, 2024
517af0e
Add mock scripts
jotaen Jun 17, 2024
3cf6e38
Parse CLI arguments
jotaen Jun 20, 2024
e0602d4
Allow to join open networks (no PSK)
jotaen Jun 26, 2024
7995bd4
Fix declaration of optional flags in help output
jotaen Jun 27, 2024
d6fdade
Clarify purpose of script
jotaen Jun 27, 2024
dece804
Validate length of —country flag
jotaen Jun 27, 2024
49c18cd
Simplify procedure for writing to file
jotaen Jun 27, 2024
0933a3a
Reference real scripts in comment
jotaen Jun 27, 2024
c4feb1f
Add script for printing marker section content
jotaen Jul 1, 2024
c80a86c
Add mock script
jotaen Jul 1, 2024
3937305
Add tests
jotaen Jul 1, 2024
565a7c9
Add backend endpoints and logic
jotaen Jul 1, 2024
6794c58
Add WiFi dialog (WIP)
jotaen Jul 1, 2024
e9f1f01
Fix docstring
jotaen Jul 1, 2024
810f91c
Merge branch 'wifi-dialog/2-print-marker' into wifi-dialog/3-backend
jotaen Jul 1, 2024
766b4eb
Add comment
jotaen Jul 1, 2024
e01f296
Merge branch 'wifi-dialog/3-backend' into wifi-dialog/4-frontend
jotaen Jul 1, 2024
e9dcb52
Nullify emtpy PSK
jotaen Jul 1, 2024
f9352bc
Phrasing of error message
jotaen Jul 2, 2024
e03c777
Direct to —help flag
jotaen Jul 2, 2024
25591db
Prepend >&2
jotaen Jul 2, 2024
b631631
Fix tests
jotaen Jul 2, 2024
20109f2
Merge branch 'wifi-dialog/2-print-marker' into wifi-dialog/3-backend
jotaen Jul 2, 2024
78e1db3
Merge branch 'wifi-dialog/3-backend' into wifi-dialog/4-frontend
jotaen Jul 2, 2024
210fbc4
Formatting
jotaen Jul 2, 2024
e3a3bcb
Clean ups
jotaen Jul 2, 2024
232e446
Add missing `assertRaises`
jotaen Jul 3, 2024
7ee0a82
Rephrase error message
jotaen Jul 3, 2024
e72f888
Remove unused variabel
jotaen Jul 3, 2024
1e3f474
Omit unused return
jotaen Jul 3, 2024
c813305
Declare arg type in docstring
jotaen Jul 3, 2024
b093d97
Use `splitlines` instead of `split(‘\n’)`
jotaen Jul 3, 2024
0470c5f
Simplify camelcase
jotaen Jul 3, 2024
49bbaeb
Use more explicit HTTP paths
jotaen Jul 3, 2024
9ae036c
Merge branch 'wifi-dialog/3-backend' into wifi-dialog/4-frontend
jotaen Jul 3, 2024
567560d
Adjust paths
jotaen Jul 3, 2024
ac397d6
Ignore pylint warning
jotaen Jul 3, 2024
cd42056
Merge branch 'wifi-dialog/3-backend' into wifi-dialog/4-frontend
jotaen Jul 3, 2024
5143d67
Naming, commentary
jotaen Jul 3, 2024
41ed741
Fix
jotaen Jul 3, 2024
c1e92f7
Use `Wi-Fi` spelling
jotaen Jul 4, 2024
c113678
Phrasing of intro text
jotaen Jul 4, 2024
774f81c
Input field label/placeholder
jotaen Jul 4, 2024
c046544
Phrasing of “no-ethernet” warning
jotaen Jul 4, 2024
2ccccea
Guard initialization with a try/catch
jotaen Jul 4, 2024
974ed2e
Simplify refreshButtons
jotaen Jul 4, 2024
f08ae0a
Use Promise.all
jotaen Jul 4, 2024
fe0184b
Adjust title/button wording
jotaen Jul 5, 2024
a0fc9be
Add success state
jotaen Jul 5, 2024
8b239c6
Merge branch 'master' into wifi-dialog/4-frontend
jotaen Jul 5, 2024
a53bf0c
Wording of success state
jotaen Jul 16, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fix tests
  • Loading branch information
jotaen committed Jul 2, 2024
commit b6316319410a789832e2b5db472bcc662546a09f
Original file line number Diff line number Diff line change
Expand Up @@ -28,31 +28,51 @@ EOF

rejects-missing-input-arg() { #@test
run print-marker-sections
expected_output="$(cat << EOF
Input parameter missing: TARGET_FILE
Use the '--help' flag for more information
EOF
)"

[[ "${status}" == 1 ]]
[[ "${output}" == 'Input parameter missing: TARGET_FILE' ]]
[[ "${output}" == "${expected_output}" ]]
}

rejects-illegal-flag() { #@test
run print-marker-sections --foo
expected_output="$(cat << EOF
Unknown flag: --foo
Use the '--help' flag for more information
EOF
)"

[[ "${status}" == 1 ]]
[[ "${output}" == 'Illegal option: --foo' ]]
[[ "${output}" == "${expected_output}" ]]
}

rejects-non-existing-file() { #@test
run print-marker-sections foo-file.txt
expected_output="$(cat << EOF
Not a file: foo-file.txt
Use the '--help' flag for more information
EOF
)"

[[ "${status}" == 1 ]]
[[ "${output}" == 'Not a file: foo-file.txt' ]]
[[ "${output}" == "${expected_output}" ]]
}

rejects-non-file() { #@test
tmp_dir="$(mktemp --directory)"
run print-marker-sections "${tmp_dir}"
expected_output="$(cat << EOF
Not a file: ${tmp_dir}
Use the '--help' flag for more information
EOF
)"

[[ "${status}" == 1 ]]
[[ "${output}" == "Not a file: ${tmp_dir}" ]]
[[ "${output}" == "${expected_output}" ]]
}

empty-output-if-file-has-no-markers() { #@test
Expand Down