Skip to content

Commit

Permalink
Try to fix
Browse files Browse the repository at this point in the history
  • Loading branch information
AndreyBelym committed Oct 24, 2018
1 parent fd42bf3 commit 1179838
Show file tree
Hide file tree
Showing 7 changed files with 13 additions and 29 deletions.
11 changes: 4 additions & 7 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,19 @@ pool: 'BrowserStack agents'

steps:
- bash: |
if [[ $BUILD_SOURCEVERSIONMESSAGE =~ ^\[docs\] ]] || [[ ! -f "appveyor.yml" ]]; then
if [[ $BUILD_SOURCEVERSIONMESSAGE =~ ^\[docs\] ]] || [[ ! -f "appveyor.yml" ]]; then
echo '##vso[task.setvariable variable=isDocCommit]true'
fi
displayName: 'Check commit type'

- task: NodeTool@0
displayName: 'Install Node.js'
condition: not(variables['isDocCommit'])
inputs:
versionSpec: '11.x'

- bash: |
npm install
npm install || npm install || npm install
npm test
displayName: 'Run tests'
condition: not(variables['isDocCommit'])
env:
BROWSER_STACK_USERNAME: $(BROWSER_STACK_USERNAME)
BROWSER_STACK_ACCESS_KEY: $(BROWSER_STACK_ACCESS_KEY)
14 changes: 0 additions & 14 deletions test/functional/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,12 +49,6 @@ testingEnvironments[testingEnvironmentNames.osXDesktopAndMSEdgeBrowsers] = {
osVersion: 'High Sierra',
name: 'firefox',
alias: 'firefox-osx'
},
{
os: 'Windows',
osVersion: '10',
name: 'edge',
alias: 'edge',
}
]
};
Expand All @@ -70,14 +64,6 @@ testingEnvironments[testingEnvironmentNames.mobileBrowsers] = {
retryTestPages: true,

browsers: [
{
realMobile: true,
os: 'android',
osVersion: '8.0',
device: 'Google Pixel 2',
name: 'Android',
alias: 'android'
},
{
realMobile: true,
os: 'ios',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ describe('[API] Generic errors', function () {
describe('External assertion library error', function () {
it('Should handle Node built-in assertion lib error', function () {
const NODE_11_ASSERTION_MESSAGE = [
'AssertionError [ERR_ASSERTION]: Input A expected to strictly equal input B:',
'AssertionError [ERR_ASSERTION]: Expected values to be strictly equal:',
'+ actual - expected',
'',
'+ \'answer\'',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,14 @@
<title>PageLoadTimeout (window load long)</title>
</head>
<body>
<img src="./img.png?delay=10000" />
<script>
window.pageOpenedTime = Date.now();

window.addEventListener('load', function () {
window.loadEventRaised = true;
});
</script>
<img src="./img.png?delay=10000" />
<script>
window.pageOpenedTime = Date.now();
</script>
</body>
</html>
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@
<title>PageLoadTimeout (window load)</title>
</head>
<body>
<img src="./img.png?delay=1000" />
<script>
window.addEventListener('load', function () {
window.loadEventRaised = true;
});
</script>
<img src="./img.png?delay=1000" />
</body>
</html>
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
describe('Should wait for the window.load event if necessary', function () {
it('Should wait for the window.load event if there are user event handlers for it (set timeout via an option)', function () {
return runTests('testcafe-fixtures/index-test.js', 'Wait for window.load (set timeout via an option)', { pageLoadTimeout: 5000 });
return runTests('testcafe-fixtures/index-test.js', 'Wait for window.load (set timeout via an option)', { pageLoadTimeout: 10000 });
});

it('Should wait for the window.load event if there are user event handlers for it (set timeout via `t`)', function () {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,15 @@ test
test
('Wait for window.load (set timeout via `t`)', async t => {
await t
.setPageLoadTimeout(5000)
.setPageLoadTimeout(10000)
.navigateTo('http://localhost:3000/fixtures/api/es-next/page-load-timeout/pages/window-load.html')
.expect(ClientFunction(() => window.loadEventRaised)()).ok('Test started before window.load', { timeout: 0 });
});

test
('Wait for window.load in iframe', async t => {
await t
.setPageLoadTimeout(5000)
.setPageLoadTimeout(10000)
.navigateTo('http://localhost:3000/fixtures/api/es-next/page-load-timeout/pages/with-iframe.html')
.switchToIframe('#iframe')
.expect(ClientFunction(() => window.loadEventRaised)()).ok('Test started before window.load', { timeout: 0 });
Expand Down

0 comments on commit 1179838

Please sign in to comment.