Commit Graph

606 Commits

Author SHA1 Message Date
Florian Giroud
8c50a18a85
fix: Reverted Cypress to 6.2.1
Reverted Cypress, because of too many stability issues with the latest 6.3
2021-01-28 12:22:23 +01:00
Kush Trivedi
900ff2db9a
tests: UX Test for project list deletion, sort, filter (#3480)
* tests: UX Test for project list deletion, sort, filter

Signed-off-by: Kush Trivedi <kushthedude@gmail.com>
2021-01-28 11:45:05 +01:00
dependabot[bot]
951175a1f5
Bump cypress-file-upload from 5.0.1 to 5.0.2 in /main/tests/cypress (#3516)
Bumps [cypress-file-upload](https://github.com/abramenal/cypress-file-upload) from 5.0.1 to 5.0.2.
- [Release notes](https://github.com/abramenal/cypress-file-upload/releases)
- [Commits](https://github.com/abramenal/cypress-file-upload/compare/v5.0.1...v5.0.2)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-01-27 09:15:30 +01:00
Florian Giroud
a421447a8f
test: Improved the way we handle fixtures, #3505 (#3506)
* test: Improved the way we handle fixtures, #3505

* Added a fix for an invalid call to loadAndVisitProject, added cypress download path to gitignore
2021-01-25 21:05:03 +01:00
dependabot[bot]
61fe0ed458
Bump cypress-file-upload from 5.0.0 to 5.0.1 in /main/tests/cypress (#3503)
Bumps [cypress-file-upload](https://github.com/abramenal/cypress-file-upload) from 5.0.0 to 5.0.1.
- [Release notes](https://github.com/abramenal/cypress-file-upload/releases)
- [Commits](https://github.com/abramenal/cypress-file-upload/compare/v5.0.0...v5.0.1)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-01-22 12:23:39 +01:00
Kush Trivedi
2f375664f2
feat: introduct prettier style formatting for cypress test suite (#3494)
Signed-off-by: Kush Trivedi <kushthedude@gmail.com>
2021-01-21 14:08:01 +01:00
dependabot[bot]
1a2a5082d7
Bump fs-extra from 9.0.1 to 9.1.0 in /main/tests/cypress (#3500)
Bumps [fs-extra](https://github.com/jprichardson/node-fs-extra) from 9.0.1 to 9.1.0.
- [Release notes](https://github.com/jprichardson/node-fs-extra/releases)
- [Changelog](https://github.com/jprichardson/node-fs-extra/blob/master/CHANGELOG.md)
- [Commits](https://github.com/jprichardson/node-fs-extra/compare/9.0.1...9.1.0)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-01-20 17:38:00 +01:00
dependabot[bot]
00f31eb758
Bump cypress from 6.2.1 to 6.3.0 in /main/tests/cypress (#3501)
Bumps [cypress](https://github.com/cypress-io/cypress) from 6.2.1 to 6.3.0.
- [Release notes](https://github.com/cypress-io/cypress/releases)
- [Changelog](https://github.com/cypress-io/cypress/blob/develop/.releaserc.base.js)
- [Commits](https://github.com/cypress-io/cypress/compare/v6.2.1...v6.3.0)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-01-20 14:45:39 +01:00
dependabot[bot]
c6f15ed653
Bump cypress-file-upload from 4.1.1 to 5.0.0 in /main/tests/cypress (#3493)
Bumps [cypress-file-upload](https://github.com/abramenal/cypress-file-upload) from 4.1.1 to 5.0.0.
- [Release notes](https://github.com/abramenal/cypress-file-upload/releases)
- [Commits](https://github.com/abramenal/cypress-file-upload/compare/v4.1.1...v5.0.0)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-01-18 22:27:12 +01:00
Florian Giroud
e2361fee56
Issue 3453, organized the test suite (#3456)
* Moved and renamed Cypress tests, created folders skeleton

* Updated syntax for assertions in sorting test

* Added test folders

* fix: cache all UI paths for cypress (#3454)

* fix: cache all UI paths for cypress

* Update pull_request.yml

* chore: restore caching in pr workflow (#3457)

Signed-off-by: Kush Trivedi <kushthedude@gmail.com>

Co-authored-by: Kush Trivedi <44091822+kushthedude@users.noreply.github.com>
2021-01-12 15:24:53 +01:00
dependabot[bot]
a6b7855ede
Bump cypress from 6.0.1 to 6.2.1 in /main/tests/cypress (#3448)
Bumps [cypress](https://github.com/cypress-io/cypress) from 6.0.1 to 6.2.1.
- [Release notes](https://github.com/cypress-io/cypress/releases)
- [Changelog](https://github.com/cypress-io/cypress/blob/develop/.releaserc.base.js)
- [Commits](https://github.com/cypress-io/cypress/compare/v6.0.1...v6.2.1)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-01-07 22:41:42 +01:00
Kush Trivedi
0e08c50e07
feat: introduce dependabot for cypress suite (#3447)
Signed-off-by: Kush Trivedi <kushthedude@gmail.com>
2021-01-07 08:37:24 +01:00
Kush Trivedi
fe123129d2
chore: align test-suite name with npm standards (#3439)
* chore: align test-suite name with npm standards

Signed-off-by: Kush Trivedi <kushthedude@gmail.com>

* chore: rename ci to openrefine

Signed-off-by: Kush Trivedi <kushthedude@gmail.com>

* chore: make requested changes

Signed-off-by: Kush Trivedi <kushthedude@gmail.com>
2021-01-04 12:28:48 +01:00
Florian Giroud
4b6106a386
Run UI tests in continuous integration (#3393)
* Fixed flaky tests

* Refactored ui_test commans-line, added documentation

* Attempt to build a workflow with cypress

* Fixed CI UX tests build

* Changed cyprss actions for pull-request

* Merged Cypress workflow into the regular PR target workflow

* Refactored Github workflows to include Cypress Tests

* Revert Ci build to pull_request_target
2020-12-15 20:34:15 +01:00
Tom Morris
14f43dc2cc
Refactor HTTP code into common module & Improve Fetch URL - fixes #3129 (#3237)
* Refactor HTTP code into a common utility class 

Centralizes the six (slightly) different implementations to use
a common Apache HTTP Client 5 implementation which implements our
strategies for retries, timeouts, error handling, etc.

Apache HTTP Client 5 adds support for Retry-After headers, HTTP/2,
and a bunch of other stuff under the covers.

Moves request delay to a request interceptor and fixes calculation
of the delay (again). Increase retries from 1x to 3x and use delay*2
as the default retry interval, if no Retry-After header. Uses an 
exponential backoff strategy for multiple retries.

* Reuses HTTP client across requests
* Use IOException instead of Exception for HTTP errors
2020-12-07 00:38:36 -05:00
Mahesh Jindal
4f97fd55a5
Fix: Preventing addition of any empty cells with whitespaces while importing Xml Data with Tests #1095 (#3357)
* Fix: Preventing addition of any empty cells with whitespaces while importing Xml data with Tests : Issue #1095

* Chore: Using 'CharMatcher' to match whitespace pattern instead of using custom regex : Issue #1095
2020-12-02 18:11:45 +01:00
Tom Morris
2872ceeb7a
Merge pull request #3349 from thadguidry/fingerprint-wynn-thadguidry
Add Wynn to fingerprint to support Old English texts
2020-11-28 22:08:00 -05:00
Thad Guidry
3d30897b3b Add Wynn to fingerprint to support Old English texts 2020-11-28 21:40:49 -05:00
Florian Giroud
7950d764ff
Architecture for front end browser-based UI tests, issue #733 (#3340)
* Added Cypress tests to OpenRefine
* Installed Cypress
* Added a few tests to cover basic OR features
Y

* Enriched langage Tests

* Enriched project_create tests

* Refactored and enriched undo/redo tests, added extract & apply

* Upgraded Cypress to 5.6.0

* Removed the cypress-dot-env plugin, as Cypress now supports nice configuration capabilities

* Added UX tests documentation

* Improved functional tests documentation, added license and description to tests package.json
2020-11-23 18:18:12 +01:00
rachittiwari8562
990540ce10
Fix #3330: argument checking in phonetic GREL function (#3345)
* Fix for issue #3330 phonetic-function

* Update main/src/com/google/refine/expr/functions/strings/Phonetic.java

Co-authored-by: Antonin Delpeuch <antonin@delpeuch.eu>

* Corrected Intendation

Corrected intendation as suggested.

* Added tests to check invalid parameters

* Added tests to check invalid parameters

Co-authored-by: Antonin Delpeuch <antonin@delpeuch.eu>
2020-11-22 09:23:06 +01:00
Thad Guidry
6c9ad3f31d
Improve documentation of reinterpret GREL function (#3315)
* add clarity for reinterpret docs

Helps fix #3292

* update reinterpret docs phrasing

We agreed to use "encoding" to be friendly to user exposed messaging instead of "encoder" and "decoder" that is used internally.

* fix serializeReinterpret() test json
2020-11-05 07:57:12 +01:00
rubyAnne
352127558a
changed to reflect the function's acceptance of either simple string … (#3294)
* changed to reflect the function's acceptance of either simple string or regex

* cast p into a Pattern

* cast p into a Pattern

* Changed test to reflect the new output from function.
2020-11-01 08:52:36 +01:00
Tom Morris
c8220d687e
Improve fingerprint keyers - fixes #3282 (#3283)
* Add more keyer tests

- All forms of Unicode whitespace for both fingerprint & N-gram fingerprint
- additional N-gram fingerprint cases

* Improve fingerprint keyers

- Update N-gram fingerprint keyer to match (missed last time)
- refactor string normalization to reduce redundancy between two keyers
- add C1 controls to control characters that are stripped
- include all Unicode whitespace characters in splitting delimiter
  and don't strip controls which are whitespace (HT, LF, VT, FF, CR,
NEL)
- minor cleanups, simplifications, and performance optimizations
2020-10-25 20:32:30 +01:00
Tom Morris
30d16c2077 Add Thad/Owen's test 2020-09-30 20:57:57 -04:00
Tom Morris
dbb8e530c8 Add tests for array reverse & join 2020-09-30 20:24:05 -04:00
Tom Morris
d6e42bf5d9 Annotate another missed test 2020-09-30 20:00:08 -04:00
Tom Morris
959200d141 Maintain order for uniques() - fixes #3235
Also add tests
2020-09-30 17:45:24 -04:00
Tom Morris
bb4fc50f17 Enable missed test 2020-09-30 17:44:05 -04:00
Tom Morris
c76e2b9a46
disable flaky readTableWithLinks test - refs #3128 (#3207) 2020-09-23 07:41:22 +02:00
Thad Guidry
3f6d1eabba
Adds new Jsoup wholeText() function and tests (#3181)
* Adds new Jsoup wholeText() function and tests
- Ref: https://github.com/jhy/jsoup/blob/master/CHANGES#L275
- Ref: https://jsoup.org/apidocs/org/jsoup/nodes/Element.html#wholeText()

* update the description of function

* Update main/src/com/google/refine/expr/functions/xml/WholeText.java
2020-09-12 16:14:26 +02:00
Tom Morris
eaf881ced7
Importer refactoring cleanup (#2984)
* Clean up importer refactoring

Remove an extra copy of filename setting.
Revert some additional API changes (retaining both versions)

* Revert archive file name changes & mark as deprecated
2020-09-06 17:46:08 -04:00
Tom Morris
a86a6d4e3b
sort() handles nulls instead of throwing NPE - fixes #3152 (#3162)
* Add utility helpers to create array of comparable items

* Extend sort() to handle arrays with nulls

- Instead of NullPointerException on nulls, sort them last
- add JSON helpers to return Comparable[] in addition to Object[]
- Non-homogenous arrays or arrays with non-primitive
  objects (array or object) are not sortable
- Add tests for both new and old sort functionality
2020-09-05 23:01:47 +02:00
Tom Morris
aa43445c99
Extend forEach() to support JSON objects (#3150)
* Refactor GREL Get tests

- move helper up to RefineTest
- move tests to the correct module

* Extend forEach() to support JSON objects - fixes #3149

Also add tests for existing forEach forms in addition to the new one

* Add a couple more tests
2020-08-30 08:40:17 +02:00
Tom Morris
441c069bc5 Add some string function tests
Including a test for Apache TEXT-149 behavior change
https://github.com/apache/commons-text/pull/119

Add some more string function tests
2020-08-23 14:17:40 -04:00
Tom Morris
b5aea3b780 Remove unused imports 2020-08-23 14:17:40 -04:00
Tom Morris
a50669800f Split up multifunction test modules
Distributes the tests to individual modules per function and
deletes the former multifunction test modules.
2020-08-23 14:11:49 -04:00
Tom Morris
392a64b25e Refactor tests to hoist common methods into RefineTest
Moves the invoke() method and the associated fields into
the super class and deletes the redundant implementations.
2020-08-23 14:11:49 -04:00
Antonin Delpeuch
9ac54edbba
Migrate reconciliation calls to Apache HTTP client (#2906)
* Migrate reconciliation calls to OkHTTP, for #2903

* Migrate to Apache HTTP Commons

* Migrate data extension to Apache HTTP client

* Deprecate HttpURLConnection in RefineServlet

* Use LaxRedirectStrategy, clean up imports

* Remove read and pool timeouts, only keep the connection timeout

* Adapt mocking of HTTP calls after migration
2020-08-23 14:04:59 +02:00
Tom Morris
259705ad5f
assertEqualAsJson test helper refactor (#3113)
* Refactor test helper

Create a version of the assert that uses the standard parameter
order and deprecate the version that uses inverted order.

* Use consistent Assert class and parameter ordering
2020-08-23 11:04:44 +02:00
Tom Morris
fc21d58ed1
Don't count TABs as control characters - fixes #3061 (#3068)
* Don't count TABs as control characters - fixes #3061

* Add TSV test. Replace info logging w/assert message
2020-08-16 10:35:25 +02:00
Tom Morris
b73b480d7d
Remove tests of third party code (#3050)
Neither of these tests are testing OpenRefine code
(and a negative NotEquals test is useless anyway)
2020-08-10 12:39:30 +02:00
Tom Morris
55edae2b7b
Fix ToDate test failure & inefficiency - fixes #3026 (#3027)
* Fix ToDate test failure - fixes #3026

Instead of computing offset from UTC at current
point in time, use the offset from the parsed
date so that we're not affected by crossing
a daylight savings time boundary.

* Fix date parsing with locale as first format string

Also refactors for simpicity, restore some dropped tests,
and restores previous behavior of considering a bad
format string an error instead of silently ignoring it.

It does NOT address another issue which was introduced
in May 2018 of treating date/times without timzone
information as UTC instead of local.

* Restore error checking and messages

* Save & restore default timezone for tests

Also add some ToDos for places where LocalDate is being misused.
2020-08-09 13:53:43 +02:00
Tom Morris
a0819acbd6 Move ProjectManager initialization to beforeMethod 2020-08-03 20:42:31 -04:00
Tom Morris
52194e1685 Add https for all TestNG DTDs 2020-08-03 12:27:58 -04:00
Tom Morris
83ed9ffdaf
Refactor importer APIs - Fixes #2963 (#2978)
* Make sure data directory is directory, not a file

* Add a test for zip archive import

Also tests the saving of the archive file name and source filename

* Add TODOs - no functional changes

* Cosmetic cleanups

* Revert importer API changes for archive file name parameter

Fixes #2963
- restore binary compatibility to the API
- hoist the handling of both fileSource and archiveFileName from
TabularImportingParserBase and TreeImportingParserBase to
ImportingParserBase so that there's only one copy. These 3 classes are
all part of the internal implementation, so there should be no
compatibility issue.

* Revert weird flow of control for import options metadata

This reverts the very convoluted control flow that was introduced
when adding the input options to the project metadata. Instead
the metadata is all handled in the importer framework rather than
having to change APIs are have individual importers worry about
it.

The feature never had test coverage, so that is still to be added.

* Add test for import options in project metadata & fix bug

Fixes bug where same options object was being reused and overwritten,
so all copies in the list ended up the same.
2020-07-23 18:36:14 +02:00
Tom Morris
d5abaac6df
Update marc4j to 2.9.1 - Fixes #2962 (#2977)
* Add a MARC import test

* Make sure data directory is directory, not a file

* Update to marc4j 2.9.1 - fixes #2962
2020-07-22 22:12:30 +02:00
Tom Morris
f2e61b6628
Add tests for wide XLS/XLSX export (#2945)
Refs #2122. Also reenable a couple of disabled tests
2020-07-16 10:01:17 +02:00
Tom Morris
a3fab26cca
Fix the text format guesser so it doesn't inappropriately guess WikiText (#2924)
* Fix text guesser so it doesn't guess wikitext

Fixes #2850
- Add simple magic detector for zip & gzip files to keep
  it from attempting to guess binary files
- Add a counter for C0 controls for the same reason
- Tighten wikitable counters to require marker at
  beginning of the line, per the specification
- Refactor to use Apache Commons instead of private
  counting methods
- Add tests for most TextGuesser formats

* Remove misplaced duplicate test data file

* Fix LGTM warning + minor cleanups

* Use BoundedInputStream to prevent runaway lines
2020-07-15 08:56:00 +02:00
Tom Morris
561619399c
Fix order dependent NPE in LoadLanguage test (#2922)
* Ensure ProjectManager is initialized before test - fixes #2895

* Fix indentation (detabify)
2020-07-14 18:06:04 +02:00
Tom Morris
ed68541988
Remove informational logging from tests that are passing (#2923)
* Change logging from info to debug

* Make tests less chatty when they're passing
2020-07-14 17:47:36 +02:00