Skip to content

armgit / fider

Public Imported from GitHub
0

Open platform to collect and prioritize feedback

fix: run E2E scripts on HTTPS (#536)

Guilherme Oenningf001dcfb049c
diff --git a/scripts/e2e.sh b/scripts/e2e.sh
index 1ef51dce4..35dea4f91 100755
--- a/scripts/e2e.sh
+++ b/scripts/e2e.sh
@@ -14,6 +14,7 @@ start_fider () {
-p 3000:3000 \
-e HOST_MODE=$1 \
-e DATABASE_URL=postgres://fider_e2e:fider_e2e_pw@$PG_CONTAINER:5432/fider_e2e?sslmode=disable \
+ -v `pwd`/etc:/app/etc \
--env-file .env \
--link $PG_CONTAINER \
--name $FIDER_CONTAINER getfider/fider:e2e
diff --git a/tests/lib/browser.ts b/tests/lib/browser.ts
index af22e2cc6..cddd7d109 100644
--- a/tests/lib/browser.ts
+++ b/tests/lib/browser.ts
@@ -11,7 +11,8 @@ export class Browser {
public static async launch(): Promise<Browser> {
const browser = await puppeteer.launch({
headless: true,
- devtools: false
+ devtools: false,
+ ignoreHTTPSErrors: true
});
return new Browser(browser);
}
diff --git a/tests/pages/SignUpPage.ts b/tests/pages/SignUpPage.ts
index 708865b94..de8f08cc8 100644
--- a/tests/pages/SignUpPage.ts
+++ b/tests/pages/SignUpPage.ts
@@ -32,6 +32,8 @@ export class SignUpPage extends Page {
public TenantName!: TextInput;
@findBy("#p-signup #input-subdomain")
public Subdomain!: TextInput;
+ @findBy("#p-signup #input-legalAgreement")
+ private LegalAgreement!: WebComponent;
@findBy("#p-signup .c-button.m-positive")
public Confirm!: Button;
@findBy("#p-signup .c-message.m-success")
@@ -59,6 +61,9 @@ export class SignUpPage extends Page {
await this.Subdomain.type(subdomain);
await this.tab.wait(elementIsVisible(this.SubdomainOk));
}
+ if (await this.LegalAgreement.isVisible()) {
+ await this.LegalAgreement.click();
+ }
await this.Confirm.click();
await this.tab.waitAny([pageHasLoaded(HomePage), elementIsVisible(this.ConfirmationModal)]);
}
diff --git a/tests/scenarios/email-signup.ts b/tests/scenarios/email-signup.ts
index e151c3eec..bdbbe1d90 100644
--- a/tests/scenarios/email-signup.ts
+++ b/tests/scenarios/email-signup.ts
@@ -7,7 +7,7 @@ describe("E2E: Sign up with e-mail", () => {
beforeAll(async () => {
browser = await Browser.launch();
- tab = await browser.newTab("http://login.dev.fider.io:3000");
+ tab = await browser.newTab("https://login.dev.fider.io:3000");
});
afterAll(async () => {
diff --git a/tests/scenarios/index.ts b/tests/scenarios/index.ts
index 6a855aa0f..9a81eee32 100644
--- a/tests/scenarios/index.ts
+++ b/tests/scenarios/index.ts
@@ -26,7 +26,7 @@ describe("E2E", () => {
const now = new Date().getTime();
const tenantName = `Selenium ${now}`;
const tenantSubdomain = process.env.HOST_MODE === "single" ? "login" : `selenium${now}`;
- const baseURL = `http://${tenantSubdomain}.dev.fider.io:3000`;
+ const baseURL = `https://${tenantSubdomain}.dev.fider.io:3000`;
const browser1 = await Browser.launch();
const tab1 = await browser1.newTab(baseURL);
const browser2 = await Browser.launch();