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

Super basic form app/'context' trail #92

Merged
merged 1 commit into from
Oct 11, 2019

Conversation

luketlancaster
Copy link
Contributor

  • Add the Clubhouse Story ID: [ch21093]

not sure about...most of this. So rip 'er up and lemme know what you think

&:hover {
color: color(blue);
}
}
Copy link
Contributor Author

Choose a reason for hiding this comment

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

just cripped all of this from the patient scss

},
templateContext() {
return {
src: `${ window.location.origin }/formapp/${ this.model.id }`,
Copy link
Contributor Author

Choose a reason for hiding this comment

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

? stabs in the dark here

.find('[data-patients-region] .app-nav__link')
.last()
.click({ force: true });
.wait(2000);
Copy link
Contributor Author

Choose a reason for hiding this comment

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

waiting doesn't feel great, but not sure the best way to make sure the form is loaded? Should it be stubbed out with form data? Or somesuch?

Copy link
Member

Choose a reason for hiding this comment

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

I don't think we should test the contents of the iframe, just the src for now. but https://github.com/RoundingWell/RWell/blob/develop/cypress/support/commands.js#L42 when we do.

Copy link
Member

Choose a reason for hiding this comment

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

I don't think we need the wait to check the src?

@codecov
Copy link

codecov bot commented Oct 10, 2019

Codecov Report

Merging #92 into develop will decrease coverage by 0.05%.
The diff coverage is 100%.

Impacted file tree graph

@@             Coverage Diff             @@
##           develop      #92      +/-   ##
===========================================
- Coverage    97.63%   97.57%   -0.06%     
===========================================
  Files           79       82       +3     
  Lines         1436     1442       +6     
===========================================
+ Hits          1402     1407       +5     
- Misses          34       35       +1
Impacted Files Coverage Δ
src/js/apps/globals/app-frame_app.js 100% <ø> (ø) ⬆️
src/js/apps/forms/form/form_app.js 100% <100%> (ø)
src/js/views/forms/form/form_views.js 100% <100%> (ø)
src/js/apps/forms/forms-main_app.js 100% <100%> (ø)
src/js/base/entity-service.js 95.83% <0%> (-4.17%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 564f6c8...e4e1af1. Read the comment docs.

@cypress
Copy link

cypress bot commented Oct 10, 2019



Test summary

47 0 0 0


Run details

Project RoundingWell Care Ops Frontend
Status Passed
Commit e4e1af1
Started Oct 11, 2019 1:14 PM
Ended Oct 11, 2019 1:15 PM
Duration 01:06 💡
OS Linux Debian - 9.6
Browser Electron 61

View run in Cypress Dashboard ➡️


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

import { LayoutView } from 'js/views/forms/form/form_views';

export default App.extend({
currentAppOptions() {
Copy link
Member

Choose a reason for hiding this comment

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

this is the default. you can remove this

</a>
</div>
<h1>{{ name }}</h1>
<iframe src="{{ src }}" class="form__frame"></iframe>
Copy link
Member

Choose a reason for hiding this comment

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

does src="/formapp/{{ id }}" work?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

form loads, so yeah I think so!

@@ -1,21 +1,30 @@
context('Patient Form', function() {
specify('routing to form', function() {
cy
Copy link
Member

Choose a reason for hiding this comment

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

is this visit needed? If so that may be a problem

Copy link
Contributor Author

Choose a reason for hiding this comment

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

nope, sure isn't!

.find('[data-patients-region] .app-nav__link')
.last()
.click({ force: true });
.wait(2000);
Copy link
Member

Choose a reason for hiding this comment

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

I don't think we should test the contents of the iframe, just the src for now. but https://github.com/RoundingWell/RWell/blob/develop/cypress/support/commands.js#L42 when we do.

@luketlancaster luketlancaster force-pushed the feature/ch21093-form-layout-context-trail branch from 509b06c to c678cac Compare October 10, 2019 18:31
.get('[data-nav-region]')
.should('be.visible');
.get('iframe')
.should($iframe => {
Copy link
Member

Choose a reason for hiding this comment

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

its('src').should('contain' I think

Copy link
Contributor Author

Choose a reason for hiding this comment

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

gave that a shot, but was getting a 'could not find property' of src

Copy link
Member

Choose a reason for hiding this comment

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

hmm maybe its doesn't work on attributes.. how about should('have.attr'?

.find('[data-patients-region] .app-nav__link')
.last()
.click({ force: true });
.wait(2000);
Copy link
Member

Choose a reason for hiding this comment

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

I don't think we need the wait to check the src?

@luketlancaster luketlancaster force-pushed the feature/ch21093-form-layout-context-trail branch from c678cac to 148bbaf Compare October 11, 2019 01:39
</a>
</div>
<h1>{{ name }}</h1>
<iframe height="100px" src="/formapp/{{ id }}" class="form__frame"></iframe>
Copy link
Member

Choose a reason for hiding this comment

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

I'm just now noticing the height here. all styling should be in the class.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

ah crap. I put this in to test its to see if it would wok on props like this and forgot to remove

.get('[data-nav-region]')
.should('be.visible');
.get('iframe')
.should($iframe => {
Copy link
Member

Choose a reason for hiding this comment

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

hmm maybe its doesn't work on attributes.. how about should('have.attr'?

@luketlancaster luketlancaster force-pushed the feature/ch21093-form-layout-context-trail branch from 148bbaf to e4e1af1 Compare October 11, 2019 13:12
@paulfalgout paulfalgout merged commit 1472ef7 into develop Oct 11, 2019
@paulfalgout paulfalgout deleted the feature/ch21093-form-layout-context-trail branch October 11, 2019 16:10
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