@internetarchive/ia-book-actions 1.2.0 → 1.3.0

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@internetarchive/ia-book-actions",
3
- "version": "1.2.0",
3
+ "version": "1.3.0",
4
4
  "description": "Bookreader actions for borrowable book",
5
5
  "author": "Internet Archive",
6
6
  "license": "AGPL-3.0-only",
@@ -266,6 +266,7 @@ export class CollapsibleActionGroup extends ActionsHandler {
266
266
 
267
267
  get getPrimaryItems() {
268
268
  return this.primaryActions
269
+ .slice(1)
269
270
  .map(
270
271
  action =>
271
272
  html`<li>${this.renderActionButton(action, this.initialButton)}</li>`
@@ -36,7 +36,7 @@ export default class ActionsConfig {
36
36
  firstBrowseConfig() {
37
37
  return {
38
38
  id: 'browseBook',
39
- text: 'Borrow (auto-renewing)',
39
+ text: 'Borrow',
40
40
  className: 'primary',
41
41
  analyticsEvent: {
42
42
  category: this.analyticsCategories.preview,
@@ -25,7 +25,7 @@ describe('Get Lending Actions', () => {
25
25
 
26
26
  expect(actions.primaryTitle).to.equal(bookTitles.available_1hr);
27
27
  expect(actions.primaryActions.length).to.equal(3);
28
- expect(actions.primaryActions[0].text).to.equal('Borrow (auto-renewing)');
28
+ expect(actions.primaryActions[0].text).to.equal('Borrow');
29
29
  expect(actions.primaryActions[1].text).to.equal('Borrow for 14 days');
30
30
  expect(actions.secondaryActions[1].text).to.equal('Purchase at ');
31
31
  });
@@ -111,7 +111,7 @@ describe('Get Lending Actions', () => {
111
111
  expect(actions.primaryTitle).to.equal(bookTitles.claim_waitlist);
112
112
  expect(actions.primaryActions.length).to.equal(3);
113
113
  expect(actions.primaryActions[0].text).to.equal('Borrow for 14 days');
114
- expect(actions.primaryActions[1].text).to.equal('Borrow (auto-renewing)');
114
+ expect(actions.primaryActions[1].text).to.equal('Borrow');
115
115
  expect(actions.primaryActions[2].text).to.equal('Leave Waitlist');
116
116
  expect(spy.called).to.be.true;
117
117
  });
@@ -138,7 +138,7 @@ describe('Get Lending Actions', () => {
138
138
  expect(actions.primaryTitle).to.equal(bookTitles.on_waitlist);
139
139
  expect(actions.primaryActions.length).to.equal(2);
140
140
  expect(actions.primaryActions[0].text).to.equal('Leave Waitlist');
141
- expect(actions.primaryActions[1].text).to.equal('Borrow (auto-renewing)');
141
+ expect(actions.primaryActions[1].text).to.equal('Borrow');
142
142
  expect(claimSpy.called).to.be.false;
143
143
  expect(waitlistSpy.called).to.be.true;
144
144
  });
@@ -162,7 +162,7 @@ describe('Get Lending Actions', () => {
162
162
  expect(actions.primaryTitle).to.equal(bookTitles.on_waitlist);
163
163
  expect(actions.primaryActions.length).to.equal(2);
164
164
  expect(actions.primaryActions[0].text).to.equal('Leave Waitlist');
165
- expect(actions.primaryActions[1].text).to.equal('Borrow (auto-renewing)');
165
+ expect(actions.primaryActions[1].text).to.equal('Borrow');
166
166
  expect(waitlistSpy.called).to.be.true;
167
167
  });
168
168
  });
@@ -228,7 +228,7 @@ describe('Borrow status actions', () => {
228
228
 
229
229
  // removed available_to_borrow from lending bar
230
230
  expect(el.lendingStatus.available_to_borrow).to.be.false;
231
- expect(el.primaryActions[0].text).to.equal('Borrow (auto-renewing)');
231
+ expect(el.primaryActions[0].text).to.equal('Borrow');
232
232
  });
233
233
 
234
234
  it('Check action for borrowable book without user', async () => {