Skip to content

Rename variable and function names and add functional tests for booking workflows#131

Open
vidya-ram wants to merge 10 commits intomainfrom
cleanup-js
Open

Rename variable and function names and add functional tests for booking workflows#131
vidya-ram wants to merge 10 commits intomainfrom
cleanup-js

Conversation

@vidya-ram
Copy link
Copy Markdown

  1. Rename variable and function names to follow camel case convention.
  2. Change boxoffice widget variable.
  3. Add currency format function to client side.
  4. Add functional tests for booking workflows using Casperjs

Comment thread boxoffice/static/js/models/util.js Outdated
}

export const fetch = function(config){
export const Fetch = function(config){
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Why is this capitalized? Capitals are usually reserved for constructors.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Or for container objects.

Comment thread boxoffice/static/js/models/util.js Outdated
}

export const scrollToElement = function(element, speed=500) {
export const ScrollToElement = function(element, speed=500) {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Same as above. This should be scrollToElement.

{{#if k !== 'logo'}}
<p class="section-title">{{k}}</p>
<div class="section-content">{{{details[k]}}}</div>
<p class="section-title">{{ k }}</p>
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

What is k?

<p><span class="italic-title">Final amount:</span> {{ currency }}{{ final_amount }}</p>
<p><span class="italic-title">Base amount:</span> {{ formatCurrency(base_amount) }}</p>
<p><span class="italic-title">Discounted amount:</span> {{ formatCurrency(discounted_amount) }}</p>
<p><span class="italic-title">Final amount:</span> {{ formatCurrency(final_amount) }}</p>
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Shouldn't base_amount, discounted_amount and final_amount also be in camelCase?

@CLAassistant
Copy link
Copy Markdown

CLAassistant commented May 16, 2022

CLA assistant check
All committers have signed the CLA.

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.

3 participants