Revert ES6ification of end-to-end tests and add instructions for Windows
Because the tests are run directly by node, we have to use the CommonJS module syntax. We could run the thing through babel, but then we just have another babel. Windows instructions are from experience and may not be optimized.
This commit is contained in:
parent
9f04f94c65
commit
e66f2a6c3f
24 changed files with 103 additions and 52 deletions
|
@ -19,7 +19,7 @@ const request = require('request-promise-native');
|
|||
const cheerio = require('cheerio');
|
||||
const url = require("url");
|
||||
|
||||
export async function approveConsent(consentUrl) {
|
||||
module.exports.approveConsent = async function(consentUrl) {
|
||||
const body = await request.get(consentUrl);
|
||||
const doc = cheerio.load(body);
|
||||
const v = doc("input[name=v]").val();
|
||||
|
@ -28,4 +28,4 @@ export async function approveConsent(consentUrl) {
|
|||
const formAction = doc("form").attr("action");
|
||||
const absAction = url.resolve(consentUrl, formAction);
|
||||
await request.post(absAction).form({v, u, h});
|
||||
}
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue