You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by dk...@apache.org on 2021/05/12 12:47:50 UTC
[sling-org-apache-sling-app-cms] branch master updated: Minor -
fixing IT failure due to timing issue
This is an automated email from the ASF dual-hosted git repository.
dklco pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-app-cms.git
The following commit(s) were added to refs/heads/master by this push:
new e638f9a Minor - fixing IT failure due to timing issue
e638f9a is described below
commit e638f9a57ea32aa95bd700b0274c09127cc4de32
Author: Dan Klco <kl...@adobe.com>
AuthorDate: Wed May 12 08:47:37 2021 -0400
Minor - fixing IT failure due to timing issue
---
it/cypress/integration/taxonomy.spec.js | 4 +++-
it/cypress/{login.js => utils.js} | 6 +++++-
2 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/it/cypress/integration/taxonomy.spec.js b/it/cypress/integration/taxonomy.spec.js
index 6fa9110..d47a14f 100644
--- a/it/cypress/integration/taxonomy.spec.js
+++ b/it/cypress/integration/taxonomy.spec.js
@@ -18,7 +18,7 @@
*/
const lighthouseConfig = require("../lighthouse-cfg.json");
-const login = require("../login");
+const { doneLoading, login } = require("../utils");
describe("Taxonomy Tests", () => {
beforeEach(() => {
@@ -90,6 +90,7 @@ describe("Taxonomy Tests", () => {
cy.get(".close-modal.is-primary").should("be.visible");
cy.get(".close-modal.is-primary").click();
+ doneLoading();
cy.document().toMatchImageSnapshot({
name: "taxonomy--with-new-item",
blackout: ["td[data-property=lastModified]"],
@@ -109,5 +110,6 @@ describe("Taxonomy Tests", () => {
cy.get(".close-modal.is-primary").should("be.visible");
cy.get(".close-modal.is-primary").click();
+ doneLoading();
});
});
diff --git a/it/cypress/login.js b/it/cypress/utils.js
similarity index 89%
rename from it/cypress/login.js
rename to it/cypress/utils.js
index da4592c..975b69f 100644
--- a/it/cypress/login.js
+++ b/it/cypress/utils.js
@@ -16,10 +16,14 @@
* specific language governing permissions and limitations
* under the License.
*/
-module.exports = function() {
+module.exports.login = function() {
cy.visit("/system/sling/form/login");
cy.get("input[name=j_username]").invoke("attr", "value", "admin");
cy.get("input[name=j_password]").invoke("attr", "value", "admin");
cy.get("form").submit();
cy.url().should("contain", "/cms/start.html");
};
+
+module.exports.doneLoading = function() {
+ cy.get(".loader").should("not.exist");
+};