-
Notifications
You must be signed in to change notification settings - Fork 7.2k
feat(webdriverio): Add webdriverio end to end test framework. #11016
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
Open
tudor-phd
wants to merge
43
commits into
jitsi:master
Choose a base branch
from
tudor-phd:webdriverio
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+9,950
−4,316
Open
Changes from 25 commits
Commits
Show all changes
43 commits
Select commit
Hold shift + click to select a range
9857ad9
feat(webdriverio-tests): Create setup for webdriverio.
4fa46c8
feat(webdriverio-tests): Create setup for webdriverio.
c45b50d
webdriverio wip
537df4f
feat(webdriverio): Add webdriverio end to end test framework.
7183f9a
feat(webdriverio): Add webdriverio end to end test framework.
aee5bea
feat(webdriverio): Add webdriverio end to end test framework.
07a3413
feat(webdriverio): Add webdriverio end to end test framework.
2c8067d
feat(webdriverio): Add webdriverio end to end test framework.
2bac41e
feat(webdriverio): Add webdriverio end to end test framework.
654431d
feat(webdriverio): Add webdriverio end to end test framework.
47d2494
feat(webdriverio): Add webdriverio end to end test framework.
56ba3a4
feat(webdriverio): Add webdriverio end to end test framework.
6bd9bab
feat(webdriverio): Add webdriverio end to end test framework.
5c15a4f
feat(webdriverio): Add webdriverio end to end test framework.
0398937
feat(webdriverio): Add webdriverio end to end test framework.
18baa8e
feat(webdriverio): Add webdriverio end to end test framework.
d9fb63c
feat(webdriverio): Add webdriverio end to end test framework.
c9ece1e
feat(webdriverio): Add webdriverio end to end test framework.
5888e73
feat(webdriverio): Add webdriverio end to end test framework.
05a17c4
feat(webdriverio): Add webdriverio end to end test framework.
a3171c5
feat(webdriverio): Add webdriverio end to end test framework.
f4e7790
feat(webdriverio): Add webdriverio end to end test framework.
676e94b
feat(webdriverio): Add webdriverio end to end test framework.
72eba04
feat(webdriverio): Add webdriverio end to end test framework.
28842ee
feat(webdriverio): Add webdriverio end to end test framework.
888e8a4
feat(webdriverio): Add webdriverio end to end test framework.
2e455cf
feat(webdriverio): Add webdriverio end to end test framework.
58dc9ea
feat(webdriverio): Add webdriverio end to end test framework.
dd14979
feat(webdriverio): Add ability to specify a browser for each particip…
8a40d06
feat(webdriverio): Add ability to specify a browser for each particip…
0f85eb5
feat(webdriverio): Remove the concept of moderator browser.
206c8d1
feat(webdriverio): Add grid configuration.
62b8692
feat(webdriverio): Change max instances value to 16.
c4d4843
feat(webdriverio): Add conditional services based on grid availability.
1ac319d
feat(webdriverio): Add some comments on defined constants.
f9b4066
feat(webdriverio): Remove .env file.
a747ac0
feat(webdriverio): Simplify grid url env variable and add env variabl…
34cff7e
feat(webdriverio): Add console logs as attachment to tests reports.
e14bb1b
feat(webdriverio): Make sure that grid port parameter is always a num…
e70f29d
feat(webdriverio): Fix typo on grid url.
e1e2776
feat(webdriverio): Fix typo on hostname parameter.
f10151e
feat(webdriverio): Get page objects for each specific browser.
41bacde
feat(webdriverio): Comment the beforeHook code block.
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 hidden or 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 hidden or 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 |
---|---|---|
|
@@ -2,6 +2,8 @@ | |
.*.tmp | ||
deploy-local.sh | ||
libs/ | ||
allure-report/ | ||
allure-results/ | ||
all.css | ||
*css.map | ||
.remote-sync.json | ||
|
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains hidden or 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 hidden or 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,2 @@ | ||
BASE_URL = "https://localhost:8080" | ||
BROWSERS = ['chrome', 'firefox'] |
This file contains hidden or 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,13 @@ | ||
# WebdriverIO Test Automation Framework | ||
|
||
## Steps to run tests locally: | ||
* Run <strong>npm install</strong> command | ||
* Start de app locally with <i>make dev</i> command | ||
* Running all tests: <strong>npx wdio run ./wdio.conf.js</strong> | ||
* Running specific test: <strong>npx wdio run ./wdio.conf.js --spec testName.js</strong> | ||
* Running tests will generate the <i>allure-results</i> folder | ||
|
||
## Steps to generate allure reports: | ||
* Check if the <i>allure-results</i> was generated | ||
* In order to generate the <i>allure-reports</i>, run the following command: allure generate allure-results/ && allure open | ||
* If the allure-report has already been generated, there will be a conflict; in order to avoid this, the <strong>--clean</strong> flag needs to be used and the following command would be required: allure generate allure-results/ --clean && allure open |
This file contains hidden or 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,27 @@ | ||
|
||
import { remote } from 'webdriverio'; | ||
|
||
/** | ||
* Function that creates a chrome session. | ||
* | ||
* @returns {void} | ||
*/ | ||
export default function createChromeSession() { | ||
return remote({ | ||
capabilities: { | ||
browserName: 'chrome', | ||
acceptInsecureCerts: true, | ||
'goog:chromeOptions': { | ||
args: [ | ||
'use-fake-device-for-media-stream', | ||
'use-fake-ui-for-media-stream', | ||
'disable-plugins', | ||
'mute-audio', | ||
'disable-infobars', | ||
'autoplay-policy=no-user-gesture-required', | ||
'auto-select-desktop-capture-source=Your Entire screen' | ||
] | ||
} | ||
} | ||
}); | ||
} |
This file contains hidden or 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,30 @@ | ||
/* eslint-disable no-undef */ | ||
|
||
export const BASE_URL = process.env.BASE_URL || 'https://localhost:8080'; | ||
|
||
export const BROWSERS = process.env.BROWSERS || [ 'chrome', 'firefox' ]; | ||
|
||
export const DEFAULT_CONFIG | ||
= 'config.requireDisplayName=false' | ||
+ '&config.debug=true' | ||
+ '&config.testing.testMode=true' | ||
+ '&config.disableAEC=true' | ||
+ '&config.disableNS=true' | ||
+ '&config.enableTalkWhileMuted=false' | ||
+ '&config.callStatsID=false' | ||
+ '&config.alwaysVisibleToolbar=true' | ||
+ '&config.p2p.enabled=false' | ||
+ '&config.p2p.useStunTurn=false' | ||
+ '&config.pcStatsInterval=1500' | ||
+ '&config.prejoinConfig.enabled=false' | ||
+ '&config.gatherStats=true' | ||
+ '&config.disable1On1Mode=true' | ||
+ '&config.analytics.disabled=true' | ||
+ '&interfaceConfig.SHOW_CHROME_EXTENSION_BANNER=false' | ||
+ '&interfaceConfig.DISABLE_FOCUS_INDICATOR=true'; | ||
|
||
export const FIRST_PARTICIPANT = 'First participant'; | ||
export const SECOND_PARTICIPANT = 'Second participant'; | ||
export const THIRD_PARTICIPANT = 'Third participant'; | ||
|
||
export const ENTER_KEY = '\uE007'; |
This file contains hidden or 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,23 @@ | ||
import createChromeSession from './chromeSession'; | ||
import { BROWSERS } from './constants'; | ||
import createFirefoxSession from './firefoxSession'; | ||
|
||
/** | ||
* Function that creates a browser session. | ||
* | ||
* @returns {void} | ||
*/ | ||
export default function createBrowserSession() { | ||
for (let i = 0; i < BROWSERS.length; i++) { | ||
const browserName = BROWSERS[i]; | ||
|
||
switch (browserName) { | ||
case 'chrome': | ||
return createChromeSession(); | ||
case 'firefox': | ||
return createFirefoxSession(); | ||
default: | ||
return; | ||
} | ||
} | ||
} |
This file contains hidden or 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,10 @@ | ||
/* eslint-disable no-undef */ | ||
|
||
/** | ||
* Create meeting room function. | ||
* | ||
* @returns {void} | ||
*/ | ||
export default function createMeetingRoom(meetingUrl) { | ||
browser.url(meetingUrl); | ||
} |
This file contains hidden or 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,25 @@ | ||
import { v4 as uuidv4 } from 'uuid'; | ||
|
||
import { BASE_URL, BROWSERS, DEFAULT_CONFIG } from './constants'; | ||
|
||
/** | ||
* Function that creates a meeting url. | ||
* | ||
* @returns {void} | ||
*/ | ||
export default function createMeetingUrl() { | ||
for (let i = 0; i < BROWSERS.length; i++) { | ||
const browserName = BROWSERS[i]; | ||
|
||
switch (browserName) { | ||
case 'chrome': | ||
// eslint-disable-next-line prefer-template | ||
return `${BASE_URL}/${'WdioChrome-' + uuidv4()}?${DEFAULT_CONFIG}`; | ||
case 'firefox': | ||
// eslint-disable-next-line prefer-template | ||
return `${BASE_URL}/${'WdioFirefox-' + uuidv4()}?${DEFAULT_CONFIG}`; | ||
default: | ||
return; | ||
} | ||
} | ||
} |
This file contains hidden or 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,24 @@ | ||
import { remote } from 'webdriverio'; | ||
|
||
/** | ||
* Function that creates a firefox session. | ||
* | ||
* @returns {void} | ||
*/ | ||
export default function createFirefoxSession() { | ||
return remote({ | ||
capabilities: { | ||
browserName: 'firefox', | ||
acceptInsecureCerts: true, | ||
'moz:firefoxOptions': { | ||
'prefs': { | ||
'media.navigator.streams.fake': true, | ||
'media.navigator.permission.disabled': true, | ||
'media.peerconnection.ice.tcp': true, | ||
'intl.accept_languages': 'en', | ||
'media.autoplay.default': 0 | ||
} | ||
} | ||
} | ||
}); | ||
} |
This file contains hidden or 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,14 @@ | ||
/* eslint-disable no-undef */ | ||
|
||
/** | ||
* Function that checks if the participant is moderator. | ||
* | ||
* @returns {void} | ||
*/ | ||
export default async function isParticipantModerator() { | ||
// eslint-disable-next-line arrow-body-style | ||
await browser.execute(() => { | ||
return window.APP.store.getState()['features/base/participants'].local.role | ||
=== 'moderator'; | ||
}); | ||
} |
This file contains hidden or 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,20 @@ | ||
const ParticipantsPane = require('../page-objects/ParticipantsPane'); | ||
const Toolbox = require('../page-objects/Toolbox'); | ||
|
||
/** | ||
* Open participants pane function. | ||
* | ||
* @returns {void} | ||
*/ | ||
export default async function openParticipantsPane() { | ||
const getToolbox = await Toolbox.ToolboxView; | ||
|
||
await expect(getToolbox).toBeDisplayed(); | ||
const participantsButton = await Toolbox.ParticipantsPaneButton; | ||
|
||
await expect(participantsButton).toBeDisplayed(); | ||
await participantsButton.click(); | ||
const participantsPane = await ParticipantsPane.ParticipantsPaneView; | ||
|
||
await expect(participantsPane).toBeDisplayed(); | ||
} |
This file contains hidden or 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,17 @@ | ||
/* eslint-disable no-undef */ | ||
|
||
/** | ||
* Define participants pane elements. | ||
*/ | ||
class ParticipantsPane { | ||
|
||
/** | ||
* Participants pane element. | ||
* | ||
* @returns {HTMLElement} | ||
*/ | ||
get ParticipantsPaneView() { | ||
return $('.participants_pane'); | ||
} | ||
} | ||
module.exports = new ParticipantsPane(); |
This file contains hidden or 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,27 @@ | ||
/* eslint-disable no-undef */ | ||
|
||
/** | ||
* Define prejoinscreen elements. | ||
*/ | ||
class PrejoinScreen { | ||
|
||
/** | ||
* Premeeting screen element. | ||
* | ||
* @returns {HTMLElement} | ||
*/ | ||
get PremeetingScreen() { | ||
return $('.premeeting-screen'); | ||
} | ||
|
||
/** | ||
* Prejoin input element. | ||
* | ||
* @returns {HTMLElement} | ||
*/ | ||
get PrejoinInput() { | ||
return $('.prejoin-input-area input'); | ||
} | ||
} | ||
|
||
module.exports = new PrejoinScreen(); |
This file contains hidden or 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,45 @@ | ||
/* eslint-disable no-undef */ | ||
|
||
/** | ||
* Define security dialog elements. | ||
*/ | ||
class SecurityDialog { | ||
|
||
/** | ||
* Security dialog element. | ||
* | ||
* @returns {HTMLElement} | ||
*/ | ||
get SecurityDialogView() { | ||
return $('.security-dialog'); | ||
} | ||
|
||
/** | ||
* Lobby switch element. | ||
* | ||
* @returns {HTMLElement} | ||
*/ | ||
get LobbySwitch() { | ||
return $('[aria-label="cross"]'); | ||
} | ||
|
||
/** | ||
* Lobby enabled element. | ||
* | ||
* @returns {HTMLElement} | ||
*/ | ||
get LobbyEnabled() { | ||
return $('[data-checked="true"]'); | ||
} | ||
|
||
/** | ||
* Security dialog close button element. | ||
* | ||
* @returns {HTMLElement} | ||
*/ | ||
get SecurityDialogCloseButton() { | ||
return $('#modal-header-close-button'); | ||
} | ||
} | ||
|
||
module.exports = new SecurityDialog(); |
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.
Add a script in package.json to do this please. Maybe some
e2ee-test-reports