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

Added to the tests of Form#updateValues #446

Merged
merged 3 commits into from
Nov 6, 2019
Merged

Conversation

ncphillips
Copy link
Contributor

Tests Output

Form#updateValues
    for primitive fields
      changing explicit fields
        ✓ updates strings (10ms)
        ✓ updates booleans (1ms)
      changing implicit fields
        ✓ updates strings
        ✓ updates numbers (1ms)
      when `nextValues` has a new field
        ✓ adds that field (1ms)
      when `nextValues` is missing a field
        ✓ does not remove deleted fields (1ms)
    for a group of "author" fields. Form = { author: { name: string, age: number } }
      with no active field
        when only the "name" is changed
          ✓ changes the "name"
          ✓ does not changes the "age" (1ms)
        when only the "age" is changed
          ✓ does not change the "name" (1ms)
          ✓ changes the "age" (1ms)
        when both the "name" and "age" are changed
          ✓ changes the "name"
          ✓ changes the "age" (1ms)
      with the "name" active
        when only the "name" is changed
          ✓ does not change the "name" (2ms)
          ✓ does not change the "age" (1ms)
        when only the "age" is changed
          ✓ changes the "age" (1ms)
          ✓ does not change the "name" (1ms)
        when both the "name" and "age" are changed
          ✓ changes the "age" (1ms)
          ✓ does not change the "name" (1ms)
      when there is two groups: "author" and "seo"
        when "author.name" is active
          and both "author.name" and "seo.description" are changed
            ✓ does not update the author.name (1ms)
            ✓ does updates the seo.description (1ms)

@ncphillips ncphillips requested a review from a team November 6, 2019 17:02
@github-actions
Copy link
Contributor

github-actions bot commented Nov 6, 2019

Warnings
⚠️ @tinacms/dev please add to a Milestone before merging

Modified Packages

The following packages were modified by this pull request:

  • @tinacms/core

Generated by 🚫 dangerJS against 79909f2

Copy link
Contributor

@dwalkr dwalkr left a comment

Choose a reason for hiding this comment

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

best to nest in jest tests

@ncphillips ncphillips merged commit 14f806e into master Nov 6, 2019
@ncphillips ncphillips deleted the test-form-update-values branch November 6, 2019 19: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.

2 participants