diff --git a/package-lock.json b/package-lock.json
index 38765b020ed..36a3454b958 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -235,7 +235,6 @@
"resolved": "https://registry.npmjs.org/@babel/core/-/core-7.28.3.tgz",
"integrity": "sha512-yDBHV9kQNcr2/sUr9jghVyz9C3Y5G2zUM2H2lo+9mKv4sFgbA8s8Z9t8D1jiTkGoO/NoIfKMyKWr4s6CN23ZwQ==",
"license": "MIT",
- "peer": true,
"dependencies": {
"@ampproject/remapping": "^2.2.0",
"@babel/code-frame": "^7.27.1",
@@ -3226,7 +3225,6 @@
"integrity": "sha512-VlJEV0fOQ7BExOsHYAGrgbEiZoi8D+Bl2+f6V2RrXerRSylnp+ZBHmPvaIa8cz0Ajx7WO7Z5RqfgYg7ED1nRhA==",
"dev": true,
"license": "BSD-2-Clause",
- "peer": true,
"dependencies": {
"@typescript-eslint/scope-manager": "5.62.0",
"@typescript-eslint/types": "5.62.0",
@@ -3622,7 +3620,6 @@
"integrity": "sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A==",
"dev": true,
"license": "MIT",
- "peer": true,
"bin": {
"acorn": "bin/acorn"
},
@@ -4823,7 +4820,6 @@
}
],
"license": "MIT",
- "peer": true,
"dependencies": {
"caniuse-lite": "^1.0.30001733",
"electron-to-chromium": "^1.5.199",
@@ -5132,7 +5128,6 @@
"resolved": "https://registry.npmjs.org/chai/-/chai-4.3.4.tgz",
"integrity": "sha512-yS5H68VYOCtN1cjfwumDSuzn/9c+yza4f3reKXlE5rUg7SFcCEy90gJvydNgOYtblyf4Zi6jIWRnXOgErta0KA==",
"license": "MIT",
- "peer": true,
"dependencies": {
"assertion-error": "^1.1.0",
"check-error": "^1.0.2",
@@ -6764,7 +6759,6 @@
"deprecated": "This version is no longer supported. Please see https://eslint.org/version-support for other options.",
"dev": true,
"license": "MIT",
- "peer": true,
"dependencies": {
"@babel/code-frame": "7.12.11",
"@eslint/eslintrc": "^0.4.3",
@@ -15392,7 +15386,6 @@
"integrity": "sha512-fS6iqSPZDs3dr/y7Od6y5nha8dW1YnbgtsyotCVvoFGKbERG++CVRFv1meyGDE1SNItQA8BrnCw7ScdAhRJ3XQ==",
"dev": true,
"license": "MIT",
- "peer": true,
"bin": {
"rollup": "dist/bin/rollup"
},
@@ -17643,7 +17636,6 @@
"resolved": "https://registry.npmjs.org/typescript/-/typescript-4.7.4.tgz",
"integrity": "sha512-C0WQT0gezHuw6AdY1M2jxUO83Rjf0HP7Sk1DtXj6j1EwkQNZrHAg2XPWlq62oqEhYvONq5pkC2Y9oPljWToLmQ==",
"license": "Apache-2.0",
- "peer": true,
"bin": {
"tsc": "bin/tsc",
"tsserver": "bin/tsserver"
diff --git a/src/configuration/testcafe-configuration.ts b/src/configuration/testcafe-configuration.ts
index 3c8fbdf7688..83b942ee970 100644
--- a/src/configuration/testcafe-configuration.ts
+++ b/src/configuration/testcafe-configuration.ts
@@ -330,10 +330,12 @@ export default class TestCafeConfiguration extends Configuration {
this.mergeOptions({ hostname });
}
- public async calculateHostname ({ nativeAutomation } = { nativeAutomation: false }): Promise
diff --git a/test/functional/fixtures/api/es-next/iframe-switching/pages/second.html b/test/functional/fixtures/api/es-next/iframe-switching/pages/second.html index bf316045d96..b3ed78196aa 100644 --- a/test/functional/fixtures/api/es-next/iframe-switching/pages/second.html +++ b/test/functional/fixtures/api/es-next/iframe-switching/pages/second.html @@ -9,6 +9,7 @@ diff --git a/test/functional/fixtures/api/es-next/iframe-switching/testcafe-fixtures/iframe-switching-test.js b/test/functional/fixtures/api/es-next/iframe-switching/testcafe-fixtures/iframe-switching-test.js index 1a5b81da777..9c738b6f89f 100644 --- a/test/functional/fixtures/api/es-next/iframe-switching/testcafe-fixtures/iframe-switching-test.js +++ b/test/functional/fixtures/api/es-next/iframe-switching/testcafe-fixtures/iframe-switching-test.js @@ -132,32 +132,28 @@ test('Remove an iframe during execution', async t => { test('Click in a removed iframe', async t => { await t .switchToIframe('#iframe') + .wait(500) .click('#remove-from-parent-btn') + .wait(500) .click('#btn'); }); test('Click in an iframe with redirect', async t => { - const getSecondPageBtnClickCount = ClientFunction(() => window.secondPageBtnClickCount); - const getNestedSecondPageBtnClickCount = ClientFunction(() => window.nestedSecondPageBtnClickCount); - await t .switchToIframe('#iframe') .switchToIframe('#iframe') .click('#link') - .click('#nested-second-page-btn'); - - const nestedSecondPageBtnClickCount = await getNestedSecondPageBtnClickCount(); + .wait(500) + .click('#nested-second-page-btn') + .expect(Selector('#nested-second-page-btn').innerText).eql('clicked'); await t .switchToMainWindow() .switchToIframe('#iframe') .click('#link') - .click('#second-page-btn'); - - const secondPageBtnClickCount = await getSecondPageBtnClickCount(); - - expect(nestedSecondPageBtnClickCount).eql(1); - expect(secondPageBtnClickCount).eql(1); + .wait(500) + .click('#second-page-btn') + .expect(Selector('#second-page-btn').innerText).eql('clicked'); }); test('Reload the main page from an iframe', async t => { @@ -208,14 +204,12 @@ test('Click in an iframe without src', async t => { }); test('Click in a cross-domain iframe with redirect', async t => { - const getSecondPageBtnClickCount = ClientFunction(() => window.secondPageBtnClickCount); - await t .switchToIframe('#cross-domain-iframe') .click('#link') - .click('#second-page-btn'); - - const secondPageBtnClickCount = await getSecondPageBtnClickCount(); + .wait(500) + .click('#second-page-btn') + .expect(Selector('#second-page-btn').innerText).eql('clicked'); await t .switchToMainWindow() @@ -224,7 +218,6 @@ test('Click in a cross-domain iframe with redirect', async t => { const btnClickCount = await getBtnClickCount(); expect(btnClickCount).eql(1); - expect(secondPageBtnClickCount).eql(1); }); test("Click in a iframe that's loading too slowly", async t => { diff --git a/test/functional/fixtures/regression/gh-8391/pages/index.html b/test/functional/fixtures/regression/gh-8391/pages/index.html new file mode 100644 index 00000000000..acade237284 --- /dev/null +++ b/test/functional/fixtures/regression/gh-8391/pages/index.html @@ -0,0 +1,10 @@ + + +
+ +
+ +
+