Commit graph

549 commits

Author SHA1 Message Date
chrisgarrity
376aee0eb3 Add error checking and testing for translations (#1401)
* Add error checking and testing for translations. Also make build-locales quieter if there are no problems.

* Allow build with broken translations (to allow development), but fail test so that broken translations don't get merged or deployed
2017-08-15 09:32:18 -04:00
jwzimmer
f232569355 Fix GH-1420 Issue/refactor helper functions (#1458)
* put helper functions in separate file following Paul's style in scratch-gui

* remove console statements

* address review comments, object destructuring
2017-08-11 16:13:52 -04:00
jwzimmer
b289c42120 Fix Gh-1385 - Issue/smoke test signing in (#1411)
* add tests for signing in and my stuff

* flesh out tests, reorganize a bit

* add more tests

* tests for my stuff & signing in

* fix some of the errors causing build to fail

* pass in credentials from commandline rather than uncommitted file

* switch root back to staging

* address pr review comments, rename username & password vars

* update testing readme
2017-07-19 12:58:50 -04:00
jwzimmer
06acfbb61c Issue/gh 1371 update tests post tips navbar change (#1412)
* Update compatibility requirements to clarify support for ChromeOS

* update tests after changes to footer links and navbar
2017-07-19 12:58:14 -04:00
jwzimmer
bc84e2c95a Fix issue/gh 1274 by adding a test for the statistics page (#1317)
* added a test for the stats page

* add newline at end of file

* added additional tests for more charts on the stats page

* fixed starting URL value (should be staging, not prod)

* Put close parens on new lines

* change comment style

* Add waits to prevent intermittent failure

* Switch root url back again to staging

* try new style of test & remove breaking tests

* moving away from t.ok

* check for class value rather than t.ok

* remove comments, use correct comment style, note not testable on staging atm

* add messages for tests

* more arrow functions
2017-06-21 09:48:22 -07:00
jwzimmer
56b46fd861 Issue/gh 1013 remove end to end testing package dependencies from repo (#1319)
* remove selenium from package.json

* Add package.json & README for the integration directory

* add newline at end of file

* add chromedriver dependency
2017-05-24 10:12:37 -07:00
jwzimmer
bb5657587e Fix issue/gh 1313 by adding test to check for missing string ids (#1314)
* test for missing string ids

* Switched to multiple tests (1 per intl page) and changed comment style

* Add back in comment I accidentally . Add comment for the function.

* Change variable names, call function in-line
2017-05-24 10:11:07 -07:00
Matthew Taylor
4967f315e8 Merge pull request #1139 from mewtaylor/cwillaim-feature/teacher-registration-flow-tests
Tests for the teacher registration flow
2017-05-04 08:39:08 -04:00
Matthew Taylor
d563535ba5 Move string set methods out of fastly-extended
This also moves all helper methods in `configure-fastly` into a separate utility file, and adds some additional unit tests for those utilities now that they are separated.
2017-04-25 13:18:13 -04:00
Matthew Taylor
ca067fdc5e Use custom VCL for Pass/!Pass conditions
We’ve now exceeded our max number of characters for a condition in the Fastly API, and we need to make it larger to accommodate regex conditionals that can match on any of the routes in www currently.

This fixes the issue by moving the conditions – and the states that are affected by it, like setting the backend or cache ttls – to two custom vcl files that are updated via the Fastly API. One is for the `vcl_rev` config, and one is for the `vcl_fetch` config.
2017-04-25 11:06:57 -04:00
jwzimmer
de78abbea2 Issue/gh 1167 test splash page (#1185)
* automated tests for footer links

* renamed navbar test file and removed footer links to separate file

* run with make smoke

* added tests for join scratch and sign in in navbar

* fix linter errors & update www links

* addressed some of ray's comments

* fix failing test - projects row link

* maybe fix error?

* continue switching to click, convert so it runs with disabled selenium promise manager, and refactor to be less location dependent

* finish switching off of implicit reliance on selenium promise manager
2017-04-19 17:14:02 -04:00
chrisgarrity
82785435bf New scripts to generate translations from Transifex
Added tx-import, expects TX_TOKEN environment variable to be set to an API token for Transifex. If no API token exists it’ll just use the default English strings for everything.

Removed the localization spot checks because they were checking tha json got built from po files. With Tx-import the files are already json, and may possibly be missing.
2017-02-15 22:51:15 -05:00
chrisgarrity
e1a0e9fece Fix GH 1102: Don’t allow duplicate strings in a single l10n file (#1150)
* Don’t allow duplicate strings in a single l10n file

Added check_duplicate_strings to test for duplicates in a single file.
removed duplicates - tried to keep the more generic ‘key’

* revised test case for safer file reads
2017-01-19 18:23:56 -05:00
cwillaim
38bdc78d8a Update tests with the right xpath for error messages (nested span for translation) 2017-01-03 12:16:17 -05:00
cwillaim
fe2ce902e6 Update tests to use an environment value for the url, and consolidate the slide advancement functions. Update utils with better xpath for error messages 2017-01-03 12:16:16 -05:00
cwillaim
e357a62c2c Rename tests for the demographic and organization steps for consistency. Clean up teacher_registration_utils 2017-01-03 12:16:16 -05:00
cwillaim
60565d22c6 Remove unused variable in one of the address step tests 2017-01-03 12:16:16 -05:00
cwillaim
432fd1a81b Test the address and 'use scratch' steps. 2017-01-03 12:16:16 -05:00
cwillaim
29a38ca917 Finish up tests for the organization step. 2017-01-03 12:16:16 -05:00
cwillaim
4ef6dc193d Move code for filling in slides to utils, and update tests accordingly. 2017-01-03 12:16:16 -05:00
cwillaim
69c9cdba17 Update reference to the utils where each test imports them (educator...utils to teacher...utils) 2017-01-03 12:16:15 -05:00
cwillaim
3d6b89ac67 Rename tests to follow proper naming - 'teacher' instead of 'educator.' Move teacher registration tests into subfolder. 2017-01-03 12:16:15 -05:00
cwillaim
487b6cd152 Add utils for reused strings in teacher registration tests, and update tests to import them. Add tests for the organization step. 2017-01-03 12:16:15 -05:00
cwillaim
871bb4b52d Use a different username when filling in first slide, ladybug was taken. 2017-01-03 12:16:15 -05:00
cwillaim
2fe8dbb490 Add tests for the educator registration flow, up to the phone number step. 2017-01-03 12:16:15 -05:00
chrisgarrity
29b104741f Added tests for duplicate strings in build-locales merge
Also took out default messages for strings that are in the l10n json files.
2016-10-12 09:41:06 -04:00
chrisgarrity
5b2ff1a4ca Update md5map fixtures for tests
Also cleaned up comments from @mewtaylor
2016-10-11 19:28:13 -04:00
jwzimmer
7b59953d84 removed console log statement accidentally left from testing 2016-09-21 10:45:55 -04:00
jwzimmer
e06cf2b134 simplify checking that the href is at the end of the url with ray's suggestion 2016-09-21 10:41:24 -04:00
jwzimmer
867c95b382 travis checks 2016-09-19 13:11:24 -04:00
jwzimmer
57ab628337 check only the href, not the URL. i'm not sure this is a good way to do this. may be too convoluted. 2016-09-19 13:02:16 -04:00
jwzimmer
eaaa2faf2a replaced tab with 4 spaces 2016-09-15 13:28:17 -04:00
jwzimmer
eb788acac0 require statements on separate lines and travis check failires 2016-09-15 13:22:53 -04:00
jwzimmer
3855926a15 Tried to fix the errors for travis check, but wasn't sure how to handle some of them 2016-09-15 10:36:47 -04:00
jwzimmer
052819f8c5 Clarified inline comments 2016-09-14 15:33:45 -04:00
jwzimmer
a49d209c29 folder and file for the initial automated test, checking the navbar create link URL is correct 2016-09-14 15:28:45 -04:00
Connor Hudson
00ac15d475 add test, tweak terms 2016-06-01 12:05:03 -04:00
Matthew Taylor
fa566ac140 Fix tests, and make error check specific
Since it's using `require` to get the localisation strings, check if the error is `MODULE_NOT_FOUND` before moving on – because if it isn't, then there is an unknown error that should be thrown. Thanks @rschamp for the suggestion!
2016-05-19 06:56:45 -04:00
Matthew Taylor
1f871e7cf1 Use routes.json to get localization paths
Before we were using glob, which was about to start failing on subdirectories in views (which we started using in `conference`). Instead of searching for `l10n.json`, it seemed more appropriate to instead look for localization by using the configured pages that need to be localized.
2016-05-18 09:49:49 -04:00
Matthew Taylor
56787ee09c Add spot check for cards, use new Page paradigm 2016-03-23 16:47:55 -04:00
Matthew Taylor
c448b15dd4 Refactor build-locales a bit
This makes a couple of procedure-specific parts into methods in `locale-compare`, so that they can be tested more readily.
2016-03-23 08:22:09 -04:00
Matthew Taylor
ff003b137a fix copy errors
Thanks @rschamp!
2016-03-22 16:38:12 -04:00
Matthew Taylor
b123650988 Add localization spot checks
1. checks the localization for a few reference languages for the nav bar
2. for our localized pages (splash, about, wedo2), it checks to see that there are locale strings, whether or not they're english (to make sure at least something is on the page).
2016-03-22 16:26:16 -04:00
Matthew Taylor
ceec694b2a Revert "Migrate to using a loader method"
This reverts commit 214430b0c4.
2016-01-08 13:50:58 -05:00
Matthew Taylor
214430b0c4 Migrate to using a loader method
This moves all locale/translation building to a dependency, `scratch-www-intl-loader`, as well as tests associated with it. Also gets rid of the `make translations` step.
2016-01-07 17:01:57 -05:00
Matthew Taylor
21668d6915 Fix tests 2016-01-06 15:08:54 -05:00
Matthew Taylor
75dc3ee630 Default to msgid string if not found 2015-12-01 11:25:03 -05:00
Matthew Taylor
fc834b8817 Move scripts to new lib folder
Thanks @thisandagain for the tip!
2015-11-19 10:05:38 -05:00
Matthew Taylor
ca10232498 Clean up build-locales and add tests for it.
1. Use md5 compare instead of string compare for determining presence of translation
2. Strip out whitespace before doing md5 compare
2015-11-09 11:40:36 -05:00