Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade to QUnit 2.x #1359

Closed
vobu opened this issue Mar 2, 2017 · 6 comments
Closed

Upgrade to QUnit 2.x #1359

vobu opened this issue Mar 2, 2017 · 6 comments
Assignees

Comments

@vobu
Copy link
Contributor

vobu commented Mar 2, 2017

Hi,
all UI5 versions (have checked up to 1.44.7) are still using QUnit 1.18.0.
Having QUnit 2.x available would at a minimum allow us to use these really helpful features:

I've seen some discussion in #1105 to eventually go for an upgrade - wanted to +1 this with this enhancement-issue.
Sure there might be refactoring efforts involved, but only the above two listed features make up for that :)

Best, Volker

@codeworrior
Copy link
Member

I totally agree. The refactoring effort for OpenUI5 is no longer our main concern. The real problem is that the qunit.js that we package is not only used by the OpenUI5 tests, but by many, many unit tests in upper layers (SAPUI5 and even apps build with UI5 - as far as they have unit tests).

We therefore consider to deviate from our normal practice (package only one version of each thirdparty software) and add a sap/ui/thirdparty/qunit2.js next to the existing one. After that addition, upper layers could decide on their own when to migrate.

Your next question most likely is: "When will you add it?". Any new open source that we add has to go through some internal approval process. Not sure what the status is for Qunit 2.0. I'll try to find out and update this issue.

@vobu
Copy link
Contributor Author

vobu commented Mar 3, 2017

excellent, good approach to have QUnit 1 + 2 co-exist.
Just took a peak myself in Black Duck and SRI: QUnit green (Black Duck) and grey (SRI), but only 1.x - want me to put in a request for 2.x to speed things up?

@codeworrior
Copy link
Member

The internal approval process for including QUnit 2.1.1 has been started and a corresponding change has been prepared. We'll update this issue once there is significant progress.

@akudev
Copy link
Contributor

akudev commented Mar 13, 2017

Adding "approved" to say this will happen without further need to drive something

@Michadelic Michadelic self-assigned this Mar 14, 2017
@Michadelic
Copy link
Contributor

i am currently working on updating the tests, will post more details soon

@Michadelic
Copy link
Contributor

Update: openui5 code base (all unit tests) have been lifted to QUnit 2.0 syntax now (phew that was some work). Real Migration to QUnit 2.0 is still pending though as we have some hard dependencies to dissolve first

openui5bot pushed a commit that referenced this issue May 9, 2017
This change adds QUnit 2.3.2 in addition to the current QUnit 1.18.0, 
in order to allow step-by-step migration of test cases in all layers.

Fixes #1359 .

Details:
qunit / qunit-2
 - add QUnit 2.3.2 and its CSS, add CSS wrapper module, update 3rdparty
   info

sinon-qunit bridge
 - no longer use the abandoned signature variant of QUnit.test()
 - design time dependency is still to qunit.js for compatibility reasons

qunit-junit
 - abandon legacy globals ("assert", "raises", "equals") when qunit-2
   is used

QUnitUtils
 - abandon legacy globals ("raises") when qunit-2 is used
 - don't configure QUnit.config.reorder when qunit-2 is used

TestUtils
 - QUnit.push has been removed, use QUnit.assert.push (also deprecated!)

Opa
 - no longer use the abandoned signature variant of QUnit.test()
 - after a QUnit timeout, Opa must no longer call the assert.async()
 - QUnit.throws no longer accepts string literal as 'expected'
 
TestRunner
 - failed to parse the test results from the DOM 
   (with QUnit 2, there's more than one <strong> tag in each test case)

Tests
 - fully migrate Opa's own tests to QUnit 2.0 APIs
 - Execute Opa's own tests for both, QUnit 1.x and QUnit 2.x
 - timeout test failed to extract assertion messages (also has
   extracted any 'diff' messages)

Change-Id: I1e6748405e95e87d0478e72eecdc0566bd8dbba4
JIRA: CPOUIFPHOENIXCORE-1783
(cherry picked from commit 33c3583)
CR-Id: 002075125900001531432017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants