-
-
Notifications
You must be signed in to change notification settings - Fork 43
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature/multi remote support #272
Merged
vobu
merged 17 commits into
ui5-community:main
from
monavari-lebrecht:feature/MultiRemoteSupport
Jun 24, 2022
Merged
Changes from all commits
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
82c0ef8
feat: add command asControl for multi remote to each browser
monavari-lebrecht 4239c35
Merge branch 'main' into feature/MultiRemoteSupport
monavari-lebrecht 271dbdb
feat: add support for multiremotedriver to call instances implicit
monavari-lebrecht 04bc056
Merge branch 'main' into feature/MultiRemoteSupport
monavari-lebrecht 92663d5
feat: add support for ui5ready, navTo, make all tests running again
monavari-lebrecht 9814022
feat: add missing browserinstance ref in browser js
monavari-lebrecht af19359
Merge branch 'main' into feature/MultiRemoteSupport
monavari-lebrecht 482a2d1
feat: move multiremote config to new location
monavari-lebrecht 60a3443
feat: add headless support for multiremote
monavari-lebrecht c7d2e96
fix: remove DRY, due to prior merge conflict
monavari-lebrecht 5b61960
feat: #281 add missing browser instance references to cliend side js
monavari-lebrecht 1354fcc
feat: set browser as default parameter for ui5 inject
monavari-lebrecht d345d01
feat: change check for ui5 version on multiremote
monavari-lebrecht 58d2063
Merge branch 'main' into feature/MultiRemoteSupport
monavari-lebrecht a4d1124
fix: linting issues
monavari-lebrecht 56dc16d
chore: bump chromedriver to 103.0.0
monavari-lebrecht a967506
chore: set default screen size for testing cap to 1920x1280
monavari-lebrecht File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
47 changes: 47 additions & 0 deletions
47
examples/ui5-js-app/e2e-test-config/wdio-multiremote.conf.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
const { baseConfig } = require("./wdio.base.conf") | ||
const { join } = require("path") | ||
const merge = require("deepmerge") | ||
|
||
// avoid multiple chrome sessions | ||
delete baseConfig.capabilities | ||
|
||
const _config = { | ||
wdi5: { | ||
url: "#", | ||
screenshotPath: join("report", "screenshots") | ||
}, | ||
maxInstances: 1, | ||
capabilities: { | ||
one: { | ||
capabilities: { | ||
browserName: "chrome", | ||
acceptInsecureCerts: true, | ||
"goog:chromeOptions": { | ||
args: | ||
process.argv.indexOf("--headless") > -1 | ||
? ["window-size=1440,800", "--headless"] | ||
: process.argv.indexOf("--debug") > -1 | ||
? ["window-size=1920,1280", "--auto-open-devtools-for-tabs"] | ||
: ["window-size=1440,800"] | ||
} | ||
} | ||
}, | ||
two: { | ||
capabilities: { | ||
browserName: "chrome", | ||
acceptInsecureCerts: true, | ||
"goog:chromeOptions": { | ||
args: | ||
process.argv.indexOf("--headless") > -1 | ||
? ["window-size=1440,800", "--headless"] | ||
: process.argv.indexOf("--debug") > -1 | ||
? ["window-size=1920,1280", "--auto-open-devtools-for-tabs"] | ||
: ["window-size=1440,800"] | ||
} | ||
} | ||
} | ||
}, | ||
specs: ["webapp/test/e2e/multiremote.test.js"] | ||
} | ||
|
||
exports.config = merge(baseConfig, _config) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
const Main = require("./pageObjects/Main") | ||
describe("Multi Remote", () => { | ||
before(async () => { | ||
await Main.open() | ||
}) | ||
|
||
it("allows handling ui5 controls in different browsers", async () => { | ||
const button = await browser.two.asControl({ | ||
selector: { | ||
id: "openDialogButton", | ||
viewName: "test.Sample.view.Main" | ||
} | ||
}) | ||
const metadata = button.getControlInfo() | ||
|
||
expect(metadata.id).toEqual("container-Sample---Main--openDialogButton") | ||
expect(metadata.className).toEqual("sap.m.Button") | ||
expect(metadata.key).toEqual("openDialogButtontestSample.view.Main") | ||
|
||
await button.press() | ||
|
||
const dialogSelector = { | ||
selector: { | ||
id: "Dialog-title", | ||
searchOpenDialogs: true | ||
} | ||
} | ||
|
||
const text = await browser.two.asControl(dialogSelector).getText() | ||
expect(text).toEqual("Here we are!") | ||
expect(await browser.one.asControl(dialogSelector).getInitStatus()).toBeFalsy() | ||
}) | ||
it("should return an array of results of both browsers if called directly by browser", async () => { | ||
const button = await browser.asControl({ | ||
selector: { | ||
id: "openDialogButton", | ||
viewName: "test.Sample.view.Main" | ||
} | ||
}) | ||
const buttonOne = button[0] | ||
const buttonTwo = button[1] | ||
expect(buttonOne._browserInstance.sessionId).not.toEqual(buttonTwo._browserInstance.sessionId) | ||
|
||
expect(await buttonOne.getText()).toEqual("open Dialog") | ||
expect(await buttonTwo.getText()).toEqual("open Dialog") | ||
}) | ||
}) |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why no use of
browserInstance
in filesclient-side-js/
_navTo, getUI5Version, injectTools, injectUI5, testLibrary
?