Skip to content

Commit

Permalink
Clean up code
Browse files Browse the repository at this point in the history
  • Loading branch information
sashuk committed Nov 29, 2023
1 parent b78d205 commit 427f222
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 60 deletions.
5 changes: 2 additions & 3 deletions .github/workflows/davinci-integration-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ on:
env:
HAPPO_PROJECT: Picasso/Cypress
HAPPO_NONCE: ${{ github.run_id }}
VERBOSE: true

jobs:
build-packages:
Expand Down Expand Up @@ -82,7 +81,6 @@ jobs:
env:
GROUP_INDEX: ${{ matrix.index }}
PARALLEL_GROUPS: ${{ strategy.job-total }}

steps:
- name: Checkout project
uses: actions/checkout@v4
Expand Down Expand Up @@ -177,5 +175,6 @@ jobs:
node-version: 18

- uses: toptal/davinci-github-actions/[email protected]

- name: Finalize Happo
run: VERBOSE=true HAPPO_DEBUG=true npx happo-e2e finalize
run: npx happo-e2e finalize
8 changes: 4 additions & 4 deletions cypress/component/Carousel.spec.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -107,14 +107,14 @@ describe('Carousel', () => {

cy.getByTestId(testIds.prev).should('not.be.disabled')

cy.get('body').happoScreenshot({
cy.get('[data-cy-root]').happoScreenshot({
component,
variant: 'rewind-enabled/first-item',
})

cy.getByTestId(testIds.next).hoverAndTakeHappoScreenshot({
component,
variant: 'rewind-enabled/arrow-during-hovering',
variant: 'arrow/during-hovering',
})

// move to last item
Expand All @@ -125,15 +125,15 @@ describe('Carousel', () => {

cy.get('[data-gslide=4]').should('have.class', 'visible')

cy.get('body').happoScreenshot({
cy.get('[data-cy-root]').happoScreenshot({
component,
variant: 'rewind-enabled/last-item',
})

cy.getByTestId(testIds.next).click()
cy.get('[data-gslide=0]').should('have.class', 'visible')

cy.get('body').happoScreenshot({
cy.get('[data-cy-root]').happoScreenshot({
component,
variant: 'rewind-enabled/rewinded-to-first-item',
})
Expand Down
9 changes: 3 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
"generate:svg-components": "yarn generate:icons && yarn generate:pictograms",
"generate:icons": "./bin/generate-components-from-svg icon",
"generate:pictograms": "./bin/generate-components-from-svg pictogram",
"happo": "cross-env SCREENSHOT_BREAKPOINTS=true VERBOSE=true HAPPO_DEBUG=true TEST_ENV=visual HAPPO_PROJECT=Picasso/Storybook happo",
"happo:storybook": "cross-env SCREENSHOT_BREAKPOINTS=true TEST_ENV=visual VERBOSE=true HAPPO_DEBUG=true HAPPO_IS_ASYNC=false happo-ci-github-actions",
"happo": "cross-env SCREENSHOT_BREAKPOINTS=true TEST_ENV=visual HAPPO_PROJECT=Picasso/Storybook happo",
"happo:storybook": "cross-env SCREENSHOT_BREAKPOINTS=true TEST_ENV=visual HAPPO_IS_ASYNC=false happo-ci-github-actions",
"lint": "davinci-syntax lint code --check .",
"lint:fix": "davinci-syntax lint code .",
"release": "yarn build:package && changeset publish",
Expand All @@ -30,7 +30,7 @@
"test": "yarn test:unit && yarn test:integration",
"test:coverage": "yarn test:unit:coverage && yarn test:integration && yarn test:combine",
"test:integration": "yarn test:setup cypress run --component",
"test:integration:ci": "cross-env VERBOSE=true HAPPO_DEBUG=true yarn happo-e2e -- -- yarn test:setup cypress run --component",
"test:integration:ci": "yarn happo-e2e -- -- yarn test:setup cypress run --component",
"test:integration:open": "yarn test:setup cypress open --browser=electron --component",
"test:setup": "cross-env TZ=UTC NODE_ENV=development",
"test:unit": "davinci-qa unit --config=./jest.spec.mjs",
Expand Down Expand Up @@ -170,8 +170,5 @@
},
"engines": {
"node": ">=18"
},
"dependencies": {
"patch-package": "^8.0.0"
}
}
51 changes: 4 additions & 47 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -8199,7 +8199,7 @@ caching-transform@^4.0.0:
package-hash "^4.0.0"
write-file-atomic "^3.0.0"

call-bind@^1.0.0, call-bind@^1.0.2, call-bind@^1.0.5:
call-bind@^1.0.0, call-bind@^1.0.2:
version "1.0.5"
resolved "https://registry.yarnpkg.com/call-bind/-/call-bind-1.0.5.tgz#6fa2b7845ce0ea49bf4d8b9ef64727a2c2e2e513"
integrity sha512-C3nQxfFZxFRVoJoGKKI8y3MOEo129NQ+FgQ08iye+Mk4zNZZGdjfs06bVTr+DBSlA66Q2VEcMki/cUCP4SercQ==
Expand Down Expand Up @@ -8453,7 +8453,7 @@ ci-info@^2.0.0:
resolved "https://registry.npmjs.org/ci-info/-/ci-info-2.0.0.tgz"
integrity sha512-5tK7EtrZ0N+OLFMthtqOj4fI2Jeb88C4CAZPu25LDVUgXJ0A3Js4PMGqrn0JU1W0Mh1/Z8wZzYPxqUrXeBboCQ==

ci-info@^3.1.0, ci-info@^3.2.0, ci-info@^3.6.1, ci-info@^3.7.0:
ci-info@^3.1.0, ci-info@^3.2.0, ci-info@^3.6.1:
version "3.9.0"
resolved "https://registry.yarnpkg.com/ci-info/-/ci-info-3.9.0.tgz#4279a62028a7b1f262f3473fc9605f5e218c59b4"
integrity sha512-NIxF55hv4nSqQswkAeiOi1r83xy8JldOFDTWiug55KBu9Jnblncd2U6ViHmYgHf01TPZS77NJBhBMKdWj9HQMQ==
Expand Down Expand Up @@ -15421,16 +15421,6 @@ json-stable-stringify-without-jsonify@^1.0.1:
version "1.0.1"
resolved "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz"

json-stable-stringify@^1.0.2:
version "1.1.0"
resolved "https://registry.yarnpkg.com/json-stable-stringify/-/json-stable-stringify-1.1.0.tgz#43d39c7c8da34bfaf785a61a56808b0def9f747d"
integrity sha512-zfA+5SuwYN2VWqN1/5HZaDzQKLJHaBVMZIIM+wuYjdptkaQsqzDdqjqf+lZZJUuJq1aanHiY8LhH8LmH+qBYJA==
dependencies:
call-bind "^1.0.5"
isarray "^2.0.5"
jsonify "^0.0.1"
object-keys "^1.1.1"

json-stringify-nice@^1.1.4:
version "1.1.4"
resolved "https://registry.npmjs.org/json-stringify-nice/-/json-stringify-nice-1.1.4.tgz"
Expand Down Expand Up @@ -15480,11 +15470,6 @@ jsonfile@^6.0.1:
optionalDependencies:
graceful-fs "^4.1.6"

jsonify@^0.0.1:
version "0.0.1"
resolved "https://registry.yarnpkg.com/jsonify/-/jsonify-0.0.1.tgz#2aa3111dae3d34a0f151c63f3a45d995d9420978"
integrity sha512-2/Ki0GcmuqSrgFyelQq9M05y7PS0mEwuIzrf3f1fPqkVDVRvZrPZtVSMHxdgo8Aq0sxAOb/cr2aqqA3LeWHVPg==

jsonparse@^1.2.0, jsonparse@^1.3.1:
version "1.3.1"
resolved "https://registry.npmjs.org/jsonparse/-/jsonparse-1.3.1.tgz"
Expand Down Expand Up @@ -15657,13 +15642,6 @@ kind-of@^6.0.0, kind-of@^6.0.2, kind-of@^6.0.3:
resolved "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz"
integrity sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==

klaw-sync@^6.0.0:
version "6.0.0"
resolved "https://registry.yarnpkg.com/klaw-sync/-/klaw-sync-6.0.0.tgz#1fd2cfd56ebb6250181114f0a581167099c2b28c"
integrity sha512-nIeuVSzdCCs6TDPTqI8w1Yre34sSq7AkZ4B3sfOBbI2CgVSB4Du4aLQijFU2+lhAFCwt9+42Hel6lQNIv6AntQ==
dependencies:
graceful-fs "^4.1.11"

klaw@^1.0.0:
version "1.3.1"
resolved "https://registry.npmjs.org/klaw/-/klaw-1.3.1.tgz"
Expand Down Expand Up @@ -18501,7 +18479,7 @@ onetime@^6.0.0:
dependencies:
mimic-fn "^4.0.0"

open@^7.0.3, open@^7.4.2:
open@^7.0.3:
version "7.4.2"
resolved "https://registry.npmjs.org/open/-/open-7.4.2.tgz"
integrity sha512-MVHddDVweXZF3awtlAS+6pgKLlm/JgxZ90+/NBurBoQctVOOB/zDdVjcyPzQ+0laDGbsWgrRkflI65sQeOgT9Q==
Expand Down Expand Up @@ -19018,27 +18996,6 @@ password-prompt@^1.1.2:
ansi-escapes "^4.3.2"
cross-spawn "^7.0.3"

patch-package@^8.0.0:
version "8.0.0"
resolved "https://registry.yarnpkg.com/patch-package/-/patch-package-8.0.0.tgz#d191e2f1b6e06a4624a0116bcb88edd6714ede61"
integrity sha512-da8BVIhzjtgScwDJ2TtKsfT5JFWz1hYoBl9rUQ1f38MC2HwnEIkK8VN3dKMKcP7P7bvvgzNDbfNHtx3MsQb5vA==
dependencies:
"@yarnpkg/lockfile" "^1.1.0"
chalk "^4.1.2"
ci-info "^3.7.0"
cross-spawn "^7.0.3"
find-yarn-workspace-root "^2.0.0"
fs-extra "^9.0.0"
json-stable-stringify "^1.0.2"
klaw-sync "^6.0.0"
minimist "^1.2.6"
open "^7.4.2"
rimraf "^2.6.3"
semver "^7.5.3"
slash "^2.0.0"
tmp "^0.0.33"
yaml "^2.2.2"

path-browserify@^1.0.1:
version "1.0.1"
resolved "https://registry.npmjs.org/path-browserify/-/path-browserify-1.0.1.tgz"
Expand Down Expand Up @@ -24915,7 +24872,7 @@ yallist@^4.0.0:
resolved "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz"
integrity sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==

yaml@2, [email protected], yaml@^1.10.0, yaml@^1.7.2, yaml@^2.1.1, yaml@^2.2.2:
yaml@2, [email protected], yaml@^1.10.0, yaml@^1.7.2, yaml@^2.1.1:
version "2.3.4"
resolved "https://registry.yarnpkg.com/yaml/-/yaml-2.3.4.tgz#53fc1d514be80aabf386dc6001eb29bf3b7523b2"
integrity sha512-8aAvwVUSHpfEqTQ4w/KMlf3HcRdt50E5ODIQJBw1fQ5RL34xabzxtUlzTXVqc4rkZsPbvrXKWnABCD7kWSmocA==
Expand Down

0 comments on commit 427f222

Please sign in to comment.