@sprucelabs/spruce-invite-utils 5.0.0 → 5.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -5,7 +5,7 @@ export default class LoginAndConfirmTestFixture {
5
5
  private static wasBeforeEachCalled;
6
6
  static lastPromptOptions?: PromptForLoginAndConfirmOptions;
7
7
  static lastFactoryOptions?: LoginAndConfirmJoinOptions;
8
- static loginAndJoinResponse: Person | null | undefined;
8
+ private static loginAndJoinResponse;
9
9
  static beforeEach(): void;
10
10
  static getHitCount(): number;
11
11
  private static assertBeforeEachWasCalled;
@@ -8,6 +8,7 @@ class LoginAndConfirmTestFixture {
8
8
  this.setClass(CountingLoginAndConfirmController);
9
9
  this.hitCount = 0;
10
10
  this.wasBeforeEachCalled = true;
11
+ this.loginAndJoinResponse = undefined;
11
12
  }
12
13
  static getHitCount() {
13
14
  this.assertBeforeEachWasCalled();
@@ -19,7 +20,7 @@ class LoginAndConfirmTestFixture {
19
20
  static setResponse(person) {
20
21
  this.assertBeforeEachWasCalled();
21
22
  const Class = person
22
- ? PassingLoginAndConfirmController
23
+ ? CountingLoginAndConfirmController
23
24
  : FailingLoginAndConfirmController;
24
25
  this.setClass(Class);
25
26
  this.loginAndJoinResponse = person;
@@ -41,21 +42,7 @@ class CountingLoginAndConfirmController {
41
42
  //@ts-ignore
42
43
  LoginAndConfirmTestFixture.hitCount++;
43
44
  LoginAndConfirmTestFixture.lastPromptOptions = options;
44
- const response = LoginAndConfirmTestFixture.loginAndJoinResponse;
45
- if (response) {
46
- this.auth.setSessionToken((0, test_utils_1.generateId)(), response);
47
- }
48
- else if (response === null) {
49
- this.auth.clearSession();
50
- }
51
- return true;
52
- }
53
- }
54
- class PassingLoginAndConfirmController {
55
- constructor(options) {
56
- this.auth = options.authenticator;
57
- }
58
- async promptForLoginAndConfirmJoin() {
45
+ //@ts-ignore
59
46
  const response = LoginAndConfirmTestFixture.loginAndJoinResponse;
60
47
  if (response) {
61
48
  this.auth.setSessionToken((0, test_utils_1.generateId)(), response);
@@ -12,7 +12,7 @@ function renderAcceptCardSections(options) {
12
12
  },
13
13
  locationAddress && {
14
14
  text: {
15
- html: `At the location on<h4>${spruce_skill_utils_1.locationRenderer.renderAddress(locationAddress)}</h4>`,
15
+ html: `At the location on<h3>${spruce_skill_utils_1.locationRenderer.renderAddress(locationAddress)}</h3>`,
16
16
  },
17
17
  },
18
18
  {
@@ -5,7 +5,7 @@ export default class LoginAndConfirmTestFixture {
5
5
  private static wasBeforeEachCalled;
6
6
  static lastPromptOptions?: PromptForLoginAndConfirmOptions;
7
7
  static lastFactoryOptions?: LoginAndConfirmJoinOptions;
8
- static loginAndJoinResponse: Person | null | undefined;
8
+ private static loginAndJoinResponse;
9
9
  static beforeEach(): void;
10
10
  static getHitCount(): number;
11
11
  private static assertBeforeEachWasCalled;
@@ -15,6 +15,7 @@ export default class LoginAndConfirmTestFixture {
15
15
  this.setClass(CountingLoginAndConfirmController);
16
16
  this.hitCount = 0;
17
17
  this.wasBeforeEachCalled = true;
18
+ this.loginAndJoinResponse = undefined;
18
19
  }
19
20
  static getHitCount() {
20
21
  this.assertBeforeEachWasCalled();
@@ -26,7 +27,7 @@ export default class LoginAndConfirmTestFixture {
26
27
  static setResponse(person) {
27
28
  this.assertBeforeEachWasCalled();
28
29
  const Class = person
29
- ? PassingLoginAndConfirmController
30
+ ? CountingLoginAndConfirmController
30
31
  : FailingLoginAndConfirmController;
31
32
  this.setClass(Class);
32
33
  this.loginAndJoinResponse = person;
@@ -48,23 +49,7 @@ class CountingLoginAndConfirmController {
48
49
  //@ts-ignore
49
50
  LoginAndConfirmTestFixture.hitCount++;
50
51
  LoginAndConfirmTestFixture.lastPromptOptions = options;
51
- const response = LoginAndConfirmTestFixture.loginAndJoinResponse;
52
- if (response) {
53
- this.auth.setSessionToken(generateId(), response);
54
- }
55
- else if (response === null) {
56
- this.auth.clearSession();
57
- }
58
- return true;
59
- });
60
- }
61
- }
62
- class PassingLoginAndConfirmController {
63
- constructor(options) {
64
- this.auth = options.authenticator;
65
- }
66
- promptForLoginAndConfirmJoin() {
67
- return __awaiter(this, void 0, void 0, function* () {
52
+ //@ts-ignore
68
53
  const response = LoginAndConfirmTestFixture.loginAndJoinResponse;
69
54
  if (response) {
70
55
  this.auth.setSessionToken(generateId(), response);
@@ -18,7 +18,7 @@ export default function renderAcceptCardSections(options) {
18
18
  },
19
19
  locationAddress && {
20
20
  text: {
21
- html: `At the location on<h4>${locationRenderer.renderAddress(locationAddress)}</h4>`,
21
+ html: `At the location on<h3>${locationRenderer.renderAddress(locationAddress)}</h3>`,
22
22
  },
23
23
  },
24
24
  {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@sprucelabs/spruce-invite-utils",
3
3
  "description": "Invite Utilities",
4
- "version": "5.0.0",
4
+ "version": "5.0.3",
5
5
  "skill": {
6
6
  "namespace": "invite"
7
7
  },