Commit graph

130 commits

Author SHA1 Message Date
Meisam
c74d5b4f31
add shellcheck to CI (#2478)
* add shellcheck to ci

* test ci

* install bash for shellcheck

* set globstar for bash

* cleanup shell scripts

* do not ignore automated hls tests

* rm legacy build script

* update shell scripts

* cleanup ci

* Fix misspell

* cleanup ci

* fail on curl error in ci
2022-12-25 19:17:13 -08:00
Gabe Kangas
543d8f258f
Check offline banner values before scrolling in browser test 2022-12-21 17:36:11 -08:00
Gabe Kangas
2d4e53ce4b
Update text to reflect new text 2022-12-15 21:45:46 -08:00
Gabe Kangas
0d1684c1e0
Merge remote-tracking branch 'origin/develop' into webv2 2022-12-15 12:07:09 -08:00
Gabe Kangas
cdbb3b7a03
Update test to reflect content change 2022-12-13 19:17:04 -08:00
Gabe Kangas
6c169bc9b7
visible -> exist in browser tests 2022-12-12 22:54:51 -08:00
Gabe Kangas
014cc756bc
Only run css selector identifier tests to run on desktop 2022-12-12 00:22:31 -08:00
Gabe Kangas
14e4ca9c28
Change tab identifier 2022-12-11 21:16:29 -08:00
Gabe Kangas
c231fd3592
First pass at CSS identifiers + test to verify they are set. For #2193 2022-12-11 21:06:20 -08:00
Meisam
a7080a1fc1
validate response of federation APIs (#2408)
* validate json responses

* update deps

* tmp disable header check

* log all the webfinger fails

refactor and filter more malformed requests

* don't set incorrect serverURL strings

* test failing through admin api

* fix server url in fedi tests

* check response.text

* validate json/xml response of all apis

test Content-Type of api response and cleanup

* improve logs

* fix rebase

* cleanup json parser in api tests

* mark the api tests performed by admin

* Separate check for reading and format of serverURL

* test /federation/user/ with wrong username in ci
2022-12-10 21:10:10 -08:00
Gabe Kangas
eb1fc9706f
Add test for setting socket override and verify no errors are thrown on reload. Closes #2355 2022-12-08 18:37:10 -08:00
Gabe Kangas
3826f9380a
Listen for console errors in browser tests 2022-12-08 18:36:41 -08:00
Gabe Kangas
cb6c0a3495
Add api test to verify saving socket override. For #2355 2022-12-08 14:47:51 -08:00
Meisam
12ec4b15cd
use lib/admin.js functions in api tests (#2419) 2022-12-08 13:46:57 -08:00
Meisam
fd683f0a72
refactor chatuser api tests (#2416)
* block and unblock ipv6 explicitly

* refactor admin api tests

* use sendAdminPayload() for chatuser tests

* fix sendAdminRequests

* add getAdminResponse() to api test lib/admin.js

* some admin apis don't have response body

* cleanup test/automated/api/chatusers.test.js

* cleanup test/automated/api/chatusers.test.js

use getAdminResponse() to access admin apis
2022-12-08 10:07:54 -08:00
Meisam
43560cc65b
fix webfinger responses according to the specs (#2397)
* webfinger query with no resource should get 400

* check valid webfinger query

* test webfinger query

... without acct: or with wrong server

* add test for invalid user query from webfinger

* reorder the tests to decouple from state

cleanup
2022-12-07 16:26:06 -08:00
dependabot[bot]
0608a1d59f
Bump qs from 6.9.4 to 6.11.0 in /test/automated/api (#2417)
Bumps [qs](https://github.com/ljharb/qs) from 6.9.4 to 6.11.0.
- [Release notes](https://github.com/ljharb/qs/releases)
- [Changelog](https://github.com/ljharb/qs/blob/main/CHANGELOG.md)
- [Commits](https://github.com/ljharb/qs/compare/v6.9.4...v6.11.0)

---
updated-dependencies:
- dependency-name: qs
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-12-07 16:23:02 -08:00
dependabot[bot]
41e878b6a7
Bump decode-uri-component from 0.2.0 to 0.2.2 in /test/automated/hls (#2404)
Bumps [decode-uri-component](https://github.com/SamVerschueren/decode-uri-component) from 0.2.0 to 0.2.2.
- [Release notes](https://github.com/SamVerschueren/decode-uri-component/releases)
- [Commits](https://github.com/SamVerschueren/decode-uri-component/compare/v0.2.0...v0.2.2)

---
updated-dependencies:
- dependency-name: decode-uri-component
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-12-07 16:17:02 -08:00
dependabot[bot]
cadaab6c24
Bump decode-uri-component from 0.2.0 to 0.2.2 in /test/automated/api (#2405)
Bumps [decode-uri-component](https://github.com/SamVerschueren/decode-uri-component) from 0.2.0 to 0.2.2.
- [Release notes](https://github.com/SamVerschueren/decode-uri-component/releases)
- [Commits](https://github.com/SamVerschueren/decode-uri-component/compare/v0.2.0...v0.2.2)

---
updated-dependencies:
- dependency-name: decode-uri-component
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-12-07 16:16:43 -08:00
Meisam
a0933da8d1
consider ipv6 in chat user tests (#2415)
Co-authored-by: meisam <meisam@noreply.codeberg.org>
2022-12-06 14:29:05 -08:00
Gabe Kangas
0ecaf11a25
Merge remote-tracking branch 'origin/develop' into webv2 2022-11-29 16:37:29 -08:00
gabek
0e4e158d19 Prettified Code! 2022-11-29 16:05:44 -08:00
Meisam
0a8fc6e8c5 validate Nodeinfo response by schema (#2390)
* rm stable: 'false' from actions/setup-go@v3

* adapt tests from #2369

* set undefined as defaultStreamKey

pass adminpass to sendConfigChangeRequest()

* mv getAdminConfig to api/lib/config.js

* npm install --quiet for automated tests

* refactor tests

separate default values from new ones

* test adminpass change

fix defaultStreamKeys test

* fix defaultStreamKeys

* use getAdminStatus

* mv test/automated/lib/config.js to admin.js

* check default hideViewerCount

cleanup

* test more default options in api

erverName
SServerSummary
yp.instanceUrl
FederationConfig.username

* more testing of default config params

* update reference values for api test
2022-11-29 16:05:44 -08:00
Gabe Kangas
c4dc802941 Make stream keys objects with comment instead of string slice 2022-11-29 16:05:44 -08:00
Gabe Kangas
c9e3ccad45 API + Data changes to support split up of stream keys and admin passwords 2022-11-29 16:05:44 -08:00
Gabe Kangas
7393a18546
Additional test updates to reflect more changed defaults 2022-11-22 13:15:52 -08:00
Gabe Kangas
b0d651cfc0
Update UI tests to reflect new defaults 2022-11-22 13:06:37 -08:00
Gabe Kangas
5ca8271c6e
Test RTMP content stream script 2022-11-20 13:27:42 -08:00
Gabe Kangas
813f8692f0
Support color customization from the admin (#2338)
* Add user-customizable theming. Closes #1915

* Prettified Code!

* Add user-customizable theming. Closes #1915

* Add explicit color for page content background

* Prettified Code!

Co-authored-by: gabek <gabek@users.noreply.github.com>
2022-11-12 20:26:55 -08:00
dependabot[bot]
ded4673ae5
Bump socket.io-parser from 3.3.2 to 3.3.3 in /test/load (#2323)
Bumps [socket.io-parser](https://github.com/socketio/socket.io-parser) from 3.3.2 to 3.3.3.
- [Release notes](https://github.com/socketio/socket.io-parser/releases)
- [Changelog](https://github.com/socketio/socket.io-parser/blob/main/CHANGELOG.md)
- [Commits](https://github.com/socketio/socket.io-parser/compare/3.3.2...3.3.3)

---
updated-dependencies:
- dependency-name: socket.io-parser
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-11-12 08:19:25 -08:00
gabek
b67e0703cc Prettified Code! 2022-11-05 03:04:51 +00:00
Gabe Kangas
352447e3d4
Web UI frontend automated browser tests (#2223)
* First pass at basic browser tests for #1926

* Run tests against dev web server not go server

* Bundle the web code into the server before running tests

* Move cypress UI tests into its own npm project + add tests

* Add additional tests + wire up with cypress dashboard

* Limit concurrency of workflow jobs

* Temporarily comment out some tests that do not pass in mobile. Will fix later.
2022-11-04 20:04:13 -07:00
Gabe Kangas
ae7c02b421
Add support for public static files. Closes #2234 2022-10-27 22:30:39 -07:00
Gabe Kangas
f1a2a918c8
Change host in fixture script 2022-10-02 21:40:15 -07:00
Gabe Kangas
d69e3656e2
Add example welcome message in fixture data. 2022-10-02 21:38:50 -07:00
Gabe Kangas
c0dc2eb707
Run API tests inside Eartlhly 2022-09-04 17:14:44 -07:00
Gabe Kangas
681067ab93
Add custom offline message+api. Part of #1901 2022-08-09 22:09:43 -07:00
Gabe Kangas
d12f25f556
Merge branch 'develop' into webv2 2022-08-09 14:14:45 -07:00
Gabe Kangas
aead748c0d
Use the race detector when running automated tests. 2022-07-19 21:09:45 -07:00
Gabe Kangas
101359cfc3
Update test to reflect not treating summary as markdown 2022-07-12 17:54:30 -07:00
Gabe Kangas
5ec4fd62ad
Update test external action buttons 2022-07-12 17:32:27 -07:00
Gabe Kangas
f757c1c98d
Add script to populate page content 2022-07-12 14:50:32 -07:00
Gabe Kangas
506d1fa4cf
Merge remote-tracking branch 'origin/develop' into webv2 2022-07-11 21:21:07 -07:00
dependabot[bot]
fac6959254
Bump moment from 2.29.2 to 2.29.4 in /test/load (#1996)
Bumps [moment](https://github.com/moment/moment) from 2.29.2 to 2.29.4.
- [Release notes](https://github.com/moment/moment/releases)
- [Changelog](https://github.com/moment/moment/blob/develop/CHANGELOG.md)
- [Commits](https://github.com/moment/moment/compare/2.29.2...2.29.4)

---
updated-dependencies:
- dependency-name: moment
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-07-11 10:11:43 -07:00
Gabe Kangas
b08393295f
Add option to hide viewer count. Closes #1939 2022-06-26 00:46:55 -07:00
dependabot[bot]
0d42d4b85e
Bump jsdom from 16.4.0 to 16.7.0 in /test/automated/api (#1975)
Bumps [jsdom](https://github.com/jsdom/jsdom) from 16.4.0 to 16.7.0.
- [Release notes](https://github.com/jsdom/jsdom/releases)
- [Changelog](https://github.com/jsdom/jsdom/blob/master/Changelog.md)
- [Commits](https://github.com/jsdom/jsdom/compare/16.4.0...16.7.0)

---
updated-dependencies:
- dependency-name: jsdom
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-06-25 21:16:18 -07:00
dependabot[bot]
737d480f80
Bump jsdom from 16.4.0 to 16.7.0 in /test/automated/hls (#1976)
Bumps [jsdom](https://github.com/jsdom/jsdom) from 16.4.0 to 16.7.0.
- [Release notes](https://github.com/jsdom/jsdom/releases)
- [Changelog](https://github.com/jsdom/jsdom/blob/master/Changelog.md)
- [Commits](https://github.com/jsdom/jsdom/compare/16.4.0...16.7.0)

---
updated-dependencies:
- dependency-name: jsdom
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-06-25 21:16:04 -07:00
Gabe Kangas
3741196de6
Standardize endpoint name and fix doc. Closes #1966 2022-06-20 08:46:53 -07:00
Gabe Kangas
717db25d65
Remove no longer valid browser test 2022-05-09 13:08:08 -07:00
Gabe Kangas
b835de2dc4
IndieAuth support (#1811)
* Able to authenticate user against IndieAuth. For #1273

* WIP server indieauth endpoint. For https://github.com/owncast/owncast/issues/1272

* Add migration to remove access tokens from user

* Add authenticated bool to user for display purposes

* Add indieauth modal and auth flair to display names. For #1273

* Validate URLs and display errors

* Renames, cleanups

* Handle relative auth endpoint paths. Add error handling for missing redirects.

* Disallow using display names in use by registered users. Closes #1810

* Verify code verifier via code challenge on callback

* Use relative path to authorization_endpoint

* Post-rebase fixes

* Use a timestamp instead of a bool for authenticated

* Propertly handle and display error in modal

* Use auth'ed timestamp to derive authenticated flag to display in chat

* don't redirect unless a URL is present

avoids redirecting to `undefined` if there was an error

* improve error message if owncast server URL isn't set

* fix IndieAuth PKCE implementation

use SHA256 instead of SHA1, generates a longer code verifier (must be 43-128 chars long), fixes URL-safe SHA256 encoding

* return real profile data for IndieAuth response

* check the code verifier in the IndieAuth server

* Linting

* Add new chat settings modal anad split up indieauth ui

* Remove logging error

* Update the IndieAuth modal UI. For #1273

* Add IndieAuth repsonse error checking

* Disable IndieAuth client if server URL is not set.

* Add explicit error messages for specific error types

* Fix bad logic

* Return OAuth-keyed error responses for indieauth server

* Display IndieAuth error in plain text with link to return to main page

* Remove redundant check

* Add additional detail to error

* Hide IndieAuth details behind disclosure details

* Break out migration into two steps because some people have been runing dev in production

* Add auth option to user dropdown

Co-authored-by: Aaron Parecki <aaron@parecki.com>
2022-04-21 14:55:26 -07:00