Skip to content

Commit

Permalink
Merge pull request #507 from empathyco/scroll-e2e-tests
Browse files Browse the repository at this point in the history
test(scroll): reactivate e2e tests
  • Loading branch information
joseacabaneros authored Oct 4, 2024
2 parents a19b011 + 1c21741 commit e1e87de
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 15 deletions.
8 changes: 4 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"test": "npm run test:e2e:ci",
"lint": "eslint src tests --ext .ts,.tsx,.vue",
"lint:fix": "npm run lint -- --fix",
"install:local": "npm install file:../x/packages/x-components/empathyco-x-components-6.0.0-alpha.1.tgz --no-save",
"install:local": "npm install file:../x/packages/x-components/empathyco-x-components-6.0.0-alpha.3.tgz --no-save",
"install:adapter-platform:local": "npm install file:../x/packages/x-adapter-platform/empathyco-x-adapter-platform-1.0.0-alpha.73.tgz --no-save",
"install:types:local": "npm install file:../x/packages/x-types/empathyco-x-types-10.0.0-alpha.68.tgz",
"install:utils:local": "npm install file:../x/packages/x-archetype-utils/empathyco-x-archetype-utils-0.1.0-alpha.20.tgz --no-save",
Expand All @@ -33,7 +33,7 @@
"@empathyco/x-adapter": "^8.1.0-alpha.0",
"@empathyco/x-adapter-platform": "^1.1.0-alpha.3",
"@empathyco/x-archetype-utils": "^2.0.0-alpha.1",
"@empathyco/x-components": "^6.0.0-alpha.2",
"@empathyco/x-components": "^6.0.0-alpha.3",
"@empathyco/x-deep-merge": "^2.0.3-alpha.1",
"@empathyco/x-types": "^10.1.0-alpha.3",
"@empathyco/x-utils": "^1.0.3-alpha.1",
Expand Down
6 changes: 3 additions & 3 deletions src/components/mobile/mobile-sub-header.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<LocationProvider location="predictive_layer">
<RelatedTags v-if="hasSearched" class="x-pb-16" />
</LocationProvider>
<div v-if="x.query.search">
<div v-if="hasSearched">
<MobileToolbar class="x-mb-16" />
</div>
</div>
Expand All @@ -13,7 +13,7 @@

<script lang="ts">
import { defineAsyncComponent, defineComponent } from 'vue';
import { LocationProvider, use$x } from '@empathyco/x-components';
import { LocationProvider } from '@empathyco/x-components';
import MobileToolbar from '../mobile/mobile-toolbar.vue';
import CollapseHeightAnimation from '../collapse-height-animation.vue';
// eslint-disable-next-line max-len
Expand All @@ -33,7 +33,7 @@
},
setup() {
const { hasScrolledPastThreshold } = useHasScrollPastThreshold();
return { hasScrolledPastThreshold, x: use$x() };
return { hasScrolledPastThreshold };
}
});
</script>
6 changes: 0 additions & 6 deletions tests/e2e/cucumber/scroll.feature
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@ Feature: Scroll
Background:
Given a results API with known results

# TODO: Enable test after fixing it
@skip
Scenario Outline: 1. Scroll position is kept in the URL and reset upon new search requests
Given start page with "<view>" size view
When search bar is clicked
Expand All @@ -15,11 +13,9 @@ Feature: Scroll
Then url is updated with result "<resultId>"
When the page is reloaded
And result "<resultId>" is visible
Then url is updated with result "<resultId>"
When scroll to top is clicked
Then result "result-0" is visible
And scroll position is at top
When scrolling down to result "<resultId>"
And related tag number 0 is clicked
Then scroll position is at top

Expand All @@ -28,8 +24,6 @@ Feature: Scroll
| tshirt | macbook-13 | result-12 |
| tshirt | iphone-x | result-12 |

# TODO: Enable test after fixing it
@skip
Scenario Outline: 2. Scroll position is at end and toolbar is hidden
Given start page with "<view>" size view
When search bar is clicked
Expand Down

0 comments on commit e1e87de

Please sign in to comment.