-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy path00_Naked_URL.js
More file actions
53 lines (50 loc) · 1.72 KB
/
Copy path00_Naked_URL.js
File metadata and controls
53 lines (50 loc) · 1.72 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
// This test checks that the experiment loads even if there is no playerKey
// This will be the default behavior for most users, but we have a hard time
// testing it in cypress, because we need unique player keys so that empirica
// doesn't treat every test case as the same returning user, and preserve their
// state. So, this test just checks that the informed consent form renders,
// as this checks that the naked url is displaying the EmpiricaPlayer object
// corrrectly, and leaves the rest of the testing to the other tests.
const configJson = `{
"batchName": "cytest_00_naked_url",
"cdn": "test",
"treatmentFile": "projects/example/cypress.treatments.yaml",
"customIdInstructions": "none",
"platformConsent": "US",
"consentAddendum": "none",
"checkAudio": false,
"checkVideo": false,
"introSequence": "none",
"treatments": [
"cypress1_simple"
],
"payoffs": "equal",
"knockdowns": "none",
"dispatchWait": 3,
"launchDate": "immediate",
"centralPrereg": false,
"preregRepos": [],
"dataRepos": [
{
"owner": "Watts-Lab",
"repo": "deliberation-data-test",
"branch": "main",
"directory": "cypress_test_exports"
}
],
"videoStorage": "none",
"exitCodes": "none"
}`;
describe("Naked URL", { retries: { runMode: 2, openMode: 0 } }, () => {
beforeEach(() => {
// using beforeEach even though there is just one test, so that if we retry the test it will run again
cy.empiricaClearBatches();
cy.empiricaCreateCustomBatch(configJson, {});
cy.wait(3000); // wait for batch creation callbacks to complete
cy.empiricaStartBatch(1);
});
it("displays EmpiricaPlayer", () => {
cy.visit("http://localhost:3000/");
cy.contains("group discussion study");
});
});