Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GT-2229 Fix Prayer Pathway #153

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,6 @@ describe('TractPageComponent', () => {
pageService.formAction('test-no-thanks');
expect(pageService.emailSignumFormDataNeeded).not.toHaveBeenCalled();
expect(pageService.previousPage).not.toHaveBeenCalled();
expect(pageService.nextPage).toHaveBeenCalled();
});

it('Event includes "-no-thanks" & on last page', async () => {
Expand All @@ -149,7 +148,6 @@ describe('TractPageComponent', () => {

expect(pageService.emailSignumFormDataNeeded).not.toHaveBeenCalled();
expect(pageService.nextPage).not.toHaveBeenCalled();
expect(pageService.previousPage).toHaveBeenCalled();
});

it('Card Listeners', async () => {
Expand All @@ -169,7 +167,6 @@ describe('TractPageComponent', () => {
pageService.formAction('cardLabel-2-dismiss');

expect(pageService.emailSignumFormDataNeeded).not.toHaveBeenCalled();
expect(nextSpy).toHaveBeenCalled();
setTimeout(() => {
if ((component as any)._cardsHiddenOnFormAction.length) {
expect(setHiddenCardToShowSpy).toHaveBeenCalled();
Expand Down
22 changes: 0 additions & 22 deletions src/app/page/component/tract-page/tract-page.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -129,24 +129,6 @@ export class TractPageComponent implements OnChanges, OnDestroy {
}, 0);
return;
} else {
if (functionName.includes('-no-thanks')) {
let isFirstPage = false;
let isLastPage = true;
this.isFirstPage$.subscribe((value) => {
isFirstPage = value;
});
this.isLastPage$.subscribe((value) => {
isLastPage = value;
});

if (!isLastPage) {
this.pageService.nextPage();
} else if (!isFirstPage) {
this.pageService.previousPage();
}
return;
}

if (this.cards.length) {
const cardListener = this.cards.find((card) =>
card.listeners
Expand Down Expand Up @@ -176,8 +158,6 @@ export class TractPageComponent implements OnChanges, OnDestroy {
isHideModal = !!dismissListeners.filter(
(dismissListener) => dismissListener.name === functionName
)?.length;
listeners.forEach((l) => {});
dismissListeners.forEach((l) => {});
}
}

Expand Down Expand Up @@ -214,7 +194,6 @@ export class TractPageComponent implements OnChanges, OnDestroy {
});
}
} else if (isHideCard) {
this.next();
setTimeout(() => {
this.pageService.formHidden();
this.pageService.modalHidden();
Expand All @@ -230,7 +209,6 @@ export class TractPageComponent implements OnChanges, OnDestroy {
} else if (isHideModal) {
this.pageService.modalHidden();
this.pageService.formHidden();
this.next();
setTimeout(() => {
if (this._cardsHiddenOnFormAction.length) this.setHiddenCardToShow();
if (this._cardShownOnFormAction >= 0) this.setShownCardToHidden();
Expand Down