Skip to content

Commit

Permalink
Fix borken test case (#2158)
Browse files Browse the repository at this point in the history
  • Loading branch information
RFSH authored Mar 9, 2022
1 parent a0fc7fe commit 222b35e
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -181,4 +181,4 @@ jobs:
sudo cat /etc/apache2/conf.d/wsgi_ermrest.conf
sudo cat /var/log/apache2/error.log
sudo cat /var/log/apache2/access.log
sudo -H -u webauthn psql -c 'select * from webauthn2_db.session' webauthn
sudo -H -u webauthn psql -c 'select * from webauthn2_db.session' webauthn
12 changes: 11 additions & 1 deletion test/e2e/specs/default-config/recordset/add.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -141,10 +141,20 @@ describe('Recordset add record,', function() {

it("go back to recordset should refresh the table with the new record", function() {
// ... before closing this new tab and switching back to the original Record app's tab so that the next it spec can run properly
browser.close();
/**
* we noticed this test case started failing on saucelabs,
* that's why we're switching tabs twice to ensure the onfocus is getting called.
*/
browser.switchTo().window(allWindows[0]).then(function() {
return browser.switchTo().window(allWindows[1]);
}).then(function () {
return browser.switchTo().window(allWindows[0]);
}).then(function () {
return chaisePage.waitForElementInverse(element(by.id("spinner")));
}).then(function() {
return chaisePage.recordsetPage.getPageTitleElement().click();
}).then(function () {

browser.wait(function() {
return chaisePage.recordsetPage.getRows().count().then(function(ct) {
return (ct == rowCount+1);
Expand Down

0 comments on commit 222b35e

Please sign in to comment.