-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1213 from City-of-Helsinki/develop
Release v2.0.31
- Loading branch information
Showing
153 changed files
with
15,731 additions
and
15,642 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,6 @@ | ||
node_modules/ | ||
dist/ | ||
build/ | ||
.env | ||
.env.example | ||
.travis.yml | ||
.docker-compose.yml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,34 +1,8 @@ | ||
const config = require('./config'); | ||
const testcafe = require('testcafe'); | ||
const { server } = config; | ||
|
||
async function setCookies(t) { | ||
const afterOneYear = new Date(); | ||
afterOneYear.setDate(afterOneYear.getDate() + 365); | ||
const url = await testcafe.ClientFunction(() => document.location.href)(); | ||
await t.setCookies({ | ||
name: 'city-of-helsinki-cookie-consents', | ||
// value: '{"city-of-helsinki-cookie-consents":true,"matomo":false}', | ||
value: '%7B%22city-of-helsinki-cookie-consents%22%3Atrue%2C%22matomo%22%3Atrue%7D', | ||
domain: `${server.address}`, | ||
path: '/', | ||
expires: afterOneYear, | ||
maxAge: 365 * 24 * 60 * 60, | ||
secure: false, | ||
httpOnly: false, | ||
sameSite: 'Strict', | ||
}) | ||
.navigateTo(url); | ||
} | ||
|
||
module.exports = { | ||
hooks: { | ||
test: { | ||
before: async t => { | ||
await setCookies(t); | ||
}, | ||
after: async () => { | ||
}, | ||
}, | ||
browsers: ["firefox:headless"], // Browsers to run tests on | ||
skipJsErrors: true, // Ignores JavaScript errors | ||
quarantineMode: { | ||
successThreshold: 1, | ||
attemptLimit: 10 | ||
}, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,16 @@ | ||
import { ClientFunction } from 'testcafe'; | ||
import { ClientFunction, Selector } from 'testcafe'; | ||
|
||
const config = require('../config'); | ||
|
||
export const getLocation = ClientFunction(() => document.location.href); | ||
|
||
export const getBaseUrl = () => `http://${config.server.address}:${config.server.port}`; | ||
|
||
export const acceptCookieConcent = async (t) => { | ||
if (t) { | ||
const cookieConsentApproveButton = Selector('button[data-testid="cookie-consent-approve-button"]'); | ||
await t | ||
.expect(cookieConsentApproveButton.exists).ok('Cookie consent approve button should exist') | ||
.click(cookieConsentApproveButton); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.