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

Fix/646 how to button disable on save and edit test #682

Merged
merged 6 commits into from
Oct 21, 2019

Conversation

chrismclarke
Copy link
Member

closes #646

Frontend

  • bunch of refactoring to better recognise and respond to how-to upload status and remove some duplicate code

Tests

  • Removed 6000 wait (add methods for correct button availability)
  • Add edit how-to test

@chrismclarke chrismclarke requested a review from tmhung88 October 15, 2019 13:42
@cypress
Copy link

cypress bot commented Oct 15, 2019



Test summary

21 3 10 0


Run details

Project onearmy-community-platform
Status Failed
Commit 3978605
Started Oct 21, 2019 1:05 PM
Ended Oct 21, 2019 1:14 PM
Duration 08:59 💡
OS Linux Ubuntu Linux - 14.04
Browser Electron 61

View run in Cypress Dashboard ➡️


Failures

events.spec.ts Failed
1 [Events] > [List events] > [By Everyone]
howto/read.spec.ts Failed
1 [How To] > [List how-tos] > [By Everyone]
2 [How To] > [Filter with Tag] > [By Everyone]

This comment has been generated by cypress-bot as a result of this project's GitHub integration settings. You can manage this integration in this project's settings in the Cypress Dashboard

@chrismclarke chrismclarke added the Review: Assigned 👉 Waiting on review from a specific dev label Oct 15, 2019

describe('[Edit a how-to]', () => {
it('[By Owner]', () => {
cy.login('howto_creator@test.com', 'test1234')
Copy link
Contributor

@tmhung88 tmhung88 Oct 15, 2019

Choose a reason for hiding this comment

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

@chrismclarke The test has 2 issues which depends on another test, create-how-to, and execution order (edit needs to run after create). As a result, it's highly fragile and difficult for new devs to debug when it fails as they have no context.

I put back edit tests for some time because there are 2 questions I haven't addressed

  • A test flow for edit
  1. Reset a specific document to the default state
  2. Run the edit test
  3. Verify the change against firestore
  • an api to verify if data is updated correctly. I imagine it'd be cy.queryDocuments('some conditions').should('eq', {updated_data})

# Conflicts:
#	cypress/integration/howto/read.spec.ts
#	src/pages/Howto/Content/Common/Howto.form.tsx
@chrismclarke chrismclarke merged commit a623a6c into master Oct 21, 2019
@chrismclarke chrismclarke deleted the fix/646---how-to-button-disable-on-save branch October 21, 2019 13:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Review: Assigned 👉 Waiting on review from a specific dev
Projects
None yet
Development

Successfully merging this pull request may close these issues.

View How-To is not disabled while a how-to is being saved
2 participants