-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
26 add tests to simulate user actions #27
26 add tests to simulate user actions #27
Conversation
main.test.js
Outdated
|
||
test('Click on treebtn without adding a conll file and a config file', async () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The goal of this test is to upload a config file, but not a conll file, and we expect it to show the dialogue message.
main.test.js
Outdated
page = await browser.newPage(); | ||
// await page.setContent(contentHtml, { waitUntil: "networkidle0" }); | ||
// await page.addScriptTag({path: "main.js"}); | ||
await page.goto("http://127.0.0.1:5500/viewtree.html"); // do this to be able to call functions in main.js, might need to direct the browser at this url |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use https://camel-lab.github.io/palmyra/viewtree.html , it works! This way, we test what annotators are using online, and it isn't restricted to your local configuration.
expect(testingPosTagsText).toEqual(expectedPosTagsText); | ||
}); | ||
|
||
test('Click on treebtn with adding a conll file', async () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is it possible to also assert the number of sentences/trees?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is great! I added a few minor comments to improve tests.
This PR uses puppeteer to test 8 different combinations of user uploading actions