Skip to content

Commit

Permalink
fixed linting for e2e tests
Browse files Browse the repository at this point in the history
  • Loading branch information
mktcode committed Jun 11, 2022
1 parent 1f19c3c commit 7541ba0
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 10 deletions.
3 changes: 2 additions & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ module.exports = {
node: true
},
extends: [
'plugin:cypress/recommended',
'plugin:vue/vue3-recommended',
'eslint:recommended',
'@vue/eslint-config-typescript/recommended',
Expand All @@ -28,6 +29,6 @@ module.exports = {
$ref: 'readonly',
defineProps: 'readonly',
defineEmits: 'readonly',
withDefaults: 'readonly',
withDefaults: 'readonly'
}
};
19 changes: 11 additions & 8 deletions cypress/e2e/createProposal.cy.js
Original file line number Diff line number Diff line change
@@ -1,17 +1,20 @@
/// <reference types="cypress" />


/**
* work in progress
*/
describe('createProposal', () => {
beforeEach(() => {
cy.visit('/#/mktcode.eth')
})
cy.visit('/#/fabien.eth');
});

it('shows warning and connect button when not connected', () => {
cy.get('[data-testid="create-proposal-button"]').click()
cy.get('[data-testid="create-proposal-connect-wallet-warning"]').should('exist')
cy.get('[data-testid="create-proposal-connect-wallet-button"]').should('exist')
})
})
cy.get('[data-testid="create-proposal-button"]').click();
cy.get('[data-testid="create-proposal-connect-wallet-warning"]').should(
'exist'
);
cy.get('[data-testid="create-proposal-connect-wallet-button"]').should(
'exist'
);
});
});
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@
"autoprefixer": "^10.4.7",
"c8": "^7.11.3",
"cypress": "^10.0.3",
"eslint-plugin-cypress": "^2.12.1",
"eslint-plugin-prettier": "^3.4.0",
"eslint-plugin-vue": "^7.15.1",
"happy-dom": "^5.2.0",
Expand Down
9 changes: 8 additions & 1 deletion yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3661,6 +3661,13 @@ eslint-config-prettier@^6.0.0:
dependencies:
get-stdin "^6.0.0"

eslint-plugin-cypress@^2.12.1:
version "2.12.1"
resolved "https://registry.yarnpkg.com/eslint-plugin-cypress/-/eslint-plugin-cypress-2.12.1.tgz#9aeee700708ca8c058e00cdafe215199918c2632"
integrity sha512-c2W/uPADl5kospNDihgiLc7n87t5XhUbFDoTl6CfVkmG+kDAb5Ux10V9PoLPu9N+r7znpc+iQlcmAqT1A/89HA==
dependencies:
globals "^11.12.0"

eslint-plugin-prettier@^3.4.0:
version "3.4.1"
resolved "https://registry.yarnpkg.com/eslint-plugin-prettier/-/eslint-plugin-prettier-3.4.1.tgz#e9ddb200efb6f3d05ffe83b1665a716af4a387e5"
Expand Down Expand Up @@ -4607,7 +4614,7 @@ global@~4.4.0:
min-document "^2.19.0"
process "^0.11.10"

globals@^11.1.0:
globals@^11.1.0, globals@^11.12.0:
version "11.12.0"
resolved "https://registry.yarnpkg.com/globals/-/globals-11.12.0.tgz#ab8795338868a0babd8525758018c2a7eb95c42e"
integrity sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==
Expand Down

0 comments on commit 7541ba0

Please sign in to comment.