Skip to content

Commit

Permalink
feature: remove Protractor dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
tsaleksandrova authored May 11, 2021
1 parent 9be963b commit e2e70ab
Show file tree
Hide file tree
Showing 62 changed files with 4,580 additions and 1,738 deletions.
1 change: 0 additions & 1 deletion .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
},
"globals": {
"sap": true,
"protractorModule": true,
"Reporter": true
}
}
1 change: 0 additions & 1 deletion conf/profile.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ exports.config = {
defaultTimeoutInterval: 30000,
waitForUI5PollingInterval: 400
},
useClassicalWaitForUI5: false,
connection: 'direct',
connectionConfigs: {
'direct': {
Expand Down
1 change: 0 additions & 1 deletion conf/visual.profile.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ exports.config = {
'*': {
/*
remoteWebDriverOptions: {
enableClickWithActions: true
contextSwitch: true, // {native: 'NATIVE_APP', webview: 'WEBVIEW_1'}
crops: {
size: {
Expand Down
2 changes: 1 addition & 1 deletion docs/config/config.md
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ timeouts: {

Override timeouts from the command-line:
```
--timeouts.defaultTmeoutInterval=50000
--timeouts.defaultTimeoutInterval=50000
```
Please check [protractor timeouts](https://github.com/angular/protractor/blob/master/docs/timeouts.md)
for their meaning.
Expand Down
37 changes: 37 additions & 0 deletions docs/config/drivers.md
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,43 @@ browsers: [{
}]
```

## Chromium
Chromium uses the same ChromeDriver as Chrome. But automatic download of ChromeDriver is not implemented for Chromium. Please make sure
you have the correct version of ChromeDriver for your Chromium version.

The easiest way to install Chromium and ChromeDriver on macOS is using the brew package manager. For stable versions of chromium and the corresponding chromedriver you can use:
```
$brew install --cask eloston-chromium
# chromium is available as: /Applications/Chromium.app/Contents/MacOS/Chromium
$brew install --cask chromedriver
# chromedriver is available as: /usr/local/bin/chromedriver
```
Then you need to set the paths in the config file:
```javascript
browsers: [{
browserName: 'chromium',
capabilities: {
chromeOptions: {
binary: "/path/to/Chromium"
}
}
}],
connectionConfigs: {
direct: {
binaries: {
chromedriver: {
localPath: 'path/to/ChromeDriver'
}
}
}
}
```
Or using command line:
```
$ uiveri5 --browsers=chromium --config.connectionConfigs.direct.binaries.chromedriver.localPath=path/to/ChromeDriver
--confKeys=browsers[0].capabilities.chromeOptions.binary:/path/to/Chromium
```

## Firefox
Firefox uses the geckodriver that is updated regularly, so by default, we use the latest version.

Expand Down
11 changes: 6 additions & 5 deletions docs/todo.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#### Upcomming
* Support for SauceLabs reporting (Q3 2020)
* Support for browser restart (Q3 2020)
* Support for parallel browser sessions(Q4 2020)
* BusinessApplicationStudio runner (Q4 2020)
* Yeoman-based scaffolding support (console and BusinessApplicationStudio) (Q4 2020)
* BusinessApplicationStudio yeoman-based context actions (Q1 2021) - in progress (March 2021)
* BusinessApplicationStudio runner (Q1-Q2 2021) - in progress (March 2021)
* Remove protractor dependecy, upgrade to latest WebDriverJS (Q1 2021) - in progress (March 2021)
* Support for browser restart (Q2 2021) - depends on removal of protractor dep.
* Support for parallel browser sessions(Q2 2021) - depends on removal of protractor dep.

2 changes: 1 addition & 1 deletion driverVersions.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"chrome": {
"latest": 87
"latest": 88
}
}
2 changes: 1 addition & 1 deletion e2e/browser/browser.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,4 @@ describe('Browser tests', function() {
baseUrl: app.host + '/browser/index.html'
});
}, 80000);
});
});
18 changes: 9 additions & 9 deletions e2e/browser/specs/by_control.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,15 @@ describe("by_control", function () {
});

it("should match control's aggregation length with 'aggregationLengthEquals'", function () {
var oList = element(by.control({
id: "ListPage1",
aggregationLengthEquals: {
name: "items",
length: 3
}
}));
expect(oList.getAttribute("id")).toContain("ListPage1");
});
var oList = element(by.control({
id: "ListPage1",
aggregationLengthEquals: {
name: "items",
length: 3
}
}));
expect(oList.getAttribute("id")).toContain("ListPage1");
});

it("should get matching control ref", function () {
var navButton = element(by.control({
Expand Down
6 changes: 3 additions & 3 deletions e2e/browser/specs/page_objects.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ describe("page_objects", function () {
App: {
arrangements: {
iSetUpMyApp: function () {
element(by.tagName("input")).sendKeys("setup");
element(by.tagName("form")).element(by.css(".sapMSFB.sapMSFS")).click();
element(by.css("input")).sendKeys("setup");
element(by.css("form")).element(by.css(".sapMSFB.sapMSFS")).click();
}
},
actions: {
Expand All @@ -31,7 +31,7 @@ describe("page_objects", function () {
Second: {
assertions: {
theScrollTextShouldBeDisplayed: function () {
expect(element(by.id("page2-cont")).all(by.tagName("div")).get(0).getText()).toBe("This page does not scroll.");
expect(element(by.id("page2-cont")).all(by.css("div")).get(0).getText()).toBe("This page does not scroll.");
}
}
}
Expand Down
3 changes: 2 additions & 1 deletion e2e/browser/specs/wait.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ describe("wait", function() {
// verify wait after button click
it("should click the button and wait", function() {
element(by.id("button")).click();
expect(element.all(by.cssContainingText(".sapMMessageToast", "Pressed")).count()).toBe(1);
expect(element.all(by.xpath('//div[contains(@class, "sapMMessageToast") and text() = "Pressed"]')).count()).toBe(1);
expect(browser.getTitle()).toBe('E2E Test');
});
});
Loading

0 comments on commit e2e70ab

Please sign in to comment.