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

Integration Tests #136

Closed
6 tasks done
mfix22 opened this issue Nov 3, 2017 · 11 comments
Closed
6 tasks done

Integration Tests #136

mfix22 opened this issue Nov 3, 2017 · 11 comments

Comments

@mfix22
Copy link
Contributor

mfix22 commented Nov 3, 2017

  • Background Color Changes
  • Download
  • Drag and Drop updates code
  • Gist endpoints
  • Local Storage
  • Query Params
    - [ ] Backspacing, typing works (I know, obvious)
@bahmutov
Copy link
Contributor

bahmutov commented Jan 18, 2018

Would you be interested in Cypress tests? It integrates nicely with Now deploys too. I can make a PR.

@mfix22
Copy link
Contributor Author

mfix22 commented Jan 19, 2018

@bahmutov Yes exactly! Cypress is definitely our best bet!!! That would be absolutely amazing.

@wuweiweiwu
Copy link

@mfix22 Are there still some tests that still needs to be done? I would love to work on it!

@mfix22
Copy link
Contributor Author

mfix22 commented Mar 6, 2018

@wuweiweiwu absolutely! We still need integrations tests for confirming the download button succeeds, and also testing Drag and drop. Tests for any of the settings would also be a bonus 😄

That would help tremendously!

@wuweiweiwu
Copy link

@mfix22 Awesome! ill get a pr out in the next couple of days!

@wuweiweiwu
Copy link

@mfix22 Currently working on the download test but its a little weird as it creates an a that has the base64 dataurl but clicks and then immediately deletes it.

I've tried synchronously querying the dom for a elements after I click but have been unsuccessful in finding the element since I am trying to check for its existence.

https://docs.cypress.io/guides/core-concepts/conditional-testing.html#Dynamic-Text has been unsuccessful

@mfix22
Copy link
Contributor Author

mfix22 commented Mar 8, 2018

@wuweiweiwu is there a way to confirm that the download succeeds without checking for the existence of the a element? I am pretty sure Cypress has a way to check for something like this.

cc @bahmutov

@wuweiweiwu
Copy link

@mfix22 I hope so

the cypress documentation suggesting testing the mechanism of the actual download. But that doesn't seem to be helpful in this case.

There also seems to be some cypress issues related to this cypress-io/cypress#949

@Franky82dev
Copy link

Hi I'm new in Cypress and on Github. I am looking for a way to cut out a part of a called URL and save it in a variable that I can use elsewhere in the cypress test code. For example: "http://something.com/The_Thing_I_need/somthing_else"
const needfull ='The_Thing_I_need' ;

@mfix22
Copy link
Contributor Author

mfix22 commented Jun 19, 2018

@Franky82dev although this is outside the scope of this repo (: , you could just using normal JS variables like:

const url = "http://something.com/The_Thing_I_need/somthing_else"

const extract = s => {
  const m = /http:\/\/something\.com\/(.+)\/somthing_else/.exec(s)
  return m && m[1]
}

const extracted = extract(url) // "The_Thing_I_need"

or

const url = "http://something.com/The_Thing_I_need/somthing_else"

const extract = s => s.split("//")[1].split('/')[1]

const extracted = extract(url) // "The_Thing_I_need"

@mfix22
Copy link
Contributor Author

mfix22 commented Aug 9, 2018

I'm closing this and will open a new one for a new test of integration tests.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants