8
js/tests/e2e/.eslintrc.js
Normal file
8
js/tests/e2e/.eslintrc.js
Normal file
@@ -0,0 +1,8 @@
|
||||
module.exports = {
|
||||
env: {
|
||||
jest: true,
|
||||
"cypress/globals": true,
|
||||
},
|
||||
extends: ["plugin:cypress/recommended"],
|
||||
plugins: ["cypress"],
|
||||
};
|
||||
@@ -1,4 +1,5 @@
|
||||
export default class ElementCount {
|
||||
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types
|
||||
constructor(selector, count) {
|
||||
this.message = `Testing if element <${selector}> has count: ${count}`;
|
||||
this.expected = count;
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
// Set the en-US language just in case
|
||||
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types
|
||||
export default function (window) {
|
||||
Object.defineProperty(window.navigator, "language", { value: "en-US" });
|
||||
}
|
||||
|
||||
@@ -8,7 +8,6 @@ describe("Events", () => {
|
||||
|
||||
cy.loginUser();
|
||||
cy.visit("/events/me");
|
||||
cy.wait(1000);
|
||||
cy.contains(".message.is-danger", "No events found");
|
||||
cy.contains(".navbar-item", "Create").click();
|
||||
|
||||
@@ -29,7 +28,6 @@ describe("Events", () => {
|
||||
.last()
|
||||
.find(".select select")
|
||||
.select("2021");
|
||||
cy.wait(1000);
|
||||
cy.get(".field").eq(3).contains(".datepicker-cell", "15").click();
|
||||
|
||||
cy.contains(".button.is-primary", "Create my event").click();
|
||||
|
||||
@@ -17,7 +17,6 @@ describe("Login", () => {
|
||||
cy.url().should("include", "/password-reset/send");
|
||||
cy.go("back");
|
||||
|
||||
cy.wait(1000);
|
||||
cy.get("form").contains(".control a.button", "Register").click();
|
||||
cy.url().should("include", "/register/user");
|
||||
|
||||
@@ -55,7 +54,6 @@ describe("Login", () => {
|
||||
cy.get("input[type=email]").type("user@email.com");
|
||||
cy.get("input[type=password]").type("some password");
|
||||
cy.get("form").submit();
|
||||
cy.wait(1000);
|
||||
cy.get(".navbar-end .navbar-link span.icon i").should(
|
||||
"have.class",
|
||||
"mdi-account-circle"
|
||||
@@ -113,7 +111,6 @@ describe("Login", () => {
|
||||
cy.get("form .field input").eq(1).type("Not");
|
||||
cy.get("form .field textarea").clear().type("This will now work");
|
||||
cy.get("form").submit();
|
||||
cy.wait(1000);
|
||||
|
||||
cy.get(".navbar-link span.icon i").should(
|
||||
"have.class",
|
||||
|
||||
@@ -33,7 +33,6 @@ describe("Registration", () => {
|
||||
cy.get("form").contains("button.button.is-primary", "Register").click();
|
||||
|
||||
cy.url().should("include", "/register/profile");
|
||||
cy.wait(1000);
|
||||
cy.get("form > .field")
|
||||
.eq(1)
|
||||
.contains("label", "Username")
|
||||
|
||||
@@ -138,7 +138,7 @@ Cypress.Commands.add("waitForFetches", () => {
|
||||
return;
|
||||
}
|
||||
|
||||
cy.wait(100).then(() => cy.waitForFetches());
|
||||
cy.waitForFetches();
|
||||
});
|
||||
|
||||
Cypress.Commands.add("iframeLoaded", { prevSubject: "element" }, ($iframe) => {
|
||||
|
||||
@@ -6,10 +6,4 @@ module.exports = {
|
||||
expect: true,
|
||||
sinon: true,
|
||||
},
|
||||
rules: {
|
||||
"import/no-extraneous-dependencies": [
|
||||
"error",
|
||||
{ devDependencies: ["**/*.test.js", "**/*.spec.js"] },
|
||||
],
|
||||
},
|
||||
};
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// eslint-disable-next-line @typescript-eslint/no-var-requires
|
||||
const vueJest = require("vue-jest/lib/template-compiler");
|
||||
|
||||
module.exports = {
|
||||
|
||||
Reference in New Issue
Block a user