Skip to content

Commit 0ba6e22

Browse files
committed
disabled some tests on firefox
1 parent a113f71 commit 0ba6e22

File tree

5 files changed

+85
-4
lines changed

5 files changed

+85
-4
lines changed

.github/workflows/webdriver-chrome.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ jobs:
3636
run: php -S 127.0.0.1:8000 -t tests/data/app >/dev/null 2>&1 &
3737

3838
- name: Tests
39-
run: php ./vendor/bin/codecept run
39+
run: php ./vendor/bin/codecept run --env chrome
4040

4141
# Add a test script to composer.json, for instance: "test": "vendor/bin/phpunit"
4242
# Docs: https://getcomposer.org/doc/articles/scripts.md

tests/unit/Codeception/Module/TestsForWeb.php

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -992,6 +992,9 @@ public function testExample5()
992992
$this->module->seeCurrentUrlEquals('/form/example5?username=John&password=1234');
993993
}
994994

995+
/**
996+
* @env chrome
997+
*/
995998
public function testExample5WithSubmitForm()
996999
{
9971000
$this->module->amOnPage('/form/example5');
@@ -1008,6 +1011,9 @@ public function testExample5WithParams()
10081011
$this->module->seeCurrentUrlEquals('/form/example5?username=John&password=1234');
10091012
}
10101013

1014+
/**
1015+
* @env chrome
1016+
*/
10111017
public function testExample5WithSubmitFormAndParams()
10121018
{
10131019
$this->module->amOnPage('/form/example5?a=b');
@@ -1033,6 +1039,9 @@ public function testExample9()
10331039
$this->assertArrayHasKey('form_name', $form);
10341040
}
10351041

1042+
/**
1043+
* @env chrome
1044+
*/
10361045
public function testSubmitForm()
10371046
{
10381047
$this->module->amOnPage('/form/complex');
@@ -1050,6 +1059,9 @@ public function testSubmitForm()
10501059
$this->assertEquals('kill_all', $form['action']);
10511060
}
10521061

1062+
/**
1063+
* @env chrome
1064+
*/
10531065
public function testSubmitFormWithFillField()
10541066
{
10551067
$this->module->amOnPage('/form/complex');
@@ -1063,6 +1075,9 @@ public function testSubmitFormWithFillField()
10631075
$this->assertEquals('Is from Iliyum, NY', $form['description']);
10641076
}
10651077

1078+
/**
1079+
* @env chrome
1080+
*/
10661081
public function testSubmitFormWithoutButton()
10671082
{
10681083
$this->module->amOnPage('/form/empty');
@@ -1073,6 +1088,9 @@ public function testSubmitFormWithoutButton()
10731088
$this->assertEquals('Hello!', $form['text']);
10741089
}
10751090

1091+
/**
1092+
* @env chrome
1093+
*/
10761094
public function testSubmitFormWithAmpersand()
10771095
{
10781096
$this->module->amOnPage('/form/submitform_ampersands');
@@ -1081,6 +1099,9 @@ public function testSubmitFormWithAmpersand()
10811099
$this->assertEquals('this & that', $form['test']);
10821100
}
10831101

1102+
/**
1103+
* @env chrome
1104+
*/
10841105
public function testSubmitFormWithArrayField()
10851106
{
10861107
$this->module->amOnPage('/form/example17');
@@ -1090,6 +1111,9 @@ public function testSubmitFormWithArrayField()
10901111
$this->assertArrayNotHasKey('FooBar[bar]', $data);
10911112
}
10921113

1114+
/**
1115+
* @env chrome
1116+
*/
10931117
public function testSubmitFormMultiSelectWithArrayParameter()
10941118
{
10951119
$this->module->amOnPage('/form/submitform_multiple');
@@ -1105,6 +1129,9 @@ public function testSubmitFormMultiSelectWithArrayParameter()
11051129
$this->assertEquals('not seen four', $form['select'][1]);
11061130
}
11071131

1132+
/**
1133+
* @env chrome
1134+
*/
11081135
public function testSubmitFormWithMultiSelect()
11091136
{
11101137
$this->module->amOnPage('/form/submitform_multiple');
@@ -1115,6 +1142,9 @@ public function testSubmitFormWithMultiSelect()
11151142
$this->assertEquals('see test two', $form['select'][1]);
11161143
}
11171144

1145+
/**
1146+
* @env chrome
1147+
*/
11181148
public function testSubmitFormCheckboxWithArrayParameter()
11191149
{
11201150
$this->module->amOnPage('/form/field_values');
@@ -1132,6 +1162,9 @@ public function testSubmitFormCheckboxWithArrayParameter()
11321162
$this->assertEquals('not seen three', $form['checkbox'][2]);
11331163
}
11341164

1165+
/**
1166+
* @env chrome
1167+
*/
11351168
public function testSubmitFormCheckboxWithBooleanArrayParameter()
11361169
{
11371170
$this->module->amOnPage('/form/field_values');
@@ -1157,6 +1190,9 @@ public function testFillingFormFieldWithoutSubmitButton()
11571190
$this->module->fillField('test', 'value');
11581191
}
11591192

1193+
/**
1194+
* @env chrome
1195+
*/
11601196
public function testSubmitFormWithDefaultTextareaValue()
11611197
{
11621198
$this->module->amOnPage('/form/textarea');
@@ -1217,6 +1253,7 @@ public function testSubmitFormWithTwoSubmitButtonsSubmitsCorrectValue()
12171253
}
12181254

12191255
/**
1256+
* @env chrome
12201257
* https://github.com/Codeception/Codeception/issues/1051
12211258
*/
12221259
public function testSubmitFormWithTwoSubmitButtonsSubmitsCorrectValueAfterFillField()
@@ -1232,6 +1269,7 @@ public function testSubmitFormWithTwoSubmitButtonsSubmitsCorrectValueAfterFillFi
12321269
}
12331270

12341271
/*
1272+
* @env chrome
12351273
* https://github.com/Codeception/Codeception/issues/1274
12361274
*/
12371275
public function testSubmitFormWithDocRelativePathForAction()
@@ -1243,6 +1281,9 @@ public function testSubmitFormWithDocRelativePathForAction()
12431281
$this->module->seeCurrentUrlEquals('/form/example11');
12441282
}
12451283

1284+
/**
1285+
* @env chrome
1286+
*/
12461287
public function testSubmitFormWithDocRelativePathForActionFromDefaultPage()
12471288
{
12481289
$this->module->amOnPage('/form/');
@@ -1260,6 +1301,7 @@ public function testLinkWithDocRelativeURLFromDefaultPage()
12601301
}
12611302

12621303
/*
1304+
* @env chrome
12631305
* https://github.com/Codeception/Codeception/issues/1507
12641306
*/
12651307
public function testSubmitFormWithDefaultRadioAndCheckboxValues()
@@ -1275,6 +1317,9 @@ public function testSubmitFormWithDefaultRadioAndCheckboxValues()
12751317
$this->assertEquals('to be sent', $form['radio1']);
12761318
}
12771319

1320+
/**
1321+
* @env chrome
1322+
*/
12781323
public function testSubmitFormCheckboxWithBoolean()
12791324
{
12801325
$this->module->amOnPage('/form/example16');
@@ -1293,13 +1338,19 @@ public function testSubmitFormCheckboxWithBoolean()
12931338
$this->assertArrayNotHasKey('checkbox1', $form, 'Checkbox value sent');
12941339
}
12951340

1341+
/**
1342+
* @env chrome
1343+
*/
12961344
public function testSubmitFormWithCheckboxesWithoutValue()
12971345
{
12981346
$this->module->amOnPage('/form/checkbox_default_value');
12991347
$this->module->submitForm('form', ['checkbox1' => true]);
13001348
$this->assertSame('on', data::get('query')['checkbox1']);
13011349
}
13021350

1351+
/**
1352+
* @env chrome
1353+
*/
13031354
public function testSubmitFormWithButtons()
13041355
{
13051356
$this->module->amOnPage('/form/form_with_buttons');
@@ -1408,6 +1459,7 @@ public function testTextFieldByNameFirstNotCss()
14081459
}
14091460

14101461
/**
1462+
* @env chrome
14111463
* @Issue https://github.com/Codeception/Codeception/issues/1585
14121464
* @Issue https://github.com/Codeception/Codeception/issues/1602
14131465
*/
@@ -1425,6 +1477,9 @@ public function testUnreachableField()
14251477
$this->assertContains('davert', $data['users']);
14261478
}
14271479

1480+
/**
1481+
* @env chrome
1482+
*/
14281483
public function testSubmitAdjacentForms()
14291484
{
14301485
$this->module->amOnPage('/form/submit_adjacentforms');

tests/web.suite.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ modules:
66
url: http://localhost:8000
77
browser: chrome
88
window_size: 1200x768
9-
restart: false # Use a new browser window for each test (to isolate test cases from each other)
9+
restart: true # Use a new browser window for each test (to isolate test cases from each other)
1010
env:
1111
firefox:
1212
modules:

tests/web/FriendWithStepsCept.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
$I = new WebGuy($scenario);
33
$I->wantTo('call friend with steps to ask expert work');
44
$I->amOnPage('/info');
5-
$john = $I->haveFriend('john', '\WebGuy\Steps\RootWatcher');
5+
$john = $I->haveFriend('john', '\Step\RootWatcher');
66
$john->does(function (\Step\RootWatcher $I) {
77
$I->seeInRootPage('Welcome to test app!');
88
});

tests/web/WebDriverTest.php

Lines changed: 27 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,6 +161,9 @@ public function testSnapshot()
161161
@unlink(\Codeception\Configuration::outputDir().'debug/'.$testName.'.html');
162162
}
163163

164+
/**
165+
* @env chrome
166+
*/
164167
public function testSubmitForm()
165168
{
166169
$this->module->amOnPage('/form/complex');
@@ -177,6 +180,10 @@ public function testSubmitForm()
177180
$this->assertEquals('agree', $form['terms']);
178181
$this->assertEquals('child', $form['age']);
179182
}
183+
184+
/**
185+
* @env chrome
186+
*/
180187
public function testSubmitFormWithNumbers()
181188
{
182189
$this->module->amOnPage('/form/complex');
@@ -195,6 +202,7 @@ public function testSubmitFormWithNumbers()
195202
}
196203

197204
/**
205+
* @env chrome
198206
* @dataProvider strictSelectorProvider
199207
*/
200208
public function testSubmitFormWithButtonAsStrictSelector(array $selector)
@@ -229,6 +237,7 @@ public function strictSelectorProvider()
229237
}
230238

231239
/**
240+
* @env chrome
232241
* @dataProvider webDriverByProvider
233242
*/
234243
public function testSubmitFormWithButtonAsWebDriverBy(WebDriverBy $selector)
@@ -301,6 +310,9 @@ public function testRawSelenium()
301310
$this->module->seeCurrentUrlEquals('/info');
302311
}
303312

313+
/**
314+
* @env chrome
315+
*/
304316
public function testKeys()
305317
{
306318
$this->module->amOnPage('/form/field');
@@ -440,7 +452,11 @@ public function testAppendFieldRadioButtonByLabelFails()
440452
$this->module->appendField('form input[name=terms]', 'Get Off123');
441453
}
442454

443-
// Issue https://github.com/Codeception/Codeception/pull/875
455+
//
456+
/**
457+
* @Issue https://github.com/Codeception/Codeception/pull/875
458+
* @env chrome
459+
*/
444460
public function testFillPasswordOnFormSubmit()
445461
{
446462
$this->module->amOnPage('/form/complex');
@@ -451,6 +467,9 @@ public function testFillPasswordOnFormSubmit()
451467
$this->assertEquals('123456', $form['password']);
452468
}
453469

470+
/**
471+
* @env chrome
472+
*/
454473
public function testEmptyFormSubmit()
455474
{
456475
$this->shouldFail();
@@ -766,6 +785,9 @@ public function testSeeInFieldSelect()
766785
$this->module->seeInField('#select2', $option_value);
767786
}
768787

788+
/**
789+
* @env chrome
790+
*/
769791
public function testAppendFieldDiv()
770792
{
771793
$this->notForPhantomJS();
@@ -895,6 +917,7 @@ public function testSubmitHashButtonForm()
895917

896918
/**
897919
* @group window
920+
* @env chrome
898921
*/
899922
public function testMoveMouseOver()
900923
{
@@ -919,6 +942,7 @@ public function testMoveMouseOver()
919942

920943
/**
921944
* @group window
945+
* @env chrome
922946
*/
923947
public function testLeftClick()
924948
{
@@ -942,6 +966,7 @@ public function testLeftClick()
942966

943967
/**
944968
* @group window
969+
* @env chrome
945970
*/
946971
public function testRightClick()
947972
{
@@ -1076,6 +1101,7 @@ public function testSwitchToIframe()
10761101
}
10771102

10781103
/**
1104+
* @env chrome
10791105
* @group window
10801106
*/
10811107
public function testGrabPageSourceWhenNotOnPage()

0 commit comments

Comments
 (0)