Pylons / deform

A Python HTML form library.
Other
418 stars 160 forks source link

Replaced bootstrap.min.css and bootstrap.min.js files with version 4. #397

Closed sydoluciani closed 4 years ago

sydoluciani commented 4 years ago

355

First step in upgrading bootstrap 3 to bootstrp 4. Replaced bootstrap.min.css and bootstrap.min.js files with version 4.

sydoluciani commented 4 years ago

@stevepiercy thats great.

I get the same result either using Xvfb or Xwindows: FAILED (errors=5, failures=9) , no skiped though.

I am working on errors and stuck with first one since yesterday, you can start with failures.
in both cases and in local development, it is best to switch from Xvfb to Xwindows and view the test as it progress. travis setup stay the same, running Xvfb.

With a quick pick at failures, it might be just as simple as number arrow keys being sent too many, too few or maybe not being sent at all, and that can be easily verified by viewing at browser.

sydoluciani commented 4 years ago

I just did a quick test, and number of left arraw keys being sent is correct, but some how the sent number being lost in first position, it works in other positions.

FAIL: test_type_bad_input (deformdemo.test.TextInputMaskTests) Compare: findid("deformField1").send_keys(11 Keys.ARROW_LEFT) findid("deformField1").send_keys("00") With: findid("deformField1").send_keys(10 Keys.ARROW_LEFT) findid("deformField1").send_keys("00")

And FAIL: test_submit_filled (deformdemo.test.MoneyInputWidgetTests) caused by wrong sequence of key strokes, below sequence works in real browser but not in selenium: findid("deformField1").send_keys("1") findid("deformField1").send_keys(5 * Keys.ARROW_LEFT)

sydoluciani commented 4 years ago

The good news is, this pull requests is using Bootstrap 4, and getting the same number of errors your pull request generated, so once we fix functional tests then the deform upgrade is done.

The bad news is, from looking at the errors or failures, problem mainly is Selenium and how it is dealing with browser. everything works when working with actual browser.

@stevepiercy would you like to complete test against deform/schema.py and push your pull request, by then I might find solution to some of the functional tests as it seems most of them follow the same pattern, and we have to find a work around.

Thanks

sydoluciani commented 4 years ago

I have fixed 7 of the 9 functional test failures.
Selenium tests need to use "selenium.webdriver.common.action_chains" to access some of the fields, otherwise Selenium won't interact properly with the field.

Had to send a new pull request to Deformdemo to reflect changes in Deform functional tests.

https://github.com/sydoluciani/deformdemo/blob/bootstrap4_test/deformdemo/test.py#L84
https://github.com/sydoluciani/deformdemo/blob/bootstrap4_test/deformdemo/test.py#L90

@stevepiercy Deformdemo tests are using Firefox 45, and they are failing to start xvfb. Deform is starting xvfb using systemctl and deformdemo starting it from /etc/init.d.

stevepiercy commented 4 years ago

@sydoluciani I think we need to bring deformdemo up to the same environment as deform, per the change in how xvfb is started in Travis since Jan 2019. We also need to drop Python 2 from deformdemo to align with deform.

sydoluciani commented 4 years ago

Will be completed in #403.