Fix lint issues

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
Thomas Citharel
2020-12-14 10:21:04 +01:00
parent 594d5a91ec
commit 8dc5b8a4b0
20 changed files with 26 additions and 43 deletions

View File

@@ -0,0 +1,8 @@
module.exports = {
env: {
jest: true,
"cypress/globals": true,
},
extends: ["plugin:cypress/recommended"],
plugins: ["cypress"],
};

View File

@@ -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;

View File

@@ -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" });
}

View File

@@ -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();

View File

@@ -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",

View File

@@ -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")

View File

@@ -138,7 +138,7 @@ Cypress.Commands.add("waitForFetches", () => {
return;
}
cy.wait(100).then(() => cy.waitForFetches());
cy.waitForFetches();
});
Cypress.Commands.add("iframeLoaded", { prevSubject: "element" }, ($iframe) => {

View File

@@ -6,10 +6,4 @@ module.exports = {
expect: true,
sinon: true,
},
rules: {
"import/no-extraneous-dependencies": [
"error",
{ devDependencies: ["**/*.test.js", "**/*.spec.js"] },
],
},
};

View File

@@ -1,3 +1,4 @@
// eslint-disable-next-line @typescript-eslint/no-var-requires
const vueJest = require("vue-jest/lib/template-compiler");
module.exports = {