Skip to content

Commit

Permalink
test: convert tests to use supertest
Browse files Browse the repository at this point in the history
  • Loading branch information
shadowgate15 committed Jul 1, 2020
1 parent 75879c8 commit 6816355
Show file tree
Hide file tree
Showing 39 changed files with 3,104 additions and 225 deletions.
29 changes: 15 additions & 14 deletions template/app/views/layout.pug
Original file line number Diff line number Diff line change
Expand Up @@ -101,20 +101,21 @@ html(lang=locale).h-100
script.
window.API_URL = "#{config.urls.api}";

//- set the user and API key to be used by CabinJS
if user
script.
window.USER = {
id: "#{user.id}",
name: "#{user[config.passport.fields.displayName]}",
email: "#{user.email}"
};
window.API_TOKEN = "#{user[config.userFields.apiToken]}";
else
script.
window.USER = {
id: "#{ctx.sessionId}"
};
if config.env !== 'test'
//- set the user and API key to be used by CabinJS
if user
script.
window.USER = {
id: "#{user.id}",
name: "#{user[config.passport.fields.displayName]}",
email: "#{user.email}"
};
window.API_TOKEN = "#{user[config.userFields.apiToken]}";
else
script.
window.USER = {
id: "#{ctx.sessionId}"
};

//- build
if !isBot(ctx.get('User-Agent'))
Expand Down
43 changes: 42 additions & 1 deletion template/locales/ar.json
Original file line number Diff line number Diff line change
Expand Up @@ -113,5 +113,46 @@
"Your support request has been sent successfully. You should hear from us soon. Thank you!": "Your support request has been sent successfully. You should hear from us soon. Thank you!",
"You have reached the limit for sending support requests. Please try again.": "You have reached the limit for sending support requests. Please try again.",
"Server Error": "Server Error",
"A server error has unfortunately occurred.": "A server error has unfortunately occurred."
"A server error has unfortunately occurred.": "A server error has unfortunately occurred.",
"Your request was successfully completed.": "Your request was successfully completed.",
"Hello": "Hello",
"Dependencies and development dependencies are listed below.": "Dependencies and development dependencies are listed below.",
"Dependencies": "Dependencies",
"Development Dependencies": "Development Dependencies",
"Page not found": "Page not found",
"We're sorry, but the page you requested could not be found.": "We're sorry, but the page you requested could not be found.",
"Privacy Policy": "Privacy Policy",
"This privacy policy (\"Policy\") describes how Lad and its related companies (\"Company\") collect, use and share personal information of consumer users of this website, http://localhost:3000 (the \"Site\"). This Policy also applies to any of our other websites that post this Policy. This Policy does not apply to websites that post different statements.": "This privacy policy (\"Policy\") describes how Lad and its related companies (\"Company\") collect, use and share personal information of consumer users of this website, http://localhost:3000 (the \"Site\"). This Policy also applies to any of our other websites that post this Policy. This Policy does not apply to websites that post different statements.",
"What We Collect": "What We Collect",
"We get information about you in a range of ways.": "We get information about you in a range of ways.",
"Information You Give Us": "Information You Give Us",
"We collect your email address, and other information you directly give us on our site.": "We collect your email address, and other information you directly give us on our site.",
"Information Automatically Collected": "Information Automatically Collected",
"We automatically log information about you and your computer. For example, when visiting our Site, we log your computer operating system type, browser type, browser language, the website you visited before browsing to our Site, pages you viewed, how long you spent on a page, access times, Internet protocol (IP) address and information about your use of and actions on our Site.": "We automatically log information about you and your computer. For example, when visiting our Site, we log your computer operating system type, browser type, browser language, the website you visited before browsing to our Site, pages you viewed, how long you spent on a page, access times, Internet protocol (IP) address and information about your use of and actions on our Site.",
"Cookies": "Cookies",
"We may log information using \"cookies.\" Cookies are small data files stored on your hard drive by a website. Cookies help us make our Site and your visit better. We use cookies to see which parts of our Site people use and like and to count visits to our Site.": "We may log information using \"cookies.\" Cookies are small data files stored on your hard drive by a website. Cookies help us make our Site and your visit better. We use cookies to see which parts of our Site people use and like and to count visits to our Site.",
"Use of Personal Information": "Use of Personal Information",
"We use your personal information as follows:": "We use your personal information as follows:",
"We use your personal information to protect, investigate, and deter against fraudulent, unauthorized, or illegal activity.": "We use your personal information to protect, investigate, and deter against fraudulent, unauthorized, or illegal activity.",
"Sharing of Personal Information": "Sharing of Personal Information",
"We may share personal information as follows:": "We may share personal information as follows:",
"We may share personal information for legal, protection, and safety purposes.": "We may share personal information for legal, protection, and safety purposes.",
"We may share information to comply with laws.": "We may share information to comply with laws.",
"We may share information to respond to lawful requests and legal process.": "We may share information to respond to lawful requests and legal process.",
"We may share information to protect the rights and property of Lad, our agents, customers, and others. This includes enforcing our agreements, policies, and terms of use.": "We may share information to protect the rights and property of Lad, our agents, customers, and others. This includes enforcing our agreements, policies, and terms of use.",
"We may share information in an emergency. This includes protecting the safety of our employees and agents, our customers, or any person.": "We may share information in an emergency. This includes protecting the safety of our employees and agents, our customers, or any person.",
"Information Choices and Changes": "Information Choices and Changes",
"You can typically remove and reject cookies from our Site with your browser settings. Many browsers are set to accept cookies until you change your settings. If you remove or reject our cookies, it could affect how our Site works for you.": "You can typically remove and reject cookies from our Site with your browser settings. Many browsers are set to accept cookies until you change your settings. If you remove or reject our cookies, it could affect how our Site works for you.",
"Security of Your Personal Information": "Security of Your Personal Information",
"We take steps to help protect personal information. No company can fully prevent security risks, however.  Mistakes may happen. Bad actors may defeat even the best safeguards.": "We take steps to help protect personal information. No company can fully prevent security risks, however.  Mistakes may happen. Bad actors may defeat even the best safeguards.",
"Contact Information": "Contact Information",
"We welcome your comments or questions about this Privacy Policy.  You may also <a href=\"/support\">contact us by email</a>.": "We welcome your comments or questions about this Privacy Policy.  You may also <a href=\"/support\">contact us by email</a>.",
"Changes to this Privacy Policy": "Changes to this Privacy Policy",
"We may change this Privacy Policy. If we make any changes, we will change the \"last updated\" date below.": "We may change this Privacy Policy. If we make any changes, we will change the \"last updated\" date below.",
"This Privacy Policy was last updated on 12/18/2017 and was first published on 12/18/2017.": "This Privacy Policy was last updated on 12/18/2017 and was first published on 12/18/2017.",
"Contact Support": "Contact Support",
"Write your message": "Write your message",
"Message": "Message",
"We'll be in contact with you!": "We'll be in contact with you!",
"Send message": "Send message"
}
43 changes: 42 additions & 1 deletion template/locales/cs.json
Original file line number Diff line number Diff line change
Expand Up @@ -113,5 +113,46 @@
"Your support request has been sent successfully. You should hear from us soon. Thank you!": "Your support request has been sent successfully. You should hear from us soon. Thank you!",
"You have reached the limit for sending support requests. Please try again.": "You have reached the limit for sending support requests. Please try again.",
"Server Error": "Server Error",
"A server error has unfortunately occurred.": "A server error has unfortunately occurred."
"A server error has unfortunately occurred.": "A server error has unfortunately occurred.",
"Your request was successfully completed.": "Your request was successfully completed.",
"Hello": "Hello",
"Dependencies and development dependencies are listed below.": "Dependencies and development dependencies are listed below.",
"Dependencies": "Dependencies",
"Development Dependencies": "Development Dependencies",
"Page not found": "Page not found",
"We're sorry, but the page you requested could not be found.": "We're sorry, but the page you requested could not be found.",
"Privacy Policy": "Privacy Policy",
"This privacy policy (\"Policy\") describes how Lad and its related companies (\"Company\") collect, use and share personal information of consumer users of this website, http://localhost:3000 (the \"Site\"). This Policy also applies to any of our other websites that post this Policy. This Policy does not apply to websites that post different statements.": "This privacy policy (\"Policy\") describes how Lad and its related companies (\"Company\") collect, use and share personal information of consumer users of this website, http://localhost:3000 (the \"Site\"). This Policy also applies to any of our other websites that post this Policy. This Policy does not apply to websites that post different statements.",
"What We Collect": "What We Collect",
"We get information about you in a range of ways.": "We get information about you in a range of ways.",
"Information You Give Us": "Information You Give Us",
"We collect your email address, and other information you directly give us on our site.": "We collect your email address, and other information you directly give us on our site.",
"Information Automatically Collected": "Information Automatically Collected",
"We automatically log information about you and your computer. For example, when visiting our Site, we log your computer operating system type, browser type, browser language, the website you visited before browsing to our Site, pages you viewed, how long you spent on a page, access times, Internet protocol (IP) address and information about your use of and actions on our Site.": "We automatically log information about you and your computer. For example, when visiting our Site, we log your computer operating system type, browser type, browser language, the website you visited before browsing to our Site, pages you viewed, how long you spent on a page, access times, Internet protocol (IP) address and information about your use of and actions on our Site.",
"Cookies": "Cookies",
"We may log information using \"cookies.\" Cookies are small data files stored on your hard drive by a website. Cookies help us make our Site and your visit better. We use cookies to see which parts of our Site people use and like and to count visits to our Site.": "We may log information using \"cookies.\" Cookies are small data files stored on your hard drive by a website. Cookies help us make our Site and your visit better. We use cookies to see which parts of our Site people use and like and to count visits to our Site.",
"Use of Personal Information": "Use of Personal Information",
"We use your personal information as follows:": "We use your personal information as follows:",
"We use your personal information to protect, investigate, and deter against fraudulent, unauthorized, or illegal activity.": "We use your personal information to protect, investigate, and deter against fraudulent, unauthorized, or illegal activity.",
"Sharing of Personal Information": "Sharing of Personal Information",
"We may share personal information as follows:": "We may share personal information as follows:",
"We may share personal information for legal, protection, and safety purposes.": "We may share personal information for legal, protection, and safety purposes.",
"We may share information to comply with laws.": "We may share information to comply with laws.",
"We may share information to respond to lawful requests and legal process.": "We may share information to respond to lawful requests and legal process.",
"We may share information to protect the rights and property of Lad, our agents, customers, and others. This includes enforcing our agreements, policies, and terms of use.": "We may share information to protect the rights and property of Lad, our agents, customers, and others. This includes enforcing our agreements, policies, and terms of use.",
"We may share information in an emergency. This includes protecting the safety of our employees and agents, our customers, or any person.": "We may share information in an emergency. This includes protecting the safety of our employees and agents, our customers, or any person.",
"Information Choices and Changes": "Information Choices and Changes",
"You can typically remove and reject cookies from our Site with your browser settings. Many browsers are set to accept cookies until you change your settings. If you remove or reject our cookies, it could affect how our Site works for you.": "You can typically remove and reject cookies from our Site with your browser settings. Many browsers are set to accept cookies until you change your settings. If you remove or reject our cookies, it could affect how our Site works for you.",
"Security of Your Personal Information": "Security of Your Personal Information",
"We take steps to help protect personal information. No company can fully prevent security risks, however.  Mistakes may happen. Bad actors may defeat even the best safeguards.": "We take steps to help protect personal information. No company can fully prevent security risks, however.  Mistakes may happen. Bad actors may defeat even the best safeguards.",
"Contact Information": "Contact Information",
"We welcome your comments or questions about this Privacy Policy.  You may also <a href=\"/support\">contact us by email</a>.": "We welcome your comments or questions about this Privacy Policy.  You may also <a href=\"/support\">contact us by email</a>.",
"Changes to this Privacy Policy": "Changes to this Privacy Policy",
"We may change this Privacy Policy. If we make any changes, we will change the \"last updated\" date below.": "We may change this Privacy Policy. If we make any changes, we will change the \"last updated\" date below.",
"This Privacy Policy was last updated on 12/18/2017 and was first published on 12/18/2017.": "This Privacy Policy was last updated on 12/18/2017 and was first published on 12/18/2017.",
"Contact Support": "Contact Support",
"Write your message": "Write your message",
"Message": "Message",
"We'll be in contact with you!": "We'll be in contact with you!",
"Send message": "Send message"
}
Loading

0 comments on commit 6816355

Please sign in to comment.