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

conditional fields are not available in AposRelationshipEditor #4240

Merged
merged 1 commit into from
Jul 27, 2023

Conversation

haroun
Copy link
Contributor

@haroun haroun commented Jul 27, 2023

Summary

conditionFields does not exist in the context of AposRelationshipEditor

What are the specific steps to test this change?

  1. Run cypress fields.spec.js

What kind of change does this PR introduce?

(Check at least one)

  • Bug fix
  • New feature
  • Refactor
  • Documentation
  • Build-related changes
  • Other

Make sure the PR fulfills these requirements:

  • It includes a) the existing issue ID being resolved, b) a convincing reason for adding this feature, or c) a clear description of the bug it resolves
  • The changelog is updated
  • Related documentation has been updated
  • Related tests have been updated

If adding a new feature without an already open issue, it's best to open a feature request issue first and wait for approval before working on it.

Other information:

@haroun haroun requested a review from ValJed July 27, 2023 11:38
@haroun haroun self-assigned this Jul 27, 2023
@linear
Copy link

linear bot commented Jul 27, 2023

PRO-4542 Add Cypress tests left for Template Library

  • Check that we can filter templates (see screenshot below)

image.png

  • Check that relationships (image for instance) are saved when creating a template from scratch
  • Un-skip the archive/restore tests and fix it (there seems to be a race condition when selecting templates)

---

  • Handle TODOs:
    • When AposTemplateLibraryEditor will be used everywhere (when editing/duplicating a page or piece page from the "in-context editing", see screenshot below, see TODOs, cf. https://apostrophe-inc.slack.com/archives/CSH5SCE1F/p1689867989742749)
      • In checkTemplateEditFromInContextPage and checkTemplateEditFromInContextPiecePage test functions, add the Template suffix to the modal name (see TODOs)

      • Uncomment the following blocks when AposTemplateLibraryEditor will be used everywhere

         // cy.get('editorModal').findFieldHolder('Slug', { assert: false }).should('not.exist');
         // cy.get('editorModal').findFieldHolder('Update this document on', { assert: false }).should('not.exist');
         // cy.get('editorModal').findFieldHolder('Unpublish this document on', { assert: false }).should('not.exist');
        

        image.png

      • Add a test to check that duplicating a template works as expected, and uses the AposTemplateLibraryEditor modal (by using the 3 codes lines above, as they will ensure that we're on the right modal)

    • When PR is merged and released in cypress-tools
      • Remove following selectors from testbed (see TODO):

          pieceSelectAll: '.apos-toolbar__group--left [data-apos-test=selectAll] button',
          pieceArchiveTrigger: '.apos-toolbar__group--left [data-apos-test=archiveTrigger] button',
          pieceRestoreTrigger: '.apos-toolbar__group--left [data-apos-test=restoreTrigger] button',
        
    • When PRO-4540 is done
      • Change the "Save" label to "Update"

cc valentin tom lindsay

@haroun haroun merged commit c0cb7b2 into main Jul 27, 2023
6 checks passed
@haroun haroun deleted the pro-4542-conditional-fields branch July 27, 2023 13:27
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