Skip to content

Comments

setup jest-puppeteer for UI test#11

Merged
jywarren merged 2 commits intojywarren:plots2from
Shulammite-Aso:ui-tests
Jul 12, 2020
Merged

setup jest-puppeteer for UI test#11
jywarren merged 2 commits intojywarren:plots2from
Shulammite-Aso:ui-tests

Conversation

@Shulammite-Aso
Copy link

Has also created this at bevacqua/woofmark here bevacqua#73

@Shulammite-Aso
Copy link
Author

Hi @jywarren @NitinBhasneria i think this works fine now.

tagging @Shreyaa-sharmaa and @keshav234156 too. followed from here #7

Thanks!!

@jywarren
Copy link
Owner

This looks really great! Thank you!

describe('Title of the page', () => {
test('Title of the page', async () => {
const title = await page.title();
expect(title).toBe('woofmark');
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What would be some next steps in terms of basic tests we could add? Question for everybody! cc @NitinBhasneria @Shreyaa-sharmaa @keshav234156 🎉

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I will be adding the test for #2 and #3

@jywarren jywarren merged commit c197016 into jywarren:plots2 Jul 12, 2020
@cypherean
Copy link

I'll add the test for #5 here.
I think we'll have to plan the tests that we'll have here and the ones we have in PLE in regards to formatting. With every change that we'll have in here, we need to describe tests in PLE that'll make sure that none of the existing functions break and check that the change meets our requirements/ acts as was intended here.

@cypherean
Copy link

Hey @Shulammite-Aso this is not the same as #7 . The test you integrated there are merged into master where as this is merged in plots2. This PR doesn't integrate the tests into plots2. The only reason travis passed was because it couldn't find any tests to run at all since there are no included dependency of jest, puppeteer or jest-puppeteer in this one. Attaching screenshot of travis test:
Screenshot from 2020-07-14 16-04-16

The downside of this is that all the fixes and feature additions we make are merged into plots2 branch but the tests are only conducted on master branch which doesn't incorporate these changes, hence we won't be able to define our tests here. Please open a new PR with updated package.json, adding the required dependency and update travis.yml to include the test script. Similar to bevacqua#73.

Also, you might have to switch puppeteer to an older version. This is the output I receive while running npm install and I remember receiving the same when working on the Editor. Though we haven't faced any errors for the same, but let's be on the safe side so that we don't encounter any trouble in the future.
Screenshot from 2020-07-14 16-06-08

@cypherean cypherean mentioned this pull request Jul 14, 2020
@Shulammite-Aso
Copy link
Author

Hey @Shulammite-Aso this is not the same as #7 . The test you integrated there are merged into master where as this is merged in plots2. This PR doesn't integrate the tests into plots2. The only reason travis passed was because it couldn't find any tests to run at all since there are no included dependency of jest, puppeteer or jest-puppeteer in this one. Attaching screenshot of travis test:

Yes, have seen this already. Sorry about it. The dependencies would be included in the next test i'll be pushing, with the test script in travis.yml.

@NitinBhasneria
Copy link

NitinBhasneria commented Jul 14, 2020

I think @Shulammite-Aso you have got some small error in npm run scripts. Please fix this.
Screenshot from 2020-07-14 22-23-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.

4 participants