Skip to content

Commit

Permalink
fix: ignoreHttpsErrors
Browse files Browse the repository at this point in the history
  • Loading branch information
Toto-hitori committed May 5, 2024
1 parent 96aa9b5 commit 925c2d6
Show file tree
Hide file tree
Showing 17 changed files with 27 additions and 31 deletions.
10 changes: 5 additions & 5 deletions api/src/main/resources/application.properties
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ springdoc.api-docs.path=/swagger/api-docs
management.endpoints.web.exposure.include=prometheus
management.endpoint.prometheus.enabled=true

server.port=8443
server.ssl.key-alias=tomcat
server.ssl.key-store=/etc/letsencrypt/live/kiwiq.run.place/keystore.p12
server.ssl.key-store-type=PKCS12
server.ssl.key-store-password=${SSL_PASSWORD}
#server.port=8443
#server.ssl.key-alias=tomcat
#server.ssl.key-store=/etc/letsencrypt/live/kiwiq.run.place/keystore.p12
#server.ssl.key-store-type=PKCS12
#server.ssl.key-store-password=${SSL_PASSWORD}
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ defineFeature(feature, test => {

beforeAll(async () => {
browser = process.env.GITHUB_ACTIONS
? await puppeteer.launch()
? await puppeteer.launch({ ignoreHTTPSErrors: true })
: await puppeteer.launch({ headless: false, slowMo: 100, ignoreHTTPSErrors: true });
page = await browser.newPage();
//Way of setting up the timeout
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import { waitForPageToLoad } from '../e2e_utils/e2e_utils_timeout.js';

const { defineFeature, loadFeature }=require('jest-cucumber');
const puppeteer = require('puppeteer');
const setDefaultOptions = require("expect-puppeteer").setDefaultOptions;
Expand All @@ -9,14 +7,12 @@ let browser;


defineFeature(feature, test => {
let username = "t.login.neg.blnk_psw"
let user;
let password;
let username = "t.login.neg.blnk_psw";


beforeAll(async () => {
browser = process.env.GITHUB_ACTIONS
? await puppeteer.launch()
? await puppeteer.launch({ ignoreHTTPSErrors: true })
: await puppeteer.launch({ headless: false, slowMo: 100, ignoreHTTPSErrors: true });
page = await browser.newPage();
//Way of setting up the timeout
Expand All @@ -33,7 +29,7 @@ defineFeature(feature, test => {


given('A registered user in the root screen', async () => {
waitForPageToLoad();
await new Promise(resolve => setTimeout(resolve, 5000)); // Waiting for page to fully load
let header = await page.$eval("button[data-testid='Login']", (element) => {
return element.innerHTML
})
Expand All @@ -47,7 +43,7 @@ defineFeature(feature, test => {
});

and('User enters in the log in screen', async() => {
waitForPageToLoad();
await new Promise(resolve => setTimeout(resolve, 5000)); // Waiting for page to fully load
let header = await page.$eval("h2", (element) => {
return element.innerHTML
})
Expand All @@ -57,16 +53,16 @@ defineFeature(feature, test => {
});

and('User fills the form with his proper email but leaves the password in blank', async() => {
await expect(page).toFill("#user", user);
await expect(page).toFill("#password", password);
await expect(page).toFill("#user", username+"@test.com");
await expect(page).toFill("#password", "");
});

and('User presses the log in button', async() => {
await expect(page).toClick("button[data-testid='Login'");
});

then('Log in screen shows an informative error message and does not allow the user to log in', async() => {
waitForPageToLoad();
await new Promise(resolve => setTimeout(resolve, 5000)); // Waiting for page to fully load
let header = await page.$eval("div[class='chakra-alert__desc css-zzks76'", (element) => {
return element.innerHTML
})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ defineFeature(feature, test => {

beforeAll(async () => {
browser = process.env.GITHUB_ACTIONS
? await puppeteer.launch()
? await puppeteer.launch({ ignoreHTTPSErrors: true })
: await puppeteer.launch({ headless: false, slowMo: 100, ignoreHTTPSErrors: true });
page = await browser.newPage();
//Way of setting up the timeout
Expand Down
2 changes: 1 addition & 1 deletion webapp/e2e/steps/logout_positive_logged_user.steps.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ defineFeature(feature, test => {

beforeAll(async () => {
browser = process.env.GITHUB_ACTIONS
? await puppeteer.launch()
? await puppeteer.launch({ ignoreHTTPSErrors: true })
: await puppeteer.launch({ headless: false, slowMo: 100, ignoreHTTPSErrors: true });
page = await browser.newPage();
//Way of setting up the timeout
Expand Down
2 changes: 1 addition & 1 deletion webapp/e2e/steps/logout_positive_non_logged_user.steps.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ defineFeature(feature, test => {

beforeAll(async () => {
browser = process.env.GITHUB_ACTIONS
? await puppeteer.launch()
? await puppeteer.launch({ ignoreHTTPSErrors: true })
: await puppeteer.launch({ headless: false, slowMo: 100, ignoreHTTPSErrors: true });
page = await browser.newPage();
//Way of setting up the timeout
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ defineFeature(feature, test => {

beforeAll(async () => {
browser = process.env.GITHUB_ACTIONS
? await puppeteer.launch()
? await puppeteer.launch({ ignoreHTTPSErrors: true })
: await puppeteer.launch({ headless: false, slowMo: 100, ignoreHTTPSErrors: true });
page = await browser.newPage();
//Way of setting up the timeout
Expand Down
2 changes: 1 addition & 1 deletion webapp/e2e/steps/register_negative_blank_password.steps.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ defineFeature(feature, test => {

beforeAll(async () => {
browser = process.env.GITHUB_ACTIONS
? await puppeteer.launch()
? await puppeteer.launch({ ignoreHTTPSErrors: true })
: await puppeteer.launch({ headless: false, slowMo: 100, ignoreHTTPSErrors: true });
page = await browser.newPage();
//Way of setting up the timeout
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ defineFeature(feature, test => {

beforeAll(async () => {
browser = process.env.GITHUB_ACTIONS
? await puppeteer.launch()
? await puppeteer.launch({ ignoreHTTPSErrors: true })
: await puppeteer.launch({ headless: false, slowMo: 100, ignoreHTTPSErrors: true });
page = await browser.newPage();
//Way of setting up the timeout
Expand Down
2 changes: 1 addition & 1 deletion webapp/e2e/steps/register_negative_blank_username.steps.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ defineFeature(feature, test => {

beforeAll(async () => {
browser = process.env.GITHUB_ACTIONS
? await puppeteer.launch()
? await puppeteer.launch({ ignoreHTTPSErrors: true })
: await puppeteer.launch({ headless: false, slowMo: 100, ignoreHTTPSErrors: true });
page = await browser.newPage();
//Way of setting up the timeout
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ defineFeature(feature, test => {

beforeAll(async () => {
browser = process.env.GITHUB_ACTIONS
? await puppeteer.launch()
? await puppeteer.launch({ ignoreHTTPSErrors: true })
: await puppeteer.launch({ headless: false, slowMo: 100, ignoreHTTPSErrors: true });
page = await browser.newPage();
//Way of setting up the timeout
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ defineFeature(feature, test => {

beforeAll(async () => {
browser = process.env.GITHUB_ACTIONS
? await puppeteer.launch()
? await puppeteer.launch({ ignoreHTTPSErrors: true })
: await puppeteer.launch({ headless: false, slowMo: 100, ignoreHTTPSErrors: true });
page = await browser.newPage();
//Way of setting up the timeout
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ defineFeature(feature, test => {

beforeAll(async () => {
browser = process.env.GITHUB_ACTIONS
? await puppeteer.launch()
? await puppeteer.launch({ ignoreHTTPSErrors: true })
: await puppeteer.launch({ headless: false, slowMo: 100, ignoreHTTPSErrors: true });
page = await browser.newPage();
//Way of setting up the timeout
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ defineFeature(feature, test => {

beforeAll(async () => {
browser = process.env.GITHUB_ACTIONS
? await puppeteer.launch()
? await puppeteer.launch({ ignoreHTTPSErrors: true })
: await puppeteer.launch({ headless: false, slowMo: 100, ignoreHTTPSErrors: true });
page = await browser.newPage();
//Way of setting up the timeout
Expand Down
2 changes: 1 addition & 1 deletion webapp/e2e/steps/seeing_rules_positive.steps.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ defineFeature(feature, test => {

beforeAll(async () => {
browser = process.env.GITHUB_ACTIONS
? await puppeteer.launch()
? await puppeteer.launch({ ignoreHTTPSErrors: true })
: await puppeteer.launch({ headless: false, slowMo: 100, ignoreHTTPSErrors: true });
page = await browser.newPage();
//Way of setting up the timeout
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ defineFeature(feature, test => {

beforeAll(async () => {
browser = process.env.GITHUB_ACTIONS
? await puppeteer.launch()
? await puppeteer.launch({ ignoreHTTPSErrors: true })
: await puppeteer.launch({ headless: false, slowMo: 100, ignoreHTTPSErrors: true });
page = await browser.newPage();
//Way of setting up the timeout
Expand Down
2 changes: 1 addition & 1 deletion webapp/e2e/steps/seeing_stats_positive.steps.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ defineFeature(feature, test => {

beforeAll(async () => {
browser = process.env.GITHUB_ACTIONS
? await puppeteer.launch()
? await puppeteer.launch({ ignoreHTTPSErrors: true })
: await puppeteer.launch({ headless: false, slowMo: 100, ignoreHTTPSErrors: true });
page = await browser.newPage();
//Way of setting up the timeout
Expand Down

0 comments on commit 925c2d6

Please sign in to comment.