-
Notifications
You must be signed in to change notification settings - Fork 5
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
test(coscrad-frontend): add cypress test of create note about photograph #419
base: integration
Are you sure you want to change the base?
Conversation
* WIP: building audio panel for index views * WIP: make changes from PR * WIP finish playlist detail presenter and index-to-detail flow * WIP: converted audio-panel to explicit return * fix issues after rebase * fix: type error * test(api): update stale snapshots --------- Co-authored-by: Aaron Plahn <[email protected]>
* WIP Introduce domain-dump CLI command * feat(cli): introduce first CLI command: domain-dump * fix a couple Sonar cloud issues * Add error handling to CLI bootstrap call * fix issue with test output data path * refactor basedon PR (#360) * use hard-wired test datafile name * tweak test file output name
* move builds to DigitalOcean cloud * add logging to troubleshoot missing deps * add additional logging * use nodejs plugin * add cli build
Co-authored-by: yaanahuu2 <[email protected]>
* feat(cli): introduce restore cli command * test(api): remove obsolete snapshots * refactor based on PR (#365)
* WIP remove coscrad main content container * WIP fixed tests and lint --------- Co-authored-by: yaanahuu2 <[email protected]>
* WIP: add theme properties to configurable content * WIP: theme overrides * WIP: update resource preview icons from theme * WIP: destructure theme override * test(coscrad-frontend): add test coverage for use of theme in header * test(coscrad-frontend): fix stale snapshot --------- Co-authored-by: Aaron Plahn <[email protected]>
* WIP Ensure that every domain model can build a name * fix typecheck errors * fix failing tests and update stale snapshots * make bilingual name builder logic more robust * fix front-end tests * support name property in terms flow
…ata (#346) * feat(api): add support for straight-to-database endpoint for legacy data * remove unused decorator
* test(api): discover command payload schemas dynamically * test(api): remove obsolete snapshots * refactor based on PR (#371)
…e theme (#372) * test(coscrad-frontend) added tests for components that use theme overrides * WIP: fixed tests * test(coscrad-frontend): test components that leverage the configurable theme --------- Co-authored-by: Aaron Plahn <[email protected]>
#376) * fix(coscrad-frontend): use custom label for resource index in nav menu * update stale snapshot
* style(coscrad-frontend): layout paddingTop fix * style(coscrad-frontend): make navbar siteTitle responsive (#374) * style(coscrad-frontend): make navbar siteTitle responsive * style(coscrad-frontend): responsive text size for siteTitle * style(coscrad-frontend): remove duplicate link component on nav header * style(coscrad-frontend): add changes from PR * style(coscrad-frontend): adjust nav header font color * style(coscrad-frontend): change siteTitle color to contrast the navbar
* test(api): write happy path test * test(api): created test for when ID is not generated by our system * add failing test for missing name case * WIP: flow multilingual text invariant validation through to playlist * fix stale snapshot * Remove multilingual text property from payload in favor of text and language code for name --------- Co-authored-by: Aaron Plahn <[email protected]>
* refactor(api): remove base digital asset URL from config * fix failing tests and updat snapshots * fix front-end to accommodate renamed imageUrl * WIP implement up method for base digital asset url migration * make remove base digital asset url migration reversible * WIP Create list-migrations cli command * feat(coscrad-cli): introduce **list-migrations** command * fix branch state * inject a custom logger into cli commands * implement **run-migrations** command * Ensure that null keys are removed via migrations * append default file extensions * Add safeguard that prevents running multiple migrations at once for now * refactor(api): optimize migrations via updateMany method * WIP: improve test coverage for **run-migrations** * test(coscrad-cli): improve test coverage for **run-migrations**
WIP: changes from PR WIP: refactors from PR WIP: break out presenters for individual text items WIP: combine all items into a single accordion WIP: present labels, not languageCodes to users WIP: add tooltip for language label and role WIP: create tooltip for default language label
…il (#379) * style(coscrad-frontend): add ResourceDetailFullViewPresenter in vocabulary list detail and update styling * style(coscrad-frontend): remove defaultExpanded from accordion * fix(coscrad-frontend): render language tooltip conditionally for primary language --------- Co-authored-by: Aaron Plahn <[email protected]> WIP: remove comments/notes on multilingual text presenter
* infra(api): introduce data dumps and migration records (#381) persist a migration record post-migration infra(api): persist a database migration record infra(api): dump snapshots pre- and post-migration infra(api): dump full db snapshot pre- and post-migration update broken import Refactor based on PR (#380) * Fix build
* infra(api): introduce **revert-latest-migration** * Refactor based on PR (#385)
* infra(api): introduce **validate-invariants** * fix unawaited promises * Add post-migration invariant validation check * Improve test coverage and respond to PR (#386)
* fix(api): fix logging issues with migration cli commands * Fix issues with migration cli commands * introduce env var based flag to ensure data imports are intentional * refactor test suite to share common setup between test cases
…#389) * WIP add experimental function to Jenkinsfile * WIP refactor the branch condition * WIP break out function to copy env dependent content config * update sample content config with more realistic text * comment out ci stage for troubleshooting purposes * force deployment stage to run for this PR * WIP Introduce separate Haida staging front-end build * WIP refactor Jenkinsfile * WIP configure auth for the staging environment * remove project-specific labels for staging data from front-end * force staging build to use production config * WIP troubleshoot build * Use actual test data term for word-of-the-day in sample content config * troubleshoot build * troubleshoot build * nuke node modules * troubleshoot nx issues * revert Jenkinsfile * fix front-end tests * break out build steps in Jenkinsfile * break out function to copy the staging content config * refactor Jenkinsfile to use multiple stages for deployment * break out dependency install into separate stage * break the front-end build out into a separate stage * break out back-end and cli builds into separate stages * parametrize the front-end build * break out entire front-end build block * opt back in to the front-end deployment * tweak front-end artifacts pattern * troubleshoot front-end deployment * troubleshoot deployment... * update front-end artifacts path in publisher * tweak deployment * reinstate full front-end deployment * move front-end deployment logic into reuseable function * revert to working state * tweak deployment * archive the front-end only * break out front-end deployment into reuseable function * Add Haida front-end deployment * reformat publish step for readability * wrap publish over ssh in simpler API * revert previous * wrap artifact publication block in simpler API * pass through additional params * flow through remaining parameters * refactor front-end deployment block * run backend deployment * use multi-line strings and function calls for readability * deploy cli * fix Groovy lint * revert prevoius change * fix placement of cli deploy post block * copy cli to different directory * deploy node_modules with back-end build * skip nx cache for front-end build * restore proper stage conditionals * restore another conditional stage
* test(api): update test data with valid media URLs * move links to photograph test data to COSCRAD media gallery * udpate stale snapshots
* WIP: pass happy path test * WIP: add first invalid test case * validate that the audio item is not already on the playlist * WIP add remaining test coverage * test(api): add unit test for add item behaviour of playlist * refactor based on PR #392 --------- Co-authored-by: Aaron Plahn <[email protected]>
* WIP: first attempt to create resource labels with title case * feat(coscrad): introduce plural labels and leverage these in resource views * test(coscrad-frontend): mock resource info queries in index-to-detail flow tests * WIP update back-end jest snapshots * test(api): update stale snapshots --------- Co-authored-by: Aaron Plahn <[email protected]>
* test(api): add working audio URLs to term test data * test(api): update snapshots
) * WIP Add CREATE_NOTE_ABOUT_RESOURCE * WIP Fix a few issues * WIP Support dynamic union types and their validation * test(data-types): test union validator helper * discover dynamic union types at bootstrap * implement validation for union data types * WIP Support new union in existing models * WIP Recurse on nested union types * WIP Tweak approach to dynamic type discovery * WIP Reorganize algorithm and use test-driven approach * WIP Resolve union member schemas recursively * recursively resolve union member schemas * Finalize implementation * test(api): update test setup and schema snapshot to support dynamic union types * refactor based on PR (#393) * fix a few issues post-rebase * test(data-types): add test coverage for nested and circular union type definitions * test(api): initialize test app module in integration test setup
* WIP: pass happy path test * WIP:translate playlist name test * add invalid test cases * refactor based on PR (#397) * reafactor(api): break out language code enum decorator factory * test(api): update dummy user data * test(api): explicitly set up user roles for query tests --------- Co-authored-by: Aaron Plahn <[email protected]>
* WIP Add CREATE_NOTE_ABOUT_RESOURCE * WIP Fix a few issues * WIP Implement command and update edge connection validation approach * update tests to leverage dynamic union data types * remove diagnostic code * WIP Support decorator based validation for context models * update snapshot after rebase * WIP Update approach to context model invariant validation * make test cases comprehensive * Remove test coverage for geometric context models temporarily * Refactor based on PR (#398) * fix tests
* feat(data-types): introduce dynamic union factory utility * refactor based on PR (#401)
* WIP Scaffold command, handler, and test * WIP implement command data class and valid test case * pass happy-path test * make valid test coverage comprehensive * test(api): make edge connection data more comprehensive * Add test coverage for incompatible context types * add inconsistent context state test cases * add specific type test for resource type * add test coverage for additional edge cases and fuzz tests * add additional test coverage * test(api): update stale snapshots * test(api): remove stale test case that used text field context for a media item * refactor based on PR (#402) * tighten up test assertions * update stale snapshot
* WIP: audio clip player with cypress test * WIP: refactors from PR * Add test and implement error handling * finalize Cypress test for AudioClipPlayer * WIP: cypress test for undefined url * WIP: remove console log * WIP: refactors from PR * WIP: make changes from sonar cloud * WIP: add test case for custom play button * fix front-end build --------- Co-authored-by: Aaron Plahn <[email protected]>
* feat(coscrad): support multilingual text for notes * Refactor based on PR (#404)
* WIP support note creation on the front-end * WIP complete create note panel implementation * WIP Submit CREATE_NOTE command * add happy path test for create video * refactor(coscrad-frontend): update command panel to support injecting custom front-end forms and actions * refactor(coscrad-frontend): refactor command panel flow * WIP Inject generated ID for create-note form submission * update comments * test(coscrad-frontend-e2e): test the note creation flow * test(api): update stale snapshots * refactor based on PR (#407) * refactor(coscrad-frontend): move payload prop binding to top-level
* WIP added tooltips to menu and login buttons * updated text of login and logout tooltips --------- Co-authored-by: yaanahuu2 <[email protected]>
* test(api): add kktest user to test data * updated user management snapshot * updated user management e2e snapshot after rebase --------- Co-authored-by: yaanahuu2 <[email protected]>
* feat(coscrad): support tagging on the front-end fix(api): validate only the newly tagged member's state when a tag is created test(coscrad-frontend-e2e): add cypress test for tag term flow * refactor based on PR (#411)
* feat(api): remove multilingual text from command payloads * Remove CoscradMultilingualText data type and form element
Kudos, SonarCloud Quality Gate passed! 0 Bugs No Coverage information |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good. Please make the minor changes I suggested and feel free to merge down.
cy.contains(createNoteLabel).should('not.exist'); | ||
}); | ||
}); | ||
// TODO Add aditional non-admin test users and test this |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Keep the first line of this comment only.
|
||
cy.get('[href="/Resources"] > .MuiButtonBase-root').click(); | ||
|
||
cy.getByDataAttribute('photograph').click(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use cy.navigateToIndex('photograph')
.
Note we probably want to include the next cy.get in part of a cy.navigateToDetail('photograph')
, but that's not there yet.
|
||
cy.get('#note_text').click().type(newNoteText); | ||
|
||
cy.get('#note_languageCode').click().get('[data-value="hai"').click(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We might want an abstraction for cy.getByDataValue
or even cy.selectOption(selectElementId,dataValue)
. I'll do this in the near future.
@@ -0,0 +1,116 @@ | |||
describe(`photograph detail view`, () => { | |||
describe(`note creation`, () => { | |||
const photographId = `9b1deb4d-3b7d-4bad-9bdd-2b0d7b110002`; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Put a TODO to create this photograph before each test.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A related TODO is to clear the db state in-between each test.
4b79469
to
ac52327
Compare
45ef73a
to
9411033
Compare
05c3b03
to
82386bc
Compare
0d138d6
to
a22c1f4
Compare
0507112
to
bc02871
Compare
No description provided.