Skip to content
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

Merged
merged 3 commits into from
Nov 3, 2022

Conversation

vulongphan
Copy link
Collaborator

This PR uses puppeteer to test 8 different combinations of user uploading actions

@vulongphan vulongphan linked an issue Nov 2, 2022 that may be closed by this pull request
main.test.js Outdated

test('Click on treebtn without adding a conll file and a config file', async () => {
Copy link
Collaborator

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
Copy link
Collaborator

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 () => {
Copy link
Collaborator

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?

Copy link
Collaborator

@muhammed-abuodeh muhammed-abuodeh left a 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.

@muhammed-abuodeh muhammed-abuodeh merged commit f24fe62 into master Nov 3, 2022
@muhammed-abuodeh muhammed-abuodeh deleted the 26-add-tests-to-simulate-user-actions branch November 3, 2022 12:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add tests to simulate user actions - file upload actions
2 participants