Skip to content

Commit 444c3aa

Browse files
authored
Merge pull request #19 from arturovt/fix
2 parents e17d2a4 + f1a28ef commit 444c3aa

File tree

3 files changed

+20
-7
lines changed

3 files changed

+20
-7
lines changed

.github/workflows/helipopper.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,5 +52,5 @@ jobs:
5252
with:
5353
browser: chrome
5454
headless: true
55-
start: npm run serve:integration:static
56-
wait-on: 'http://localhost:4200'
55+
start: npm run serve:playground:static
56+
wait-on: http://localhost:4200

cypress/integration/helipopper.spec.ts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,15 @@
1+
Cypress.on('scrolled', element => {
2+
// When we do `cy.get()` the Cypress finds the element
3+
// and scrolls down, thus this element becomes at the very top
4+
// of the page.
5+
// `tippy.js` will not show tooltips if they appeared in an invisible
6+
// part of the window.
7+
element.get(0).scrollIntoView({
8+
block: 'center',
9+
inline: 'center'
10+
});
11+
});
12+
113
describe('@ngneat/helipopper', () => {
214
beforeEach(() => {
315
cy.visit('/').wait(200);

package.json

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,15 +22,16 @@
2222
"schematics:build": "npm run build --prefix ./schematics",
2323
"build:playground": "ng build --project helipopper-playground --prod",
2424
"test:playground": "ng test --project helipopper-playground",
25-
"serve:integration:static": "serve dist/helipopper-playground -l 4200",
25+
"serve:playground": "ng s --project helipopper-playground --live-reload false",
26+
"serve:playground:static": "serve dist/helipopper-playground -l 4200",
2627
"// - E2E": "E2E testing",
2728
"cy:open": "cypress open --config integrationFolder=cypress/integration",
2829
"cy:run": "cypress run --config integrationFolder=cypress/integration",
29-
"e2e": "start-test serve:integration 4200 cy:open",
30-
"e2e:chrome": "start-test serve:integration 4200 cy:run:chrome",
31-
"e2e:chromium": "start-test serve:integration 4200 cy:run:chromium",
30+
"e2e": "start-test serve:playground 4200 cy:open",
31+
"e2e:chrome": "start-test serve:playground 4200 cy:run:chrome",
32+
"e2e:chromium": "start-test serve:playground 4200 cy:run:chromium",
3233
"// - CI": "CI Testing",
33-
"test:ci:e2e": "start-test serve:integration:static 4200 cy:run",
34+
"test:ci:e2e": "start-test serve:playground:static 4200 cy:run",
3435
"test:playground:ci": "cross-env CI=true npm run test:playground -- --watch=false --browsers=ChromeHeadlessCustom"
3536
},
3637
"private": true,

0 commit comments

Comments
 (0)