aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/e2e/src/utils
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2022-10-28 11:19:54 +0200
committerChocobozzz <me@florianbigard.com>2022-10-28 15:22:40 +0200
commit814e9e07ba65446af8446dbbd2f0d70c85fd1b33 (patch)
tree9c1f130d4a773208c5bdf33ec942be060e3c3ad2 /client/e2e/src/utils
parent672e185bf3004b46552c227483ffd2802ebf6844 (diff)
downloadPeerTube-814e9e07ba65446af8446dbbd2f0d70c85fd1b33.tar.gz
PeerTube-814e9e07ba65446af8446dbbd2f0d70c85fd1b33.tar.zst
PeerTube-814e9e07ba65446af8446dbbd2f0d70c85fd1b33.zip
Improve E2E tests
Add tests for private video static endpoints Fix tests for local firefox
Diffstat (limited to 'client/e2e/src/utils')
-rw-r--r--client/e2e/src/utils/elements.ts5
-rw-r--r--client/e2e/src/utils/hooks.ts8
-rw-r--r--client/e2e/src/utils/urls.ts5
3 files changed, 17 insertions, 1 deletions
diff --git a/client/e2e/src/utils/elements.ts b/client/e2e/src/utils/elements.ts
index 9d6cfe673..b0ddd5a65 100644
--- a/client/e2e/src/utils/elements.ts
+++ b/client/e2e/src/utils/elements.ts
@@ -6,7 +6,10 @@ async function getCheckbox (name: string) {
6} 6}
7 7
8async function selectCustomSelect (id: string, valueLabel: string) { 8async function selectCustomSelect (id: string, valueLabel: string) {
9 await $(`[formcontrolname=${id}] .ng-arrow-wrapper`).click() 9 const wrapper = $(`[formcontrolname=${id}] .ng-arrow-wrapper`)
10
11 await wrapper.waitForClickable()
12 await wrapper.click()
10 13
11 const option = await $$(`[formcontrolname=${id}] .ng-option`).filter(async o => { 14 const option = await $$(`[formcontrolname=${id}] .ng-option`).filter(async o => {
12 const text = await o.getText() 15 const text = await o.getText()
diff --git a/client/e2e/src/utils/hooks.ts b/client/e2e/src/utils/hooks.ts
index e139d8183..889cf1d86 100644
--- a/client/e2e/src/utils/hooks.ts
+++ b/client/e2e/src/utils/hooks.ts
@@ -68,5 +68,13 @@ function buildConfig (suiteFile: string = undefined) {
68 } 68 }
69 } 69 }
70 70
71 if (filename === 'signup.e2e-spec.ts') {
72 return {
73 signup: {
74 enabled: true
75 }
76 }
77 }
78
71 return {} 79 return {}
72} 80}
diff --git a/client/e2e/src/utils/urls.ts b/client/e2e/src/utils/urls.ts
index e82ff1b2e..a1c8283b5 100644
--- a/client/e2e/src/utils/urls.ts
+++ b/client/e2e/src/utils/urls.ts
@@ -1,4 +1,9 @@
1const FIXTURE_URLS = { 1const FIXTURE_URLS = {
2 INTERNAL_WEBTORRENT_VIDEO: 'https://peertube2.cpy.re/w/pwfz7NizSdPD4mJcbbmNwa?mode=webtorrent',
3 INTERNAL_HLS_VIDEO: 'https://peertube2.cpy.re/w/pwfz7NizSdPD4mJcbbmNwa',
4 INTERNAL_EMBED_WEBTORRENT_VIDEO: 'https://peertube2.cpy.re/videos/embed/pwfz7NizSdPD4mJcbbmNwa?mode=webtorrent',
5 INTERNAL_EMBED_HLS_VIDEO: 'https://peertube2.cpy.re/videos/embed/pwfz7NizSdPD4mJcbbmNwa',
6
2 WEBTORRENT_VIDEO: 'https://peertube2.cpy.re/w/122d093a-1ede-43bd-bd34-59d2931ffc5e', 7 WEBTORRENT_VIDEO: 'https://peertube2.cpy.re/w/122d093a-1ede-43bd-bd34-59d2931ffc5e',
3 8
4 HLS_EMBED: 'https://peertube2.cpy.re/videos/embed/969bf103-7818-43b5-94a0-de159e13de50', 9 HLS_EMBED: 'https://peertube2.cpy.re/videos/embed/969bf103-7818-43b5-94a0-de159e13de50',