@newskit-render/core 4.13.0-alpha.1 → 4.13.0-alpha.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.
package/README.md CHANGED
@@ -258,14 +258,14 @@ export { AppContextProvider, AppContext }
258
258
  You may see some lines of code that have comments next to them:
259
259
 
260
260
  ```
261
- code here /* cra-effected */
261
+ code here. /* cra-effected */
262
262
  ```
263
263
 
264
264
  Or around them:
265
265
 
266
266
  ```
267
267
  /* start cra-effected */
268
- code here
268
+ code here.
269
269
  /* end cra-effected */
270
270
  ```
271
271
 
@@ -105,63 +105,6 @@ describe('My account personal details', () => {
105
105
  // cy.contains('21/03/1988')
106
106
  // })
107
107
 
108
- it('Should go to edit page and change display name ', () => {
109
- cy.get('a[href="/account/edit/displayName"]')
110
- .should('be.visible')
111
- .click({ force: true })
112
- cy.get('[name="displayName"]').clear().type('NKDN')
113
- cy.get('[data-testid="primary-button"]').scrollIntoView().click()
114
- cy.contains(
115
- '[data-testid="toast-container"]',
116
- 'Updating your display name...'
117
- )
118
- // Redirects to Personal details page
119
- cy.contains(
120
- '[data-testid="toast-container"]',
121
- 'Your display name has been updated.'
122
- )
123
- })
124
-
125
- it('Should show error toast when updating display name', () => {
126
- cy.intercept('POST', '/api/account/mutate', { statusCode: 500 })
127
- cy.get('a[href="/account/edit/displayName"]')
128
- .should('be.visible')
129
- .click({ force: true })
130
- cy.get('[name="displayName"]').clear().type('Rock')
131
- cy.get('[data-testid="primary-button"]')
132
- .scrollIntoView()
133
- .click({ force: true })
134
- cy.contains(
135
- '[data-testid="toast-container"]',
136
- 'Updating your display name...'
137
- )
138
- cy.contains(
139
- '[data-testid="toast-container"]',
140
- "Sorry, we're unable to save your display name right now. Please try again or come back later."
141
- )
142
- })
143
-
144
- it('Should show error message when display name is empty', () => {
145
- cy.get('a[href="/account/edit/displayName"]')
146
- .should('be.visible')
147
- .click({ force: true })
148
- cy.get('[name="displayName"]').clear()
149
- cy.get('[data-testid="primary-button"]').scrollIntoView().click()
150
- cy.contains('Please enter your Display Name')
151
- })
152
-
153
- it('Should go back to Personal Details on clicking cancel button', () => {
154
- cy.get('a[href="/account/edit/displayName"]')
155
- .should('be.visible')
156
- .click({ force: true })
157
- cy.get('[data-testid="secondary-button"]')
158
- .should('be.visible')
159
- .click({ force: true })
160
- cy.location().should((loc) => {
161
- expect(loc.pathname).to.eq('/account')
162
- })
163
- })
164
-
165
108
  // it('Should go to edit page and change email', () => {
166
109
  // const currentEmail = 'render.e2e.default@yopmail.com'
167
110
  // const newEmail = 'render.e2e.default2@yopmail.com'
@@ -368,3 +311,67 @@ describe('My account personal details', () => {
368
311
  cy.url().should('eq', 'http://localhost:3000/account')
369
312
  })
370
313
  })
314
+
315
+ describe('My account personal details - Display name', () => {
316
+ beforeEach(() => {
317
+ cy.GetTnlAcsSession('tnl')
318
+ cy.mockConsentAndVisit('/account')
319
+ })
320
+
321
+ it('Should go to edit page and change display name ', () => {
322
+ cy.get('a[href="/account/edit/displayName"]')
323
+ .should('be.visible')
324
+ .click({ force: true })
325
+ cy.get('[name="displayName"]').clear().type('NKDN')
326
+ cy.get('[data-testid="primary-button"]').scrollIntoView().click()
327
+ cy.contains(
328
+ '[data-testid="toast-container"]',
329
+ 'Updating your display name...'
330
+ )
331
+ // Redirects to Personal details page
332
+ cy.contains(
333
+ '[data-testid="toast-container"]',
334
+ 'Your display name has been updated.'
335
+ )
336
+ })
337
+
338
+ it('Should show error toast when updating display name', () => {
339
+ cy.intercept('POST', '/api/account/mutate', { statusCode: 500 })
340
+ cy.get('a[href="/account/edit/displayName"]')
341
+ .should('be.visible')
342
+ .click({ force: true })
343
+ cy.get('[name="displayName"]').clear().type('Rock')
344
+ cy.get('[data-testid="primary-button"]')
345
+ .scrollIntoView()
346
+ .click({ force: true })
347
+ cy.contains(
348
+ '[data-testid="toast-container"]',
349
+ 'Updating your display name...'
350
+ )
351
+ cy.contains(
352
+ '[data-testid="toast-container"]',
353
+ "Sorry, we're unable to save your display name right now. Please try again or come back later."
354
+ )
355
+ })
356
+
357
+ it('Should show error message when display name is empty', () => {
358
+ cy.get('a[href="/account/edit/displayName"]')
359
+ .should('be.visible')
360
+ .click({ force: true })
361
+ cy.get('[name="displayName"]').clear()
362
+ cy.get('[data-testid="primary-button"]').scrollIntoView().click()
363
+ cy.contains('Please enter your Display Name')
364
+ })
365
+
366
+ it('Should go back to Personal Details on clicking cancel button', () => {
367
+ cy.get('a[href="/account/edit/displayName"]')
368
+ .should('be.visible')
369
+ .click({ force: true })
370
+ cy.get('[data-testid="secondary-button"]')
371
+ .should('be.visible')
372
+ .click({ force: true })
373
+ cy.location().should((loc) => {
374
+ expect(loc.pathname).to.eq('/account')
375
+ })
376
+ })
377
+ })
@@ -260,6 +260,7 @@ describe('Account Subscription & Cancellation', () => {
260
260
  cy.contains(
261
261
  'Please note that if you choose a delivery location that is not secure we cannot be liable for lost or stolen newspapers.'
262
262
  )
263
+ cy.get('textarea[name="other"]').clear()
263
264
  cy.get('[data-testid="primary-button"]').scrollIntoView().click()
264
265
  cy.contains('Please enter your delivery instructions.')
265
266
  cy.get('textarea[name="other"]')
@@ -1,6 +1,6 @@
1
1
  describe('My account commenting notifications', () => {
2
2
  beforeEach(() => {
3
- cy.GetAcsSession()
3
+ cy.GetTnlAcsSession('tnl')
4
4
  cy.mockConsentAndVisit('/account/edit/commenting-notifications')
5
5
  })
6
6
 
@@ -254,6 +254,7 @@ commands:
254
254
  echo 'export HELM_OPT_SET="$HELM_OPT_SET --set envs.TEALIUM_ACCOUNT_ID=${TEALIUM_ACCOUNT_ID}"' >> $BASH_ENV
255
255
  echo 'export HELM_OPT_SET="$HELM_OPT_SET --set envs.TEALIUM_PROFILE_ID=${TEALIUM_PROFILE_ID}"' >> $BASH_ENV
256
256
  echo 'export HELM_OPT_SET="$HELM_OPT_SET --set envs.TEALIUM_ENV=${TEALIUM_ENV}"' >> $BASH_ENV
257
+ echo 'export HELM_OPT_SET="$HELM_OPT_SET --set secret.items.COMMENTING_ADMIN_SERVICE_URL=${COMMENTING_ADMIN_SERVICE_URL}"' >> $BASH_ENV
257
258
  echo 'export HELM_OPT_SET="$HELM_OPT_SET --set secret.items.NEW_RELIC_LICENSE_KEY=${NEW_RELIC_LICENSE_KEY}"' >> $BASH_ENV
258
259
  echo 'export HELM_OPT_SET="$HELM_OPT_SET --set secret.items.ACCOUNT_PROVIDER_GRAPHQL_URL=${ACCOUNT_PROVIDER_GRAPHQL_URL}"' >> $BASH_ENV
259
260
  echo 'export HELM_OPT_SET="$HELM_OPT_SET --set secret.items.ACCOUNT_PROVIDER_INTERNAL_AUTH0_DOMAIN=${ACCOUNT_PROVIDER_INTERNAL_AUTH0_DOMAIN}"' >> $BASH_ENV
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@newskit-render/core",
3
- "version": "4.13.0-alpha.1",
3
+ "version": "4.13.0-alpha.3",
4
4
  "description": "Newskit Render - Core package",
5
5
  "author": "",
6
6
  "license": "UNLICENSED",
@@ -40,14 +40,14 @@
40
40
  "@emotion-icons/material-outlined": "3.14.0",
41
41
  "@emotion/react": "11.9.3",
42
42
  "@emotion/styled": "11.9.3",
43
- "@newskit-render/api": "^1.8.0-alpha.1",
43
+ "@newskit-render/api": "^1.8.0-alpha.2",
44
44
  "@newskit-render/auth": "^1.6.0-alpha.1",
45
- "@newskit-render/checkout": "^3.6.0-alpha.1",
45
+ "@newskit-render/checkout": "^3.6.0-alpha.2",
46
46
  "@newskit-render/feature-flags": "^1.6.0-alpha.1",
47
- "@newskit-render/feed": "^1.7.0-alpha.1",
48
- "@newskit-render/my-account": "^6.18.0-alpha.1",
47
+ "@newskit-render/feed": "^1.7.0-alpha.2",
48
+ "@newskit-render/my-account": "^6.18.0-alpha.2",
49
49
  "@newskit-render/shared-components": "^3.20.0-alpha.1",
50
- "@newskit-render/standalone-components": "^3.15.0-alpha.1",
50
+ "@newskit-render/standalone-components": "^3.15.0-alpha.2",
51
51
  "@newskit-render/validation": "^1.11.0-alpha.1",
52
52
  "cross-fetch": "3.1.5",
53
53
  "graphql": "16.6.0",