Skip to content

Commit 745f39c

Browse files
committed
Tests - Remove experimental webkit tests
1 parent 4d2cdc5 commit 745f39c

File tree

7 files changed

+5
-59
lines changed

7 files changed

+5
-59
lines changed

.github/workflows/safari.yml

Lines changed: 0 additions & 26 deletions
This file was deleted.

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
![npm](https://img.shields.io/npm/v/vue-use-fixed-header?color=46c119) ![dependency-count](https://img.shields.io/badge/dependencies-0-success) ![GitHub Workflow Status](https://img.shields.io/github/actions/workflow/status/smastrom/vue-use-fixed-header/chrome.yml?branch=main&label=chrome) ![GitHub Workflow Status](https://img.shields.io/github/actions/workflow/status/smastrom/vue-use-fixed-header/safari.yml?branch=main&label=safari) ![GitHub Workflow Status](https://img.shields.io/github/actions/workflow/status/smastrom/vue-use-fixed-header/firefox.yml?branch=main&label=firefox)
1+
![npm](https://img.shields.io/npm/v/vue-use-fixed-header?color=46c119) ![dependency-count](https://img.shields.io/badge/dependencies-0-success) ![GitHub Workflow Status](https://img.shields.io/github/actions/workflow/status/smastrom/vue-use-fixed-header/chrome.yml?branch=main&label=chrome) ![GitHub Workflow Status](https://img.shields.io/github/actions/workflow/status/smastrom/vue-use-fixed-header/firefox.yml?branch=main&label=firefox)
22

33
# Vue Use Fixed Header
44

cypress.config.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ export default defineConfig({
44
video: false,
55
viewportWidth: 1280,
66
viewportHeight: 720,
7-
experimentalWebKitSupport: true,
87
component: {
98
devServer: {
109
framework: 'vue',

cypress/support/commands.ts

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -45,16 +45,11 @@ Cypress.Commands.add('resizeRoot', (newWidth: number) => {
4545
Cypress.Commands.add('scrollUp', () => cy.getScrollSubject().scrollTo('top', { duration: 300 }))
4646

4747
Cypress.Commands.add('scrollDown', () =>
48-
cy.getScrollSubject().scrollTo('bottom', { duration: 300 }),
48+
cy.getScrollSubject().scrollTo('bottom', { duration: 300 })
4949
)
5050

5151
Cypress.Commands.add('checkStyles', { prevSubject: 'element' }, (subject, styles) => {
5252
Object.entries(styles).forEach(([property, value]) => {
53-
// Webkit removes the 0s delay specified in our styles
54-
if (Cypress.isBrowser('webkit') && property === 'transition') {
55-
value = value.replaceAll(' 0s', '')
56-
}
57-
5853
cy.wrap(subject).should('have.attr', 'style').and('include', `${property}: ${value}`)
5954
})
6055
})

package.json

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,10 +49,8 @@
4949
"test": "pnpm run test:chrome && pnpm run test:firefox && pnpm run test:container:chrome && pnpm run test:container:firefox",
5050
"test:chrome": "cypress run --component --browser chrome",
5151
"test:firefox": "cypress run --component --browser firefox",
52-
"test:webkit": "cypress run --component --browser webkit",
5352
"test:container:chrome": "cypress run --component --browser chrome --env CONTAINER=\"custom\"",
5453
"test:container:firefox": "cypress run --component --browser firefox --env CONTAINER=\"custom\"",
55-
"test:container:webkit": "cypress run --component --browser webkit --env CONTAINER=\"custom\"",
5654
"test:gui": "cypress open --component",
5755
"test:gui:container": "cypress open --component --env CONTAINER=\"custom\""
5856
},
@@ -62,7 +60,6 @@
6260
"cypress": "^13.5.1",
6361
"cypress-real-events": "^1.11.0",
6462
"cypress-wait-frames": "^0.9.4",
65-
"playwright-webkit": "~1.39.0",
6663
"typescript": "^5.2.2",
6764
"vite": "^4.5.0",
6865
"vite-plugin-dts": "^3.6.3",

pnpm-lock.yaml

Lines changed: 0 additions & 18 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/useFixedHeader.ts

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ enum State {
1313

1414
export function useFixedHeader(
1515
target: MaybeTemplateRef,
16-
options: Partial<UseFixedHeaderOptions> = {},
16+
options: Partial<UseFixedHeaderOptions> = {}
1717
) {
1818
// Config
1919

@@ -152,14 +152,13 @@ export function useFixedHeader(
152152
function onTransitionEnd(e: TransitionEvent) {
153153
removeTransitionListener()
154154

155-
if (!unref(target) || e.target !== unref(target)) return
155+
if (!unref(target) || e.target !== unref(target) || e.propertyName !== 'transform') return
156156

157157
/**
158158
* In some edge cases this might be called when the header
159159
* is visible, so we need to check the transform value.
160160
*/
161161
const { transform } = window.getComputedStyle(unref(target)!)
162-
// console.log('transform@transitionEnd', transform)
163162
if (transform === 'matrix(1, 0, 0, 1, 0, 0)') return // translateY(0px)
164163

165164
setStyles({
@@ -289,7 +288,7 @@ export function useFixedHeader(
289288
removeStyles()
290289
})
291290
},
292-
{ immediate: true, flush: 'post' },
291+
{ immediate: true, flush: 'post' }
293292
)
294293

295294
return {

0 commit comments

Comments
 (0)