From b7b02fcc2c94458439769fd8477df1fd96966c80 Mon Sep 17 00:00:00 2001 From: Yash-Singh1 Date: Tue, 10 May 2022 17:29:50 -0700 Subject: [PATCH] chore: rm cypress ex. and prevent dup ci --- .eslintrc.json | 17 +- .github/workflows/build.yml | 8 +- .github/workflows/checks.yml | 8 +- .github/workflows/codeql.yml | 4 + .github/workflows/lint.yml | 8 +- .../workflows/pr-labeler-config-validator.yml | 8 +- cypress/examples/actions.spec.js | 264 ------------------ cypress/examples/aliasing.spec.js | 36 --- cypress/examples/assertions.spec.js | 169 ----------- cypress/examples/connectors.spec.js | 55 ---- cypress/examples/cookies.spec.js | 79 ------ cypress/examples/cypress_api.spec.js | 225 --------------- cypress/examples/files.spec.js | 114 -------- cypress/examples/local_storage.spec.js | 58 ---- cypress/examples/location.spec.js | 32 --- cypress/examples/misc.spec.js | 77 ----- cypress/examples/navigation.spec.js | 56 ---- cypress/examples/network_requests.spec.js | 192 ------------- cypress/examples/querying.spec.js | 75 ----- cypress/examples/spies_stubs_clocks.spec.js | 94 ------- cypress/examples/traversal.spec.js | 97 ------- cypress/examples/utilities.spec.js | 129 --------- cypress/examples/viewport.spec.js | 59 ---- cypress/examples/waiting.spec.js | 33 --- cypress/examples/window.spec.js | 22 -- cypress/fixtures/example.json | 5 - 26 files changed, 41 insertions(+), 1883 deletions(-) delete mode 100644 cypress/examples/actions.spec.js delete mode 100644 cypress/examples/aliasing.spec.js delete mode 100644 cypress/examples/assertions.spec.js delete mode 100644 cypress/examples/connectors.spec.js delete mode 100644 cypress/examples/cookies.spec.js delete mode 100644 cypress/examples/cypress_api.spec.js delete mode 100644 cypress/examples/files.spec.js delete mode 100644 cypress/examples/local_storage.spec.js delete mode 100644 cypress/examples/location.spec.js delete mode 100644 cypress/examples/misc.spec.js delete mode 100644 cypress/examples/navigation.spec.js delete mode 100644 cypress/examples/network_requests.spec.js delete mode 100644 cypress/examples/querying.spec.js delete mode 100644 cypress/examples/spies_stubs_clocks.spec.js delete mode 100644 cypress/examples/traversal.spec.js delete mode 100644 cypress/examples/utilities.spec.js delete mode 100644 cypress/examples/viewport.spec.js delete mode 100644 cypress/examples/waiting.spec.js delete mode 100644 cypress/examples/window.spec.js delete mode 100644 cypress/fixtures/example.json diff --git a/.eslintrc.json b/.eslintrc.json index 7f25c4ec7..fe19a4534 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -16,14 +16,15 @@ "extends": ["eslint:recommended", "plugin:jsdoc/recommended", "plugin:markdown/recommended", "plugin:prettier/recommended"], "plugins": ["html", "jest", "jsdoc", "prettier"], "rules": { - "no-prototype-builtins": 0, - "no-unused-vars": 0, - "jsdoc/check-indentation": 0, - "jsdoc/check-alignment": 0, - "jsdoc/check-line-alignment": 0, - "jsdoc/multiline-blocks": 0, - "jsdoc/newline-after-description": 0, - "jsdoc/tag-lines": 0, + "no-prototype-builtins": "off", + "no-unused-vars": "off", + "jsdoc/check-indentation": "off", + "jsdoc/check-alignment": "off", + "jsdoc/check-line-alignment": "off", + "jsdoc/multiline-blocks": "off", + "jsdoc/newline-after-description": "off", + "jsdoc/tag-lines": "off", + "cypress/no-async-tests": "off", "no-empty": ["error", { "allowEmptyCatch": true }] }, "overrides": [ diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index d9e7354d6..72495c4e9 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1,6 +1,12 @@ name: Build -on: [push, pull_request] +on: + push: {} + pull_request: + types: + - opened + - synchronize + - ready_for_review permissions: contents: read diff --git a/.github/workflows/checks.yml b/.github/workflows/checks.yml index 48814ee4b..dbce0a441 100644 --- a/.github/workflows/checks.yml +++ b/.github/workflows/checks.yml @@ -1,4 +1,10 @@ -on: [push] +on: + push: {} + pull_request: + types: + - opened + - synchronize + - ready_for_review name: Static analysis diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index a44fe228c..2db07ad77 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -7,6 +7,10 @@ on: pull_request: # The branches below must be a subset of the branches above branches: [ develop ] + types: + - opened + - synchronize + - ready_for_review jobs: analyze: diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 018487b82..050667a8f 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -1,6 +1,12 @@ name: Lint -on: [push, pull_request] +on: + push: {} + pull_request: + types: + - opened + - synchronize + - ready_for_review permissions: contents: read diff --git a/.github/workflows/pr-labeler-config-validator.yml b/.github/workflows/pr-labeler-config-validator.yml index 2d3df02ff..af5c477d6 100644 --- a/.github/workflows/pr-labeler-config-validator.yml +++ b/.github/workflows/pr-labeler-config-validator.yml @@ -1,5 +1,11 @@ name: Validate PR Labeler Configuration -on: [push, pull_request] +on: + push: {} + pull_request: + types: + - opened + - synchronize + - ready_for_review jobs: pr-labeler: diff --git a/cypress/examples/actions.spec.js b/cypress/examples/actions.spec.js deleted file mode 100644 index 5843547af..000000000 --- a/cypress/examples/actions.spec.js +++ /dev/null @@ -1,264 +0,0 @@ -/// - -context('Actions', () => { - beforeEach(() => { - cy.visit('https://example.cypress.io/commands/actions'); - }); - - // https://on.cypress.io/interacting-with-elements - - it('.type() - type into a DOM element', () => { - // https://on.cypress.io/type - cy.get('.action-email') - .type('fake@email.com') - .should('have.value', 'fake@email.com') - - // .type() with special character sequences - .type('{leftarrow}{rightarrow}{uparrow}{downarrow}') - .type('{del}{selectall}{backspace}') - - // .type() with key modifiers - .type('{alt}{option}') //these are equivalent - .type('{ctrl}{control}') //these are equivalent - .type('{meta}{command}{cmd}') //these are equivalent - .type('{shift}') - - // Delay each keypress by 0.1 sec - .type('slow.typing@email.com', { delay: 100 }) - .should('have.value', 'slow.typing@email.com'); - - cy.get('.action-disabled') - // Ignore error checking prior to type - // like whether the input is visible or disabled - .type('disabled error checking', { force: true }) - .should('have.value', 'disabled error checking'); - }); - - it('.focus() - focus on a DOM element', () => { - // https://on.cypress.io/focus - cy.get('.action-focus') - .focus() - .should('have.class', 'focus') - .prev() - .should('have.attr', 'style', 'color: orange;'); - }); - - it('.blur() - blur off a DOM element', () => { - // https://on.cypress.io/blur - cy.get('.action-blur') - .type('About to blur') - .blur() - .should('have.class', 'error') - .prev() - .should('have.attr', 'style', 'color: red;'); - }); - - it('.clear() - clears an input or textarea element', () => { - // https://on.cypress.io/clear - cy.get('.action-clear') - .type('Clear this text') - .should('have.value', 'Clear this text') - .clear() - .should('have.value', ''); - }); - - it('.submit() - submit a form', () => { - // https://on.cypress.io/submit - cy.get('.action-form').find('[type="text"]').type('HALFOFF'); - cy.get('.action-form').submit().next().should('contain', 'Your form has been submitted!'); - }); - - it('.click() - click on a DOM element', () => { - // https://on.cypress.io/click - cy.get('.action-btn').click(); - - // You can click on 9 specific positions of an element: - // ----------------------------------- - // | topLeft top topRight | - // | | - // | | - // | | - // | left center right | - // | | - // | | - // | | - // | bottomLeft bottom bottomRight | - // ----------------------------------- - - // clicking in the center of the element is the default - cy.get('#action-canvas').click(); - - cy.get('#action-canvas').click('topLeft'); - cy.get('#action-canvas').click('top'); - cy.get('#action-canvas').click('topRight'); - cy.get('#action-canvas').click('left'); - cy.get('#action-canvas').click('right'); - cy.get('#action-canvas').click('bottomLeft'); - cy.get('#action-canvas').click('bottom'); - cy.get('#action-canvas').click('bottomRight'); - - // .click() accepts an x and y coordinate - // that controls where the click occurs :) - - cy.get('#action-canvas') - .click(80, 75) // click 80px on x coord and 75px on y coord - .click(170, 75) - .click(80, 165) - .click(100, 185) - .click(125, 190) - .click(150, 185) - .click(170, 165); - - // click multiple elements by passing multiple: true - cy.get('.action-labels>.label').click({ multiple: true }); - - // Ignore error checking prior to clicking - cy.get('.action-opacity>.btn').click({ force: true }); - }); - - it('.dblclick() - double click on a DOM element', () => { - // https://on.cypress.io/dblclick - - // Our app has a listener on 'dblclick' event in our 'scripts.js' - // that hides the div and shows an input on double click - cy.get('.action-div').dblclick().should('not.be.visible'); - cy.get('.action-input-hidden').should('be.visible'); - }); - - it('.check() - check a checkbox or radio element', () => { - // https://on.cypress.io/check - - // By default, .check() will check all - // matching checkbox or radio elements in succession, one after another - cy.get('.action-checkboxes [type="checkbox"]').not('[disabled]').check().should('be.checked'); - - cy.get('.action-radios [type="radio"]').not('[disabled]').check().should('be.checked'); - - // .check() accepts a value argument - cy.get('.action-radios [type="radio"]').check('radio1').should('be.checked'); - - // .check() accepts an array of values - cy.get('.action-multiple-checkboxes [type="checkbox"]') - .check(['checkbox1', 'checkbox2']) - .should('be.checked'); - - // Ignore error checking prior to checking - cy.get('.action-checkboxes [disabled]').check({ force: true }).should('be.checked'); - - cy.get('.action-radios [type="radio"]').check('radio3', { force: true }).should('be.checked'); - }); - - it('.uncheck() - uncheck a checkbox element', () => { - // https://on.cypress.io/uncheck - - // By default, .uncheck() will uncheck all matching - // checkbox elements in succession, one after another - cy.get('.action-check [type="checkbox"]').not('[disabled]').uncheck().should('not.be.checked'); - - // .uncheck() accepts a value argument - cy.get('.action-check [type="checkbox"]') - .check('checkbox1') - .uncheck('checkbox1') - .should('not.be.checked'); - - // .uncheck() accepts an array of values - cy.get('.action-check [type="checkbox"]') - .check(['checkbox1', 'checkbox3']) - .uncheck(['checkbox1', 'checkbox3']) - .should('not.be.checked'); - - // Ignore error checking prior to unchecking - cy.get('.action-check [disabled]').uncheck({ force: true }).should('not.be.checked'); - }); - - it('.select() - select an option in a