Commit graph

147 commits

Author SHA1 Message Date
Lars Eggert 6eabd4a3a1
chore: Use codespell to fix typos in comments. (#4794)
First part of replacement of #4651
2022-11-28 10:36:36 -06:00
Lars Eggert cb2f4afc8b
fix: Ignore readonly on select (#4786)
This was caused by #4708
2022-11-23 15:03:13 -06:00
Jennifer Richards eb41424ea4
test: permit multiple <h1> tags in a document (#4741) 2022-11-10 16:17:43 +00:00
Jennifer Richards e77419029a
test: validate HTML in own test case and report all results (#4740)
* ci: move HTML validation out of teardown so all failures are caught

Failures in the last batch were suppressed by the original implementation.

* test: rename template validation "test" so it is not auto-discovered

* test: run all HTML validation in a single batch at the end

Adds ~50 MB peak RAM usage during a full test run.

* test: refactor validation to collect failures of all kinds before exit
2022-11-10 16:17:00 +00:00
Robert Sparks fbd9509db7
chore: silence interleaved migration warning (#4687) 2022-11-02 14:33:09 -03:00
Jennifer Richards da70acfdff
Merge branch 'feat/tzaware' into jennifer/yet-more-tz-fixes
# Conflicts:
#	ietf/ietfauth/utils.py
#	ietf/meeting/tests_views.py
#	ietf/stats/tests.py
2022-10-17 16:39:45 -03:00
Jennifer Richards f3bdbf0ed4
Merge branch 'feat/tzaware' into jennifer/main-for-tzaware-merge
# Conflicts:
#	ietf/meeting/tests_js.py
#	ietf/meeting/tests_models.py
#	ietf/meeting/tests_views.py
#	ietf/meeting/views.py
#	ietf/name/fixtures/names.json
#	ietf/templates/meeting/agenda.html
#	ietf/templates/meeting/session_buttons_include.html
#	ietf/templates/meeting/timeslot_start_end.html
2022-10-14 16:35:57 -03:00
Robert Sparks 50668c97cd
feat: apis for attaching chatlogs and polls to session materials (#4488)
* feat: apis for attaching chatlogs and polls to session materials

* fix: anticipate becoming tzaware, and improve guard against attempts to provide docs for sessions that have no official timeslot assignment.

* fix: get chatlog upload to actually work

Modifications to several initial implementation decisions.
Updates to the fixtures.

* fix: test polls upload

Refactored test to reduce duplicate code

* fix: allow api keys to be created for the new endpoints

* feat: add ability to view chatlog and polls documents. Show links in session materials.

* fix: commit new template

* fix: typo in migration signatures

* feat: add main doc page handling for polls. Improve tests.

* feat: chat log vue component + embedded vue loader

* feat: render polls using Vue

* fix: address pug syntax review comments from Nick.

* fix: repair remaining mention of chat log from copymunging

* fix: use double-quotes in html attributes

* fix: provide missing choices update migration

* test: silence html validator empty attr warnings

* test: fix test_runner config

* fix: locate session when looking at a dochistory object for polls or chatlog

Co-authored-by: Nicolas Giard <github@ngpixel.com>
2022-10-13 09:20:36 -05:00
Jennifer Richards 7b1b7f5273
Merge branch 'feat/tzaware' into dev/tzaware-main-merge 2022-10-11 14:57:34 -03:00
Lars Eggert 15a1d3e379
chore: Update deps (bs to 5.2.2, various others) (#4537)
Also fix html-validate, which now wants a `.json` suffix on config files.
2022-10-07 16:05:04 -05:00
Jennifer Richards a653582cf7
fix: timezone fixes from last few comparisons with tzaware-obe 2022-09-28 13:21:50 -03:00
Jennifer Richards 1366b6de38
Merge branch 'feat/tzaware' into jennifer/main-to-tzaware-conflicts 2022-09-14 12:36:33 -03:00
Lars Eggert 64b5bdffa7
chore: Update deps (#4383)
* chore: Update dependencies

* Handle new html-validate tests
2022-09-09 08:56:53 -05:00
Robert Sparks 57fd099ea0
feat: add ability to ignore reduction in coverage to the testrunner (#4422) 2022-09-08 13:19:07 -05:00
Jennifer Richards ebebdbed3e
refactor: replace datetime.now and datetime.today with timezone.now (#4211)
* refactor: replace datetime.now with timezone.now

* refactor: migrate model fields to use timezone.now as default

* refactor: replace datetime.today with timezone.now

datetime.datetime.today() is equivalent to datetime.datetime.now(); both
return a naive datetime with the current local time.

* refactor: rephrase datetime.now(tz) as timezone.now().astimezone(tz)

This is effectively the same, but is less likely to encourage accidental
use of naive datetimes.

* refactor: revert datetime.today() change to old migrations

* refactor: change a missed datetime.now to timezone.now

* chore: renumber timezone_now migration

* chore: renumber migrations
2022-08-25 13:45:16 -03:00
Robert Sparks 1b64231e98
test: Convert interleaved migration failure to a warning. (#4301) 2022-08-02 10:23:12 -05:00
Nicolas Giard 744bcc54e8
fix: set vite base path during deploy build + allow google fonts (#4217)
* fix: set vite base path during deploy build + allow google fonts

* ci: only set vite base path if build is for production release

* test: add html-validate ignore rules for vite generated content that is valid

* fix: show buttons on regular sessions without agenda materials + link to legacy agenda

* fix: temporarily hide left menu on agenda-neue and floor-plan-neue

* fix: set resize handler to whole app

* fix: apply html-validate ignore to agenda-neue only + deploy/build.sh fix

* test: change old agenda cypress to always take the same elements to avoid #3564
2022-07-14 18:55:55 -05:00
Robert Sparks b988850985
fix: avoid mutables as defaults. Compute date default arguments at runtime rather than loadtime. (#4144) 2022-07-06 14:39:36 -05:00
Lars Eggert 411b5f4747
fix: Fix some HTML validation errors that came in via #4035 (#4066)
* fix: Fix some HTML validation errors that came in via #4035

Also make validation errors display a bit better.

* content -> color for mask-icon (caught by @jennifer-richards; thanks)
2022-06-16 11:59:12 -05:00
Lars Eggert 8ef92312d0
fix: Don't urlencode all resource URLs (#3988)
While this does suppress errors, it breaks even valid URLs. Instead, just
suppress the validation error for those few cases in the database.
2022-05-19 12:31:29 -05:00
Nicolas Giard 8a7f67d4d1
test: make tests run without root access (#3968) 2022-05-14 08:11:44 -05:00
Lars Eggert 5f8d4ed718
More HTML nitfixing (#3934)
* Unicode messages are triggered by both db content and tests

* Make ids unique

* Avoid "No value found" message on page

* Strip HTML from history entries, it's often broken

* Check HTML sources for occurrences of "** No value found for" and fix them

* Fix another occurrence of "** No value found for"

* Fix more occurrences of "** No value found for"

* Fix document revision stripping

* Force breaks of long (garbage) words

* Check URL validity before urlizing them

* Handle some additional corner cases

* Linkify action items

* Don't create profile/email links for System

* Handle headings with HTML elements in them better

* Fix comment

* Fix another occurrence of "** No value found for"

* Better I-D URLization that handles more edge cases. Also, test for them.

* Remove print

* Handle charters better

* Cache for one day
2022-05-10 12:37:14 -05:00
Lars Eggert 5598762608
fix: add more HTML validation & fixes (#3891)
* Update vnu.jar

* Fix py2 -> py3 issue

* Run pyupgrade

* test: Add default-jdk to images

* test: Add option to also validate HTML with vnu.jar

Since it's already installed in bin. Don't do this by default, since it
increases the time needed for tests by ~50%.

* fix: Stop the urlizer from urlizing in linkified mailto: text

* More HTML fixes

* More HTML validation fixes

* And more HTML fixes

* Fix floating badge

* Ignore unicode errors

* Only URLize docs that are existing

* Final fixes

* Don't URLize everything during test-crawl

* Feed HTML into vnu using python rather than Java to speed things up

* Allow test-crawl to start vnu on a different port

* Increase retry count to vnu. Restore batch size to 30.

* More HTML validation fixes

* Use urllib3 to make requests to vnu, since overriding requests_mock is tricky

* Undo commit of unmodified file

* Also urlize ftp links

* Fix matching of file name

* More HTML fixes

* Add `is_valid_url` filter

* weekday -> data-weekday

* urlencode URLs

* Add and use vnu_fmt_message. Bump vnu max buffer.

* Simplify doc_exists

* Don't add tab link to mail archive if the URL is invalid

* Run urlize_ietf_docs before linkify

Reduces the possibility of generating incorrect HTML

* Undo superfluous change

* Runner fixes

* Consolidate vnu message filtering into vnu_filter_message

* Correctly handle multiple persons with same name

* Minimze diff

* Fix HTML nits

* Print source snippet in vnu_fmt_message

* Only escape if there is something to escape

* Fix snippet

* Skip crufty old IPR declarations

* Only include modal when needed. Add handles.

* Fix wordwrap+linkification

* Update ietf/doc/templatetags/ietf_filters.py

* Update ietf/doc/templatetags/tests_ietf_filters.py

* Don't right-align second column
2022-05-03 13:55:48 -05:00
Nicolas Giard 8ea883cb7e
chore: switch to Yarn 3 (#3819)
* refactor: switch to yarn 3

* chore: add other os+cpu to yarn supported architectures

* chore: add gitattributes

* chore: add missing yarn native modules rebuild step

* chore: replace npx with yarn in test_runner + update readme

* chore: remove bootstrap-datepicker github dependency, use local instead
2022-04-25 15:54:05 -05:00
Jennifer Richards 68684be247
test: fix permissions on files for html validation (#3795)
* test: fix permissions on files for html validation

* test: rewind stdout before dumping output that caused error
2022-04-07 16:17:33 -05:00
Lars Eggert 3234f1a121
test: Validate HTML rendered during tests (#3782) 2022-04-07 13:30:38 -03:00
Robert Sparks 87838725af
test: bypass html validation pending rework at template level (#3748) 2022-03-25 07:53:46 -05:00
Lars Eggert f516f86a17
ci: Add vnu to dev + test docker image (#3724)
* ci: Add vnu to dev docker image

* Use default-jdk from apt, and just download the vnu JAR blob
2022-03-22 13:13:28 -04:00
Lars Eggert eb5423d084
ci: Also check generated HTML with the "vnu" validator (#3682)
* ci: Also check generated HTML with the "vnu" validator

Because HTML Tidy apparently misses a bunch of errors.

* thead -> tbody

* More fixes

* More fixes

* Start checker in test runner
2022-03-21 12:50:23 -05:00
Jennifer Richards c390fe012e Use live_server_url as IDTRACKER_BASE_URL in IetfLiveServerTestCase. Fixes #3203. Commit ready for merge.
- Legacy-Id: 19353
2021-09-07 18:18:13 +00:00
Robert Sparks 3697180cc1 Reverted merge of timezone-aware migration efforts.
- Legacy-Id: 18792
2021-01-12 16:54:20 +00:00
Henrik Levkowetz 59b49c846b Fixed a number of TimeSlot-related issues, in particular related to getting the correct date from a timeslot. Also fixed the displayed slot times in the new schedule editors to show local times, not UTC times.
- Legacy-Id: 18785
2020-12-19 22:55:11 +00:00
Henrik Levkowetz 774e752a54 Snapshot of timezone-aware datatracker code. Tests pass, and the test-crawler shows only expected differences. Trunk changes merged in up to r18768.
- Legacy-Id: 18770
2020-12-16 23:53:37 +00:00
Henrik Levkowetz 020d560190 Grammar fix.
- Legacy-Id: 18562
2020-10-05 13:20:18 +00:00
Jennifer Richards ea3882034a Use querystring instead of URL hash for agenda filters
- Legacy-Id: 18353
2020-08-11 13:45:41 +00:00
Henrik Levkowetz bf230a738b Added a test suite switch to optionally show logging output. Normally this is suppressed while running tests. In production, it goes to syslog's user facility. With --show-logging, it will go to the console when running tests.
- Legacy-Id: 18010
2020-06-17 15:05:57 +00:00
Henrik Levkowetz 6d7c5b52ee Django 2.0 conversion. Test suite passes, except for javascript tests.
- Legacy-Id: 17762
2020-05-08 13:07:07 +00:00
Henrik Levkowetz 42995fadea Merged in ^/branch/iola/meeting-improvement-r17214@17617, which provides a new meeting schedule editor.
- Legacy-Id: 17701
2020-04-28 14:34:34 +00:00
Henrik Levkowetz 3054b8cf58 Removed usage of maybe_create_svn_symlinks()
- Legacy-Id: 17668
2020-04-20 18:03:25 +00:00
Ole Laursen e5943f814d Add support for displaying constraint hints when scheduling a task and
for displaying violated constraints in the new schedule editor, with
the old of a new field, ConstraintName.editor_label.

Add support for displaying room capacity violations.

Add support for selecting a session and displaying information about
it similar to the existing scheduling editor.

Add support for sorting unassigned sessions.

Clean up markup and styles a bit, and fix some bugs.

Expand HTML-based test and add JS test that exercises the
Javascript-based functionality.

Switch to using Chrome driver instead of PhantomJS since the HTML
engine in PhantomJS is apparently too old to support the constructs in
the new schema editor.

Add a workaround for LiveServerTestCase clashing with IetfTestRunner
fixture loading.
 - Legacy-Id: 17519
2020-03-23 17:55:36 +00:00
Henrik Levkowetz 726fcbf27d Removed all __future__ imports.
- Legacy-Id: 17391
2020-03-05 23:53:42 +00:00
Henrik Levkowetz 8f0eca5032 Added a newline to test run output, to separate dot progress indication from teardown message.
- Legacy-Id: 17253
2020-01-22 23:17:44 +00:00
Henrik Levkowetz 288f4135e3 Added (currently inactive) code to trigger exceptions on failure to resolve template variables during tests, and added fixes for a couple of places that triggered such exceptions.
- Legacy-Id: 17226
2020-01-13 17:16:43 +00:00
Henrik Levkowetz 447525de73 Tweaked the output of mypy_test().
- Legacy-Id: 16865
2019-10-15 16:48:23 +00:00
Henrik Levkowetz 2d858f2e0a Added mypy and django-stubs to Py3 requirements, and added a mypy test case.
- Legacy-Id: 16768
2019-09-30 15:37:32 +00:00
Ryan Cross d332bfd91d Added encoding='utf-8' parameter to io.open operations in tests that starting failing since adding unicode_literals. Commit ready to merge
- Legacy-Id: 16562
2019-07-20 22:54:14 +00:00
Henrik Levkowetz fb3d4ddb0b Added information about versions (Datatracker, Python, and Django) at the beginning of test suite runs.
- Legacy-Id: 16516
2019-07-17 20:54:51 +00:00
Henrik Levkowetz 627f8a7eab Modified code to write release coverage json data to gzip file under both Py2 and Py3.
- Legacy-Id: 16475
2019-07-16 21:58:38 +00:00
Henrik Levkowetz 8c6eb3a30a Python2/3 compatibility: Changed the use of open() and StringIO to io.open() etc.
- Legacy-Id: 16458
2019-07-15 19:14:04 +00:00
Henrik Levkowetz 6732e7acff Fixed an issue with a gzip file mode.
- Legacy-Id: 16436
2019-07-08 18:30:34 +00:00