Skip to content
This repository has been archived by the owner on May 3, 2022. It is now read-only.

PlatformUI Context #230

Merged
merged 14 commits into from
Jul 30, 2015
Merged

Conversation

miguelcleverti
Copy link

Reworked PlatformUI BDD implementation

Removed JS completely and used the proper Mink methods to do the same thing. FieldTypes sentences (as seen in #211) base implementations are also done in conjunction with ezsystems/BehatBundle#24


class PlatformUI extends Context
{
const USER = "admin";
Copy link
Member

Choose a reason for hiding this comment

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

We should make that (+ password) configurable somehow. It is quite convenient to run BDD tests on an existing instance without changing your login & password.

@bdunogier
Copy link
Member

I'm a bit lost here: are the FieldType scenarii the same than then ones from #211 ? I can't see common commits between both pull requests.

@andrerom
Copy link
Contributor

@miguelcleverti / @pcardiga why is there a integer.feature here and also another one in #234 ?

@miguelcleverti
Copy link
Author

@bdunogier / @andrerom I added the scenario by mistake in this branch, I removed it.
@bdunogier now you can pass the username/password as a parameter in behat.yml context configuration, but it still defaults to admin/publish if nothing is provided are provided

@bdunogier
Copy link
Member

@bdunogier now you can pass the username/password as a parameter in behat.yml context configuration, but it still defaults to admin/publish if nothing is provided are provided

It makes sense, but wouldn't it be more consistent if the default login/password was in behat.yml.dist ? That way people know immediately how to change it.

@joaoinacio
Copy link
Contributor

@bdunogier: do you mean behat.yml? (see ezsystems/ezpublish-community#207 ;) )

@andrerom
Copy link
Contributor

Seems @lolautruche changed CS for all repos no? or was it temp problem maybe? :)

@lolautruche
Copy link
Contributor

@andrerom only for PlatformUIBundle. But yes, I changed the script on Jenkins

@miguelcleverti
Copy link
Author

@lolautruche @andrerom some of the files are not related to my PR, should I change only my files or do you want me to fix everything?

@lolautruche
Copy link
Contributor

@miguelcleverti Don't change anything for now.
We're gonna switch to PSR-2 for CS, so you'll have to change this, but wait for #239 to be merged

@lolautruche
Copy link
Contributor

@miguelcleverti #239 is now merged. Please rebase your branch now and update your PR to comply PSR-2.

Thanks :-)

@miguelcleverti miguelcleverti force-pushed the PlatFormUIBDDCore branch 2 times, most recently from dbe6b55 to 9259b24 Compare June 1, 2015 10:20
@miguelcleverti
Copy link
Author

Changed the cs and squashed some commits

@andrerom
Copy link
Contributor

andrerom commented Jun 4, 2015

looks better now, your pov @bdunogier ?


/**
* File containing the main context class for PlatformUI
* This flie contains the mapping of the BDD sentences to the functions that implement them
Copy link
Member

Choose a reason for hiding this comment

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

flie => fly. Bugfree code ;-)

@dpobel
Copy link
Contributor

dpobel commented Jun 4, 2015

The scenario are very confusing because you call almost everything side menu, navigation menu or worse link. Widgets have names, it would be nice to try to stick to them, here's schema to help:

platformui_domain

@@ -0,0 +1,132 @@
Feature: Login on PlatformUI
Copy link
Member

Choose a reason for hiding this comment

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

Is it really what is tested here ? Besides the first scenario, they look more like navigation scenarios.

@andrerom
Copy link
Contributor

andrerom commented Jun 4, 2015

Awesome @dpobel, @ezsystems/qa-team can the domain language be updated to use the terms described by @dpobel ?

@andrerom andrerom added the BDD label Jun 9, 2015
@bdunogier
Copy link
Member

Ping @miguelcleverti.

@miguelcleverti
Copy link
Author

@bdunogier, @dpobel, @andrerom the changes to the domain language that @dpobel referred were mostly already done, the standard feature file was outdated. I improved the bar menus button clicking, now there is a difference between the discovery, the action and the edit menu bar. I also rebased to master.


/**
* @Given I click (on) the edit action bar button :button
* Click on a PlatformUI action bar
Copy link
Contributor

Choose a reason for hiding this comment

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

Nitpick: should probably specify the "Edit" action bar here?

*
* @param string $button Text of the element to click
*/
public function overNavigationZone($zone)
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe I'm missing something here, but the hovering behavior has been removed right? /cc @dpobel

Copy link
Author

Choose a reason for hiding this comment

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

@andrerom This is a piece of sneaky code that survived the clean up 😅. Removed!

@bdunogier
Copy link
Member

During the workshops, it was asked if there was like a minimal behat test running on PlatformUI. The answer was unfortunately no.

Seeing this PR, it seems to me that we have like everything we need or close. If we extract the Authentication Context + the Common one, we can have a simple scenario that tries to login on PlatformUI, and asserts that the homepage is how it should be.

This would ensure that PlatformUI works (e.g. you can login, and the basic content is retrieved) on pull-requests. It's a small step, bug a big insurance.

Could we do that ? Ping @andrerom @miguelcleverti @dpobel.

@bdunogier
Copy link
Member

Alternative is to merge it, since it passes, and update the sentences as we use them. I'm not a huge fan* of committing code we don't use and agreed upon, but I could agree.

Turbine

@andrerom
Copy link
Contributor

+1

1 similar comment
@bdunogier
Copy link
Member

+1

bdunogier added a commit that referenced this pull request Jul 30, 2015
@bdunogier bdunogier merged commit 822b03e into ezsystems:master Jul 30, 2015
@bdunogier
Copy link
Member

Merged, please rebase issues that depend on this.

@miguelcleverti miguelcleverti deleted the PlatFormUIBDDCore branch November 26, 2015 11:22
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Development

Successfully merging this pull request may close these issues.

6 participants