-
Notifications
You must be signed in to change notification settings - Fork 808
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix: Started page is not rendered in react in versions: v1.8.66-67 in…
… react #3348
- Loading branch information
1 parent
e713d57
commit e5f2b92
Showing
4 changed files
with
68 additions
and
9 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
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 |
---|---|---|
@@ -0,0 +1,36 @@ | ||
import { frameworks, url, initSurvey, getSurveyResult } from "../helper"; | ||
import { Selector } from "testcafe"; | ||
const assert = require("assert"); | ||
const title = `First Page is Started`; | ||
|
||
const json = { | ||
pages: [ | ||
{ elements: [{ type: "text", name: "name" }] }, | ||
{ | ||
elements: [ | ||
{ type: "text", name: "address" }, | ||
], | ||
} | ||
], | ||
firstPageIsStarted: true | ||
}; | ||
|
||
frameworks.forEach((framework) => { | ||
fixture`${framework} ${title}`.page`${url}${framework}`.beforeEach( | ||
async (t) => { | ||
await initSurvey(framework, json); | ||
} | ||
); | ||
|
||
test(`Enter data on first question`, async (t) => { | ||
await t.typeText(Selector(`input[type=text]`), "Jon Snow"); | ||
await t.click(`input[value=Start]`); | ||
await t.typeText(Selector(`input[type=text]`), "Winterfell"); | ||
await t.click(`input[value=Complete]`); | ||
const surveyResult = await getSurveyResult(); | ||
assert.deepEqual(surveyResult, { | ||
name: "Jon Snow", | ||
address: "Winterfell" | ||
}); | ||
}); | ||
}); |
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