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

ListWidget: Remove usage of $this->mFormat (not taken into account anymore by parent class) #462

Merged
merged 5 commits into from Feb 20, 2019

Conversation

kghbln
Copy link
Member

@kghbln kghbln commented Jan 19, 2019

This PR is made in reference to: #449

This PR addresses or contains:

  • Remove internal interface mFormat that does not exist anymore

This PR includes:

  • Update of RELEASE-NOTES.md
  • Tests (unit/integration)
  • CI build passed

Fixes #449

@kghbln
Copy link
Member Author

kghbln commented Jan 19, 2019

This is supposed to test as rendered, i.e. with user interaction. I do not know how to test e.g. the "menu" widget with user interaction but probably this is not utmost necessary as long as "alphabet" and "pagination" work.

I guess this is parser and not parser-html
@mwjames
Copy link
Contributor

mwjames commented Jan 19, 2019

You can only test the "raw" output of PHP not something JS creates after it has received the output because we cannot (or as easy as with PHP) test results from JS formats directly (you would need a headless browser and webdriver ... and so on).

==== (actual) ====
<div class="srf-listwidget" data-listtype="ul" data-widget="alphabet" data-pageitems="5"><div class="srf-spinner mw-small-spinner"><span class="srf-processing-text">Chargement...</span></div><div id="listwidget-4" class="listwidget-container" style="display:none; position: relative; margin-bottom:5px; margin-top:5px;"><ul class="smw-format ul-format"><li class="smw-row"><span class="smw-field"><span class="smw-value"><a href="/TravisWiki/index.php/May_2000" title="May 2000">May 2000</a></span></span></li><li class="smw-row"><span class="smw-field"><span class="smw-value"><a href="/TravisWiki/index.php/May_2001" title="May 2001">May 2001</a></span></span></li><li class="smw-row"><span class="smw-field"><span class="smw-value"><a href="/TravisWiki/index.php/May_2002" title="May 2002">May 2002</a></span></span></li><li class="smw-row"><span class="smw-field"><span class="smw-value"><a href="/TravisWiki/index.php/May_2003" title="May 2003">May 2003</a></span></span></li><li class="smw-row"><span class="smw-field"><span class="smw-value"><a href="/TravisWiki/index.php/May_2004" title="May 2004">May 2004</a></span></span></li><li class="smw-row"><span class="smw-field"><span class="smw-value"><a href="/TravisWiki/index.php/May_2005" title="May 2005">May 2005</a></span></span></li><li class="smw-row"><span class="smw-field"><span class="smw-value"><a href="/TravisWiki/index.php/May_2006" title="May 2006">May 2006</a></span></span></li></ul></div></div>
==== (expected) ====
[ <a class="_ ln-disabled" href="#">0-9</a> ], [ <a class="m ln-selected" href="#">M</a> ], [ <ul class="alphabet-container" id="listwidget-6"> ], [ <li class="smw-row ln-m" style=""><span class="smw-field"><span class="smw-value"><a href="/May 2006" data-hasqtip="7" oldtitle="May 2006" title="">May 2006</a></span></span></li> ]
Failed asserting that 0 matches expected 4.

@s7eph4n
Copy link
Contributor

s7eph4n commented Jan 19, 2019

@kghbln, if you don't mind, I will push a version, that should not require sep to be set.

@s7eph4n s7eph4n changed the title Remove internal interface mFormat that does not exist anymore ListWidget: Remove usage of $this->mFormat (not taken into account anymore by parent class) Jan 29, 2019
@s7eph4n
Copy link
Contributor

s7eph4n commented Feb 13, 2019

Fixed the format and the test. The test now only checks that the PHP part on the server produces the html structure that is expected by the JS on the client.

@kghbln
Copy link
Member Author

kghbln commented Feb 13, 2019

Wow, this is really cool. Thank you a lot for your help. I am very grateful for this.

@kghbln kghbln added this to the 3.0.1 milestone Feb 13, 2019
@mwjames
Copy link
Contributor

mwjames commented Feb 16, 2019

@kghbln In case you confirmed that this is working as expected, feel free to merge!

@kghbln
Copy link
Member Author

kghbln commented Feb 20, 2019

In case you confirmed that this is working as expected, feel free to merge!

Affirmative, the field tests work cool as expected.

@kghbln kghbln merged commit 2173f1a into master Feb 20, 2019
@kghbln kghbln deleted the issue-449 branch February 20, 2019 18:17
kghbln added a commit that referenced this pull request Feb 22, 2019
…anymore by parent class) (#462)

* ListWidget:
** Stop inheriting ListResultPrinter
** Provide tests
@kghbln
Copy link
Member Author

kghbln commented Feb 22, 2019

Back-ported with 14e04f1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants