@newskit-render/core 1.79.2 → 1.80.1-alpha.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/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,22 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
# [1.80.0](https://github.com/newscorp-ghfb/ncu-newskit-render/compare/@newskit-render/core@1.80.0-alpha.0...@newskit-render/core@1.80.0) (2022-08-05)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @newskit-render/core
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
## [1.79.2](https://github.com/newscorp-ghfb/ncu-newskit-render/compare/@newskit-render/core@1.79.2-alpha.0...@newskit-render/core@1.79.2) (2022-08-04)
|
|
15
|
+
|
|
16
|
+
**Note:** Version bump only for package @newskit-render/core
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
|
|
6
22
|
## [1.79.1](https://github.com/newscorp-ghfb/ncu-newskit-render/compare/@newskit-render/core@1.79.1-alpha.0...@newskit-render/core@1.79.1) (2022-08-01)
|
|
7
23
|
|
|
8
24
|
**Note:** Version bump only for package @newskit-render/core
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
describe('Help Hub Article Page Search bar', () => {
|
|
2
|
+
beforeEach(() => {
|
|
3
|
+
cy.mockConsentAndVisit('/help-hub')
|
|
4
|
+
})
|
|
5
|
+
it('Should have search bar and default list items', () => {
|
|
6
|
+
cy.get('[data-testid="page-header"]').contains('How can we help?')
|
|
7
|
+
cy.get('[data-testid="autocomplete-input"]').should('exist')
|
|
8
|
+
cy.get('[data-testid="introduction-title"]').contains(
|
|
9
|
+
'Our most read articles'
|
|
10
|
+
)
|
|
11
|
+
cy.get('[data-testid="content-list"]').should('exist')
|
|
12
|
+
})
|
|
13
|
+
|
|
14
|
+
it('Should show default suggestions onclick of the search bar', () => {
|
|
15
|
+
cy.get('[data-testid="autocomplete-input"]')
|
|
16
|
+
.should('be.visible')
|
|
17
|
+
.click({ force: true })
|
|
18
|
+
cy.get('[data-testid="autocomplete-panel"]').should('exist')
|
|
19
|
+
cy.get('[data-testid="autocomplete-input"]')
|
|
20
|
+
.should('be.visible')
|
|
21
|
+
.click({ force: true })
|
|
22
|
+
cy.get('[data-testid="autocomplete-panel"]').should('not.exist')
|
|
23
|
+
})
|
|
24
|
+
|
|
25
|
+
it('Should be able to search the results from search bar', () => {
|
|
26
|
+
cy.get('[data-testid="autocomplete-input"]').clear().type('google')
|
|
27
|
+
cy.get('[data-testid="autocomplete-panel"]').should('exist')
|
|
28
|
+
})
|
|
29
|
+
|
|
30
|
+
it('Should able type in searchbar and clear the text', () => {
|
|
31
|
+
cy.get('[data-testid="clear-button"]').should('not.exist')
|
|
32
|
+
cy.get('[data-testid="autocomplete-input"]').clear().type('google')
|
|
33
|
+
cy.get('[data-testid="autocomplete-input"]').should('have.value', 'google')
|
|
34
|
+
cy.get('[data-testid="clear-button"]').should('exist')
|
|
35
|
+
cy.get('[data-testid="clear-button"]').click()
|
|
36
|
+
cy.get('[data-testid="autocomplete-input"]').should('not.have.value')
|
|
37
|
+
cy.get('[data-testid="clear-button"]').should('not.exist')
|
|
38
|
+
})
|
|
39
|
+
|
|
40
|
+
it('Should redirect to result page on clicking the search icon', () => {
|
|
41
|
+
cy.get('[data-testid="search-button"]').should('exist')
|
|
42
|
+
cy.get('[data-testid="autocomplete-input"]').should('exist')
|
|
43
|
+
cy.get('[data-testid="autocomplete-input"]').clear().type('google')
|
|
44
|
+
cy.get('[data-testid="search-button"]').should('be.visible').click()
|
|
45
|
+
cy.url().should('eq', 'http://localhost:3000/help-hub/results?q=google')
|
|
46
|
+
})
|
|
47
|
+
|
|
48
|
+
it('Should be able to click on the list item', () => {
|
|
49
|
+
cy.get('[data-testid="content-list-item-0"]').should('exist')
|
|
50
|
+
cy.get('[data-testid="content-list-item-0"]').should('have.attr', 'href')
|
|
51
|
+
cy.get('[data-testid="content-list-item-0"]').click()
|
|
52
|
+
})
|
|
53
|
+
|
|
54
|
+
it('Should redirect to article page on clicking the default item from search bar dropdown list', () => {
|
|
55
|
+
cy.get('[data-testid="autocomplete-input"]')
|
|
56
|
+
.should('be.visible')
|
|
57
|
+
.click({ force: true })
|
|
58
|
+
cy.get('[data-testid="autocomplete-panel"]').should('exist')
|
|
59
|
+
cy.get('[id="autocomplete-0-item-0"]').should('be.visible').click()
|
|
60
|
+
cy.url().then((url) => {
|
|
61
|
+
cy.url().should('not.eq', url)
|
|
62
|
+
})
|
|
63
|
+
})
|
|
64
|
+
|
|
65
|
+
it('Should redirect to article page on clicking the item from search bar dropdown list', () => {
|
|
66
|
+
cy.get('[data-testid="autocomplete-input"]').should('exist')
|
|
67
|
+
cy.get('[data-testid="autocomplete-input"]').clear().type('google')
|
|
68
|
+
cy.get('[id="autocomplete-0-item-0"]').should('be.visible').click()
|
|
69
|
+
cy.location('href').should('include', '/article')
|
|
70
|
+
})
|
|
71
|
+
|
|
72
|
+
it('Should redirect to result page on pressing the enter key', () => {
|
|
73
|
+
cy.get('[data-testid="autocomplete-input"]').should('exist')
|
|
74
|
+
cy.get('[data-testid="autocomplete-input"]')
|
|
75
|
+
.clear()
|
|
76
|
+
.type('google')
|
|
77
|
+
.type('{enter}')
|
|
78
|
+
cy.location('href').should('include', '/result')
|
|
79
|
+
})
|
|
80
|
+
})
|
|
81
|
+
|
|
82
|
+
describe('Help Hub Article Page', () => {
|
|
83
|
+
beforeEach(() => {
|
|
84
|
+
cy.mockConsentAndVisit('/help-hub')
|
|
85
|
+
})
|
|
86
|
+
it('Should redirect to article page on clicking the suggestions', () => {
|
|
87
|
+
cy.get('[data-testid="autocomplete-input"]')
|
|
88
|
+
.should('be.visible')
|
|
89
|
+
.click({ force: true })
|
|
90
|
+
cy.get('[id="autocomplete-0-item-0"]').should('be.visible').click()
|
|
91
|
+
cy.get('[data-testid="introduction-title"]').should('exist')
|
|
92
|
+
cy.get('[data-testid="content-block"]').should('exist')
|
|
93
|
+
})
|
|
94
|
+
it('Should show result not found when description is empty', () => {
|
|
95
|
+
cy.visit('help-hub/article/test')
|
|
96
|
+
cy.get('[data-testid="introduction-title"]').contains(
|
|
97
|
+
"Sorry, we can't find the article you are looking for"
|
|
98
|
+
)
|
|
99
|
+
})
|
|
100
|
+
})
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
describe('Help Hub Landing Page Search bar', () => {
|
|
2
|
+
beforeEach(() => {
|
|
3
|
+
cy.mockConsentAndVisit('/help-hub')
|
|
4
|
+
})
|
|
5
|
+
it('Should have search bar and default list items', () => {
|
|
6
|
+
cy.get('[data-testid="page-header"]').contains('How can we help?')
|
|
7
|
+
cy.get('[data-testid="autocomplete-input"]').should('exist')
|
|
8
|
+
cy.get('[data-testid="introduction-title"]').contains(
|
|
9
|
+
'Our most read articles'
|
|
10
|
+
)
|
|
11
|
+
cy.get('[data-testid="content-list"]').should('exist')
|
|
12
|
+
})
|
|
13
|
+
|
|
14
|
+
it('Should show default suggestions onclick of the search bar', () => {
|
|
15
|
+
cy.get('[data-testid="autocomplete-input"]')
|
|
16
|
+
.should('be.visible')
|
|
17
|
+
.click({ force: true })
|
|
18
|
+
cy.get('[data-testid="autocomplete-panel"]').should('exist')
|
|
19
|
+
cy.get('[data-testid="autocomplete-input"]')
|
|
20
|
+
.should('be.visible')
|
|
21
|
+
.click({ force: true })
|
|
22
|
+
cy.get('[data-testid="autocomplete-panel"]').should('not.exist')
|
|
23
|
+
})
|
|
24
|
+
|
|
25
|
+
it('Should be able to search the results from search bar', () => {
|
|
26
|
+
cy.get('[data-testid="autocomplete-input"]').clear().type('google')
|
|
27
|
+
cy.get('[data-testid="autocomplete-panel"]').should('exist')
|
|
28
|
+
})
|
|
29
|
+
|
|
30
|
+
it('Should able type in searchbar and clear the text', () => {
|
|
31
|
+
cy.get('[data-testid="clear-button"]').should('not.exist')
|
|
32
|
+
cy.get('[data-testid="autocomplete-input"]').clear().type('google')
|
|
33
|
+
cy.get('[data-testid="autocomplete-input"]').should('have.value', 'google')
|
|
34
|
+
cy.get('[data-testid="clear-button"]').should('exist')
|
|
35
|
+
cy.get('[data-testid="clear-button"]').click()
|
|
36
|
+
cy.get('[data-testid="autocomplete-input"]').should('not.have.value')
|
|
37
|
+
cy.get('[data-testid="clear-button"]').should('not.exist')
|
|
38
|
+
})
|
|
39
|
+
|
|
40
|
+
it('Should redirect to result page on clicking the search icon', () => {
|
|
41
|
+
cy.get('[data-testid="search-button"]').should('exist')
|
|
42
|
+
cy.get('[data-testid="autocomplete-input"]').should('exist')
|
|
43
|
+
cy.get('[data-testid="autocomplete-input"]').clear().type('google')
|
|
44
|
+
cy.get('[data-testid="search-button"]').should('be.visible').click()
|
|
45
|
+
cy.url().should('eq', 'http://localhost:3000/help-hub/results?q=google')
|
|
46
|
+
})
|
|
47
|
+
|
|
48
|
+
it('Should be able to click on the list item', () => {
|
|
49
|
+
cy.get('[data-testid="content-list-item-0"]').should('exist')
|
|
50
|
+
cy.get('[data-testid="content-list-item-0"]').should('have.attr', 'href')
|
|
51
|
+
cy.get('[data-testid="content-list-item-0"]').click()
|
|
52
|
+
})
|
|
53
|
+
|
|
54
|
+
it('Should redirect to article page on clicking the default item from search bar dropdown list', () => {
|
|
55
|
+
cy.get('[data-testid="autocomplete-input"]')
|
|
56
|
+
.should('be.visible')
|
|
57
|
+
.click({ force: true })
|
|
58
|
+
cy.get('[data-testid="autocomplete-panel"]').should('exist')
|
|
59
|
+
cy.get('[id="autocomplete-0-item-0"]').should('be.visible').click()
|
|
60
|
+
cy.url().then((url) => {
|
|
61
|
+
cy.url().should('not.eq', url)
|
|
62
|
+
})
|
|
63
|
+
})
|
|
64
|
+
|
|
65
|
+
it('Should redirect to article page on clicking the item from search bar dropdown list', () => {
|
|
66
|
+
cy.get('[data-testid="autocomplete-input"]').should('exist')
|
|
67
|
+
cy.get('[data-testid="autocomplete-input"]').clear().type('google')
|
|
68
|
+
cy.get('[id="autocomplete-0-item-0"]').should('be.visible').click()
|
|
69
|
+
cy.location('href').should('include', '/article')
|
|
70
|
+
})
|
|
71
|
+
|
|
72
|
+
it('Should redirect to result page on pressing the enter key', () => {
|
|
73
|
+
cy.get('[data-testid="autocomplete-input"]').should('exist')
|
|
74
|
+
cy.get('[data-testid="autocomplete-input"]')
|
|
75
|
+
.clear()
|
|
76
|
+
.type('google')
|
|
77
|
+
.type('{enter}')
|
|
78
|
+
cy.location('href').should('include', '/result')
|
|
79
|
+
})
|
|
80
|
+
})
|
|
81
|
+
|
|
82
|
+
describe('Help Hub Landing Page', () => {
|
|
83
|
+
beforeEach(() => {
|
|
84
|
+
cy.mockConsentAndVisit('/help-hub')
|
|
85
|
+
})
|
|
86
|
+
it('Should be able to click on the default list item', () => {
|
|
87
|
+
cy.get('[data-testid="content-list-item-0"]').should('exist')
|
|
88
|
+
cy.get('[data-testid="content-list-item-0"]').should('have.attr', 'href')
|
|
89
|
+
cy.get('[data-testid="content-list-item-0"]').click()
|
|
90
|
+
})
|
|
91
|
+
})
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
describe('Help Hub Result Page Search bar', () => {
|
|
2
|
+
beforeEach(() => {
|
|
3
|
+
cy.mockConsentAndVisit('/help-hub')
|
|
4
|
+
})
|
|
5
|
+
it('Should have search bar and default list items', () => {
|
|
6
|
+
cy.get('[data-testid="page-header"]').contains('How can we help?')
|
|
7
|
+
cy.get('[data-testid="autocomplete-input"]').should('exist')
|
|
8
|
+
cy.get('[data-testid="introduction-title"]').contains(
|
|
9
|
+
'Our most read articles'
|
|
10
|
+
)
|
|
11
|
+
cy.get('[data-testid="content-list"]').should('exist')
|
|
12
|
+
})
|
|
13
|
+
|
|
14
|
+
it('Should show default suggestions onclick of the search bar', () => {
|
|
15
|
+
cy.get('[data-testid="autocomplete-input"]')
|
|
16
|
+
.should('be.visible')
|
|
17
|
+
.click({ force: true })
|
|
18
|
+
cy.get('[data-testid="autocomplete-panel"]').should('exist')
|
|
19
|
+
cy.get('[data-testid="autocomplete-input"]')
|
|
20
|
+
.should('be.visible')
|
|
21
|
+
.click({ force: true })
|
|
22
|
+
cy.get('[data-testid="autocomplete-panel"]').should('not.exist')
|
|
23
|
+
})
|
|
24
|
+
|
|
25
|
+
it('Should be able to search the results from search bar', () => {
|
|
26
|
+
cy.get('[data-testid="autocomplete-input"]').clear().type('google')
|
|
27
|
+
cy.get('[data-testid="autocomplete-panel"]').should('exist')
|
|
28
|
+
})
|
|
29
|
+
|
|
30
|
+
it('Should able type in searchbar and clear the text', () => {
|
|
31
|
+
cy.get('[data-testid="clear-button"]').should('not.exist')
|
|
32
|
+
cy.get('[data-testid="autocomplete-input"]').clear().type('google')
|
|
33
|
+
cy.get('[data-testid="autocomplete-input"]').should('have.value', 'google')
|
|
34
|
+
cy.get('[data-testid="clear-button"]').should('exist')
|
|
35
|
+
cy.get('[data-testid="clear-button"]').click()
|
|
36
|
+
cy.get('[data-testid="autocomplete-input"]').should('not.have.value')
|
|
37
|
+
cy.get('[data-testid="clear-button"]').should('not.exist')
|
|
38
|
+
})
|
|
39
|
+
|
|
40
|
+
it('Should redirect to result page on clicking the search icon', () => {
|
|
41
|
+
cy.get('[data-testid="search-button"]').should('exist')
|
|
42
|
+
cy.get('[data-testid="autocomplete-input"]').should('exist')
|
|
43
|
+
cy.get('[data-testid="autocomplete-input"]').clear().type('google')
|
|
44
|
+
cy.get('[data-testid="search-button"]').should('be.visible').click()
|
|
45
|
+
cy.url().should('eq', 'http://localhost:3000/help-hub/results?q=google')
|
|
46
|
+
})
|
|
47
|
+
|
|
48
|
+
it('Should be able to click on the list item', () => {
|
|
49
|
+
cy.get('[data-testid="content-list-item-0"]').should('exist')
|
|
50
|
+
cy.get('[data-testid="content-list-item-0"]').should('have.attr', 'href')
|
|
51
|
+
cy.get('[data-testid="content-list-item-0"]').click()
|
|
52
|
+
})
|
|
53
|
+
|
|
54
|
+
it('Should redirect to article page on clicking the default item from search bar dropdown list', () => {
|
|
55
|
+
cy.get('[data-testid="autocomplete-input"]')
|
|
56
|
+
.should('be.visible')
|
|
57
|
+
.click({ force: true })
|
|
58
|
+
cy.get('[data-testid="autocomplete-panel"]').should('exist')
|
|
59
|
+
cy.get('[id="autocomplete-0-item-0"]').should('be.visible').click()
|
|
60
|
+
cy.url().then((url) => {
|
|
61
|
+
cy.url().should('not.eq', url)
|
|
62
|
+
})
|
|
63
|
+
})
|
|
64
|
+
|
|
65
|
+
it('Should redirect to article page on clicking the item from search bar dropdown list', () => {
|
|
66
|
+
cy.get('[data-testid="autocomplete-input"]').should('exist')
|
|
67
|
+
cy.get('[data-testid="autocomplete-input"]').clear().type('google')
|
|
68
|
+
cy.get('[id="autocomplete-0-item-0"]').should('be.visible').click()
|
|
69
|
+
cy.location('href').should('include', '/article')
|
|
70
|
+
})
|
|
71
|
+
|
|
72
|
+
it('Should redirect to result page on pressing the enter key', () => {
|
|
73
|
+
cy.get('[data-testid="autocomplete-input"]').should('exist')
|
|
74
|
+
cy.get('[data-testid="autocomplete-input"]')
|
|
75
|
+
.clear()
|
|
76
|
+
.type('google')
|
|
77
|
+
.type('{enter}')
|
|
78
|
+
cy.location('href').should('include', '/result')
|
|
79
|
+
})
|
|
80
|
+
})
|
|
81
|
+
describe('Help Hub Result Page', () => {
|
|
82
|
+
beforeEach(() => {
|
|
83
|
+
cy.mockConsentAndVisit('/help-hub/results?q=times')
|
|
84
|
+
})
|
|
85
|
+
|
|
86
|
+
it('Should show search results', () => {
|
|
87
|
+
cy.get('[data-testid="introduction-title"]').contains('Search results')
|
|
88
|
+
cy.get('[data-testid="description-block"]').should('exist')
|
|
89
|
+
cy.get('[data-testid="content-list"]').should('exist')
|
|
90
|
+
cy.get('[data-testid="content-list-item-0"]').should('exist')
|
|
91
|
+
cy.get('[data-testid="autocomplete-input"]').should('exist')
|
|
92
|
+
})
|
|
93
|
+
|
|
94
|
+
it('Should redirect to article page on clicking the search results', () => {
|
|
95
|
+
cy.get('[data-testid="content-list-item-0"]').should('exist')
|
|
96
|
+
cy.get('[data-testid="content-list-item-0"]').should('be.visible').click()
|
|
97
|
+
cy.location('href').should('include', '/article')
|
|
98
|
+
})
|
|
99
|
+
|
|
100
|
+
it('Should match the query param in the description block', () => {
|
|
101
|
+
const paramObj = {}
|
|
102
|
+
cy.url().then((url) => {
|
|
103
|
+
const arr = url.split('?')
|
|
104
|
+
arr.forEach((param) => {
|
|
105
|
+
const [key, value] = param.split('=')
|
|
106
|
+
paramObj[key] = value
|
|
107
|
+
})
|
|
108
|
+
cy.get('[data-testid="description-block"]').contains(`${paramObj.q}`)
|
|
109
|
+
})
|
|
110
|
+
})
|
|
111
|
+
it('Should able to click the load more button', () => {
|
|
112
|
+
cy.get('[data-testid="load-more"]').should('exist')
|
|
113
|
+
cy.get('[data-testid="load-more"]').should('be.visible').click()
|
|
114
|
+
})
|
|
115
|
+
})
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@newskit-render/core",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.80.1-alpha.0",
|
|
4
4
|
"description": "Newskit Render - Core package",
|
|
5
5
|
"author": "",
|
|
6
6
|
"license": "UNLICENSED",
|
|
@@ -35,12 +35,12 @@
|
|
|
35
35
|
"@apollo/client": "3.4.16",
|
|
36
36
|
"@newskit-render/api": "^0.36.1",
|
|
37
37
|
"@newskit-render/auth": "^0.44.0",
|
|
38
|
-
"@newskit-render/checkout": "^0.51.
|
|
38
|
+
"@newskit-render/checkout": "^0.51.7-alpha.0",
|
|
39
39
|
"@newskit-render/feature-flags": "^0.24.0",
|
|
40
40
|
"@newskit-render/feed": "^0.24.0",
|
|
41
|
-
"@newskit-render/my-account": "^
|
|
42
|
-
"@newskit-render/shared-components": "^0.68.
|
|
43
|
-
"@newskit-render/standalone-components": "^0.33.
|
|
41
|
+
"@newskit-render/my-account": "^1.2.1-alpha.0",
|
|
42
|
+
"@newskit-render/shared-components": "^0.68.2-alpha.0",
|
|
43
|
+
"@newskit-render/standalone-components": "^0.33.2-alpha.0",
|
|
44
44
|
"@newskit-render/validation": "^0.50.0",
|
|
45
45
|
"cross-fetch": "3.1.5",
|
|
46
46
|
"graphql": "15.6.0",
|