Commit Graph

392 Commits

Author SHA1 Message Date
William Desportes
e816e45c18 phpstan level 0 (#14405)
* Fix phpdoc @return

- Fixed @return typehint

Signed-off-by: William Desportes <williamdes@wdes.fr>

* Fix incorrect case on function calls

Signed-off-by: William Desportes <williamdes@wdes.fr>

* Type hint + typo fix

Signed-off-by: William Desportes <williamdes@wdes.fr>

* Fixes

- @return fix
- @var fix
- Class names
- Throws fix
- test/classes/Plugins/Export/ExportSqlTest.php any() invoked with 1 parameter, 0 required
-  libraries/classes/Controllers/Table/TableStructureController.php Array has 2 duplicate keys with value 'columns_list'
- Call parent constructor  libraries/classes/Error.php

Signed-off-by: William Desportes <williamdes@wdes.fr>

* Update config

Signed-off-by: William Desportes <williamdes@wdes.fr>

* Access to an undefined property

- Access to an undefined property PhpMyAdmin\Plugins\Schema\Pdf\PdfRelationSchema::$diagram_row
- Access to an undefined property PhpMyAdmin\Plugins\Schema\Pdf\Pdf::$cMargin
- Undefined properties

Signed-off-by: William Desportes <williamdes@wdes.fr>

* Update config

Signed-off-by: William Desportes <williamdes@wdes.fr>

* Fix bootstrap-phpstan

Signed-off-by: William Desportes <williamdes@wdes.fr>

* Fix typos and phpstan config

Fixes: #14399
Signed-off-by: William Desportes <williamdes@wdes.fr>
2018-06-25 20:34:46 -03:00
Maurício Meneghini Fauth
2005cca77f Fix methods and properties visibility issues
Signed-off-by: Maurício Meneghini Fauth <mauriciofauth@gmail.com>
2018-05-30 21:02:26 -03:00
Maurício Meneghini Fauth
285e38e931 Fix some PSR-2 coding standard errors
Signed-off-by: Maurício Meneghini Fauth <mauriciofauth@gmail.com>
2018-05-30 09:07:56 -03:00
Maurício Meneghini Fauth
b9c0463d96 Use short array syntax instead of long array syntax
Replaces array() with [].

Signed-off-by: Maurício Meneghini Fauth <mauriciofauth@gmail.com>
2018-05-30 01:42:21 -03:00
Maurício Meneghini Fauth
baf0985e5f Fix phpcs errors
Signed-off-by: Maurício Meneghini Fauth <mauriciofauth@gmail.com>
2018-05-18 01:59:38 -03:00
Maurício Meneghini Fauth
dc8c92bfd8 Enable strict mode in test files
Signed-off-by: Maurício Meneghini Fauth <mauriciofauth@gmail.com>
2018-05-16 04:36:04 -03:00
Maurício Meneghini Fauth
e548d0802b Fix TableCreateTest::testCreateTable Selenium test
Signed-off-by: Maurício Meneghini Fauth <mauriciofauth@gmail.com>
2018-04-30 01:37:48 -03:00
Maurício Meneghini Fauth
8c0637a282 Upgrade Selenium tests to PHPUnit 6.5
Signed-off-by: Maurício Meneghini Fauth <mauriciofauth@gmail.com>
2018-04-13 00:48:19 -03:00
Gabriel Caruso
6ff73257e2 Simplify returns
Signed-off-by: Gabriel Caruso <carusogabriel34@gmail.com>
2018-01-16 10:16:56 -02:00
Michal Čihař
c9bdd1b268 Fix class name
Signed-off-by: Michal Čihař <michal@cihar.com>
2017-12-18 15:34:36 +01:00
Michal Čihař
a5ebbd9e55 Fix exception handling in selenium tests
Signed-off-by: Michal Čihař <michal@cihar.com>
2017-12-18 14:52:18 +01:00
Michal Čihař
7a6f85949a Fix mysqli class name
Signed-off-by: Michal Čihař <michal@cihar.com>
2017-12-18 13:42:52 +01:00
Michal Čihař
1957af5663 Remove PmaSelenium prefix from Selenium tests
It is good enough to have Selenium in the namespace.

Signed-off-by: Michal Čihař <michal@cihar.com>
2017-12-18 13:10:38 +01:00
Michal Čihař
8b8e68c6bf Use PSR-4 for loading selenium tests and adjust their names
Signed-off-by: Michal Čihař <michal@cihar.com>
2017-12-18 13:09:01 +01:00
Michal Čihař
4c2c38f341 Remove type hinting from onNotSuccessfulTest
Upstream has removed that as well.

Signed-off-by: Michal Čihař <michal@cihar.com>
2017-12-15 10:24:24 +01:00
Michal Čihař
dd38309300 Include timestamp when creating event in selenium tests
Signed-off-by: Michal Čihař <michal@cihar.com>
2017-11-29 12:47:41 +01:00
Michal Čihař
fe493f6d46 Avoid horizontal scrolling
It would have to subtract width of navigation and is not needed in most cases.

Signed-off-by: Michal Čihař <michal@cihar.com>
2017-11-29 10:31:34 +01:00
Michal Čihař
b74b23131c Scroll element into view
It might be hidden by console

Signed-off-by: Michal Čihař <michal@cihar.com>
2017-11-28 18:51:18 +01:00
Michal Čihař
fd9150460e Use fully CSS based icons
- themes can easier customize their look
- this better deals with previous JS code who relied on sprites (fixes #13815)

Signed-off-by: Michal Čihař <michal@cihar.com>
2017-11-27 13:47:43 +01:00
Michal Čihař
cedad5f931 Remove sprites from the themes
Signed-off-by: Michal Čihař <michal@cihar.com>
2017-11-13 14:12:12 +01:00
Michal Čihař
f281a217b1 Fix test expectation
Signed-off-by: Michal Čihař <michal@cihar.com>
2017-10-16 12:18:37 +02:00
Michal Čihař
6a645a3e89 Revert "Fix alignment of action and fixed tests #12167"
This reverts commit 9b56acacab.

Signed-off-by: Michal Čihař <michal@cihar.com>
2017-10-03 14:02:49 +02:00
Maurício Meneghini Fauth
1c111bf772 Merge pull request #13702 from ankitjain28may/ankitjain28may
Fix alignment of action #12167 

Fix #12167
2017-09-29 21:38:45 -03:00
Michal Čihař
3e7281e620 Include additional space in input
It seems that last char is sometimes lost and space is harmless

Signed-off-by: Michal Čihař <michal@cihar.com>
2017-09-28 11:10:36 +02:00
ankitjain28may
9b56acacab Fix alignment of action and fixed tests #12167
Signed-off-by: Ankit Jain <ankitjain28may77@gmail.com>
2017-09-26 01:37:02 +05:30
Michal Čihař
28345a5cd3 Skip QBE tests early
There is no need to bother with connecting to BrowserStack here.

Issue #13621

Signed-off-by: Michal Čihař <michal@cihar.com>
2017-09-07 16:24:14 +02:00
Michal Čihař
f1326358d2 Add separate wait for message to disappear
Signed-off-by: Michal Čihař <michal@cihar.com>
2017-09-07 15:35:33 +02:00
Michal Čihař
877d620c87 Add some missing AJAX waits in events/procedures/triggers
Signed-off-by: Michal Čihař <michal@cihar.com>
2017-09-07 15:17:06 +02:00
Michal Čihař
e9dece41a9 Simplify waitAjax
Wait only based on javascript flag.

Signed-off-by: Michal Čihař <michal@cihar.com>
2017-09-07 15:17:06 +02:00
Michal Čihař
3b19cbef9e Remove not needed waitForElement
The page is already loaded here, so there is no reason to wait.

Signed-off-by: Michal Čihař <michal@cihar.com>
2017-09-07 15:17:06 +02:00
Michal Čihař
580cb38562 We need to scroll relatively as getBoundingClientRect returns offset
Signed-off-by: Michal Čihař <michal@cihar.com>
2017-09-07 15:17:06 +02:00
Michal Čihař
2f13f070cb Ensure widgets are in the view
Scroll based on actuall widgets we target, not by arbitrary values.

Signed-off-by: Michal Čihař <michal@cihar.com>
2017-09-07 15:17:06 +02:00
Michal Čihař
fa2457cf3d Simplify entering form values
Use value() instead of click() and keys().

Signed-off-by: Michal Čihař <michal@cihar.com>
2017-09-07 15:17:06 +02:00
Michal Čihař
11ff884f6a Remove sleeps from export tests
Those really should not be necessary or we should add some dynamic waits.

Signed-off-by: Michal Čihař <michal@cihar.com>
2017-09-07 15:17:06 +02:00
Michal Čihař
2abb2db01d Remove sleep after scrollToBottom, should not be necessary
The javascript is executed synchronously, so there should be no delay.

Signed-off-by: Michal Čihař <michal@cihar.com>
2017-09-07 15:17:06 +02:00
Michal Čihař
5c40939e74 Remove some no longer needed waits and sleeps
Signed-off-by: Michal Čihař <michal@cihar.com>
2017-09-07 15:17:06 +02:00
Michal Čihař
c3f8315858 Fixed waiting for event/procedure/trigger drop
The nothing2display element is always present, sometimes it is just
hidden. Wait for AJAX completion instead.

Signed-off-by: Michal Čihař <michal@cihar.com>
2017-09-07 15:17:06 +02:00
Michal Čihař
037dde0e42 Share code for waiting for CodeMirror
It takes some time to initialize, so we should wait for it.

Signed-off-by: Michal Čihař <michal@cihar.com>
2017-09-07 15:17:06 +02:00
Michal Čihař
bbf84bd5f7 Remove strange wait loops
Those were most likely caused by wrong waiting on AJAX page load.

Signed-off-by: Michal Čihař <michal@cihar.com>
2017-09-07 15:17:06 +02:00
Michal Čihař
c674ab8791 Try getting element directly in waitForElement
This can avoid 3 round trips to Selenium server in most situations, so
it can help performance.

Signed-off-by: Michal Čihař <michal@cihar.com>
2017-09-07 15:17:06 +02:00
Michal Čihař
eae223215a Run Chrome tests on Windows
It seems to perform way better with webdriver than OS X.

Signed-off-by: Michal Čihař <michal@cihar.com>
2017-09-07 15:17:06 +02:00
Michal Čihař
eabdf845c3 Fix waiting for AJAX popup disappear in Selenium tests
Waiting for ajax_message_num_1 works only on first AJAX request and
we're doing more of them. This should remove need for many consequent
sleeps as we were actually not properly waiting for element.

Also it's better to wrap this logic in separate method as it is used in
many places in the code.

Signed-off-by: Michal Čihař <michal@cihar.com>
2017-09-07 15:17:06 +02:00
Michal Čihař
eefc2cc47e Skip broken test
See https://github.com/phpmyadmin/phpmyadmin/issues/13621

Signed-off-by: Michal Čihař <michal@cihar.com>
2017-09-05 14:45:29 +02:00
Deven Bansod
32c19d9710 Add sleep to allow the tables to resize and prevent possible errors
The elements are not properly aligned and hence the click does not go through

Signed-off-by: Deven Bansod <devenbansod.bits@gmail.com>
2017-08-23 16:12:33 +05:30
Deven Bansod
b72b5ab5f1 Add navigateDatabase method to prevent navigation errors
Signed-off-by: Deven Bansod <devenbansod.bits@gmail.com>
2017-08-22 16:42:37 +05:30
Deven Bansod
11bc4c6252 Replace usleep with sleep calls
Signed-off-by: Deven Bansod <devenbansod.bits@gmail.com>
2017-08-22 16:42:37 +05:30
Deven Bansod
8c32018335 Refactor methods in selenium tests
Signed-off-by: Deven Bansod <devenbansod.bits@gmail.com>
2017-08-22 16:42:37 +05:30
Michal Čihař
dac19fbe7e Merge pull request #13594 from devenbansod/fix_selenium_2
Fix random selenium failure tests
2017-08-21 11:01:05 +02:00
Deven Bansod
94d8d897ce Clear input fields to avoid duplicate texts
Signed-off-by: Deven Bansod <devenbansod.bits@gmail.com>
2017-08-20 13:49:37 +05:30
Deven Bansod
a5d6c06812 Fix another possible failure point in DbEvents - testAddEvent
See: https://travis-ci.org/phpmyadmin/phpmyadmin/jobs/266409700 for example

Signed-off-by: Deven Bansod <devenbansod.bits@gmail.com>
2017-08-20 13:01:17 +05:30