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

Solve_issue_868 #870

Merged
merged 5 commits into from
Oct 2, 2019
Merged

Solve_issue_868 #870

merged 5 commits into from
Oct 2, 2019

Conversation

Mubra
Copy link
Member

@Mubra Mubra commented Oct 2, 2019

ambiguity is generated between previously saved items. It was corrected by creating a "row" element and modifying its structure with the even "drop.target" to avoid ambiguity.

solve2

closes #868

@idgserpro
Copy link
Member

idgserpro commented Oct 2, 2019

@Mubra please add a closes #868 at the end of the PR description. This is useful for linking to the problem that PR is fixing.

webpack/app/js/layout.js Outdated Show resolved Hide resolved
webpack/app/js/layout.js Outdated Show resolved Hide resolved
webpack/app/js/layout.js Outdated Show resolved Hide resolved
webpack/app/js/layout.js Outdated Show resolved Hide resolved
CHANGES.rst Outdated Show resolved Hide resolved
CHANGES.rst Outdated Show resolved Hide resolved
@idgserpro
Copy link
Member

@Mubra it would be nice you to try do a Robot test. You can see an example here:

https://github.com/collective/collective.cover/blob/master/src/collective/cover/tests/test_layout.robot

Maybe you can simply edit this file adding more checks.

User in a new line.
Fixed indentation using 2 spaces.
Fixed identation
Copy link
Member

@idgserpro idgserpro left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think some test could be make.

@idgserpro idgserpro requested review from idgserpro and removed request for idgserpro October 2, 2019 17:04
@hvelarde
Copy link
Member

hvelarde commented Oct 2, 2019

yes, I know and I agree with you but that's only going to be possible in the mid term.

@hvelarde hvelarde merged commit 588edf1 into master Oct 2, 2019
@hvelarde hvelarde deleted the fix_issue_868 branch October 2, 2019 17:43
scmos added a commit to scmos/collective.cover that referenced this pull request Oct 2, 2019
@Mubra
Copy link
Member Author

Mubra commented Oct 4, 2019

Good morning @idgserpro , will you have some 'read me' to integrate the evidence?

@idgserpro
Copy link
Member

@Mubra you can take a look here:

https://docs.plone.org/external/plone.app.robotframework/docs/source/index.html

http://robotframework.org/Selenium2Library/Selenium2Library.html

A good guide is the tests of the package itself. The .robot extension files:

https://github.com/collective/collective.cover/tree/master/src/collective/cover/tests

You can see the tests in action running:

./bin/test -t robot

@Mubra
Copy link
Member Author

Mubra commented Oct 4, 2019

thanks @idgserpro !! i will work on this

@Mubra
Copy link
Member Author

Mubra commented Oct 4, 2019

Good afternoon @idgserpro , I was preparing uns instancia virgin de Plone, and when executing "./bin/test -t robot" no test works, I see that all errors are an attempt to connect to: "http: // localhost: 55001 / plone / RobotRemote "and the error in python is" AssertionError: No keyword with name 'Enable Autologin as' found. " , I'm trying to understand the cause, I just ask if you've heard of such a case.

@idgserpro
Copy link
Member

idgserpro commented Oct 4, 2019

@Mubra what did you mean by "instancia virgin de Plone"? Is a package generated with bobtemplates.plone?

@Mubra
Copy link
Member Author

Mubra commented Oct 4, 2019

@idgserpro I mean "install it from 0" and the first thing that runs that "bin / test"

@idgserpro
Copy link
Member

@Mubra bin/test in collective.cover package? Or in another?

@Mubra
Copy link
Member Author

Mubra commented Oct 5, 2019

@idgserpro collective.cover package

@idgserpro
Copy link
Member

@Mubra you don't need to run the tests in a "virgin" instance. Every time you run a ./bin/test the Plone Site will be without content, regardless of whether you did things in it in ./bin/instance.

The strange is that the robot tests are working on Travis and don't have this error. See:

https://travis-ci.org/collective/collective.cover/jobs/592687307

Are the other non-robot tests is working there when you run ./bin/test? Are you creating a new .robot file? What is the version of your Firefox?

@Mubra
Copy link
Member Author

Mubra commented Oct 7, 2019

Good morning @idgserpro , I already found a way to run the "bin / test -t robot" tests according to me, I needed to start the plone service in the test layer (use this "ZSERVER_HOST = 0.0.0.0 ZSERVER_PORT = 55001 bin / robot -server collective.cover.testing.ROBOT_TESTING "), once started that service, now if I run" bin / test -t robot "and I can see the tests running but I still have errors, this is my output

mubra@ubuntu:~/collective_01$ bin/test -t robot
empezando!!!
Running collective.cover.testing.collective.cover:Robot tests:
  Set up plone.testing.zca.LayerCleanup in 0.001 seconds.
  Set up plone.testing.z2.Startup in 0.494 seconds.
  Set up plone.app.testing.layers.PloneFixtureCould not install product plone.autoform
 in 13.644 seconds.
  Set up collective.cover.testing.Fixture in 8.046 seconds.
  Set up plone.app.robotframework.remote.AutoLoginRemoteLibrary:RobotRemote in 0.008 seconds.
  Set up plone.testing.z2.ZServer in 0.522 seconds.
  Set up collective.cover.testing.collective.cover:Robot in 0.000 seconds.
  Running:
    8/23 (34.8%)
==============================================================================
Test Basic Tile                                                               
==============================================================================
Test Basic Tile                                                       | FAIL |
Text 'Internal Server Error' did not appear in 30 seconds
------------------------------------------------------------------------------
Test Basic Tile                                                       | FAIL |
1 critical test, 0 passed, 1 failed
1 test total, 0 passed, 1 failed
==============================================================================
Output:  /home/mubra/collective_01/parts/test/test_basic_tile/Test_Basic_Tile/output.xml



Failure in test Test Basic Tile (test_basic_tile.robot)
Traceback (most recent call last):
  File "/home/mubra/collective_01/eggs/unittest2-0.5.1-py2.7.egg/unittest2/case.py", line 340, in run
    testMethod()
  File "/home/mubra/collective_01/eggs/robotsuite-1.7.0-py2.7.egg/robotsuite/__init__.py", line 461, in runTest
    assert last_status == 'PASS', last_message
AssertionError: Text 'Internal Server Error' did not appear in 30 seconds

    13/23 (56.5%)
==============================================================================
Test Link Integrity                                                           
==============================================================================
Test Link Integrity on Basic Tile                                     | FAIL |
Text 'Potential link breakage' did not appear in 30 seconds
------------------------------------------------------------------------------
Test Link Integrity                                                   | FAIL |
1 critical test, 0 passed, 1 failed
1 test total, 0 passed, 1 failed
==============================================================================
Output:  /home/mubra/collective_01/parts/test/test_link_integrity/Test_Link_Integrity_on_Basic_Tile/output.xml



Failure in test Test Link Integrity on Basic Tile (test_link_integrity.robot) #issue_615
Traceback (most recent call last):
  File "/home/mubra/collective_01/eggs/unittest2-0.5.1-py2.7.egg/unittest2/case.py", line 340, in run
    testMethod()
  File "/home/mubra/collective_01/eggs/robotsuite-1.7.0-py2.7.egg/robotsuite/__init__.py", line 461, in runTest
    assert last_status == 'PASS', last_message
AssertionError: Text 'Potential link breakage' did not appear in 30 seconds

    14/23 (60.9%)
==============================================================================
Test Link Integrity                                                           
==============================================================================
Test Link Integrity on RichText Tile                                  | FAIL |
ValueError: Element locator 'link=My document' did not match any elements.
------------------------------------------------------------------------------
Test Link Integrity                                                   | FAIL |
1 critical test, 0 passed, 1 failed
1 test total, 0 passed, 1 failed
==============================================================================
Output:  /home/mubra/collective_01/parts/test/test_link_integrity/Test_Link_Integrity_on_RichText_Tile/output.xml



Failure in test Test Link Integrity on RichText Tile (test_link_integrity.robot) #issue_615
Traceback (most recent call last):
  File "/home/mubra/collective_01/eggs/unittest2-0.5.1-py2.7.egg/unittest2/case.py", line 340, in run
    testMethod()
  File "/home/mubra/collective_01/eggs/robotsuite-1.7.0-py2.7.egg/robotsuite/__init__.py", line 461, in runTest
    assert last_status == 'PASS', last_message
AssertionError: ValueError: Element locator 'link=My document' did not match any elements.

    15/23 (65.2%)
==============================================================================
Test Locked Cover :: Testing locked and unlocked                              
==============================================================================
Test Locked Cover                                                     | FAIL |
Page should have contained element 'xpath: //input[contains(text(), "Log in")]' but did not
------------------------------------------------------------------------------
Test Locked Cover :: Testing locked and unlocked                      | FAIL |
1 critical test, 0 passed, 1 failed
1 test total, 0 passed, 1 failed
==============================================================================
Output:  /home/mubra/collective_01/parts/test/test_locked_cover/Test_Locked_Cover/output.xml



Failure in test Test Locked Cover (test_locked_cover.robot)
Traceback (most recent call last):
  File "/home/mubra/collective_01/eggs/unittest2-0.5.1-py2.7.egg/unittest2/case.py", line 340, in run
    testMethod()
  File "/home/mubra/collective_01/eggs/robotsuite-1.7.0-py2.7.egg/robotsuite/__init__.py", line 461, in runTest
    assert last_status == 'PASS', last_message
AssertionError: Page should have contained element 'xpath: //input[contains(text(), "Log in")]' but did not

    16/23 (69.6%)
==============================================================================
Test Drag And Drop Among Tiles                                                
==============================================================================
Test Drag And Drop Among Tiles                                        | FAIL |
Element 'css=div.cover-banner-tile a img' did not appear in 30 seconds
------------------------------------------------------------------------------
Test Drag And Drop Among Tiles                                        | PASS |
0 critical tests, 0 passed, 0 failed
1 test total, 0 passed, 1 failed
==============================================================================
Output:  /home/mubra/collective_01/parts/test/test_drag_and_drop_among_tiles/Test_Drag_And_Drop_Among_Tiles/output.xml

    21/23 (91.3%)
==============================================================================
Test Cover                                                                    
==============================================================================
Test renderBase                                                       | FAIL |
http://localhost:55001/plone/title-16/ != http://localhost:55001/plone/title-1/
------------------------------------------------------------------------------
Test Cover                                                            | FAIL |
1 critical test, 0 passed, 1 failed
1 test total, 0 passed, 1 failed
==============================================================================
Output:  /home/mubra/collective_01/parts/test/test_cover/Test_renderBase/output.xml



Failure in test Test renderBase (test_cover.robot)
Traceback (most recent call last):
  File "/home/mubra/collective_01/eggs/unittest2-0.5.1-py2.7.egg/unittest2/case.py", line 340, in run
    testMethod()
  File "/home/mubra/collective_01/eggs/robotsuite-1.7.0-py2.7.egg/robotsuite/__init__.py", line 461, in runTest
    assert last_status == 'PASS', last_message
AssertionError: http://localhost:55001/plone/title-16/ != http://localhost:55001/plone/title-1/

    22/23 (95.7%)
==============================================================================
Test Layout                                                                   
==============================================================================
Test Basic Layout Operations                                          | FAIL |
Xpath //div[contains(@class, 'cover-row')]//div[contains(@class, 'cover-column')] should have matched 3 times but matched 4 times
------------------------------------------------------------------------------
Test Layout                                                           | PASS |
0 critical tests, 0 passed, 0 failed
1 test total, 0 passed, 1 failed
==============================================================================
Output:  /home/mubra/collective_01/parts/test/test_layout/Test_Basic_Layout_Operations/output.xml

                  
  Ran 23 tests with 5 failures and 0 errors in 11 minutes 8.626 seconds.
Tearing down left over layers:
  Tear down collective.cover.testing.collective.cover:Robot in 0.000 seconds.
  Tear down plone.app.robotframework.remote.AutoLoginRemoteLibrary:RobotRemote in 0.007 seconds.
  Tear down plone.testing.z2.ZServer in 3.825 seconds.
  Tear down collective.cover.testing.Fixture in 0.031 seconds.
  Tear down plone.app.testing.layers.PloneFixture in 0.237 seconds.
  Tear down plone.testing.z2.Startup in 0.009 seconds.
  Tear down plone.testing.zca.LayerCleanup in 0.010 seconds.

@idgserpro
Copy link
Member

@Mubra you shouldn't start Plone to run ./bin/test -t robot. The tests have to work without that. What is your version of Firefox?

@Mubra
Copy link
Member Author

Mubra commented Oct 7, 2019

@idgserpro firefox 45.8.0esr, yes, I knew that version of firefox was needed on my system

@hvelarde
Copy link
Member

hvelarde commented Oct 7, 2019

please stop using this pull request as a chat room.

@collective collective locked as off-topic and limited conversation to collaborators Oct 7, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

dragged items-columns copied to all containers and resize (only on previously saved covers)
4 participants