bukazu-portal-react 3.3.3 → 3.3.4
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/build/index.css +1 -1
- package/build/portal.es.js +19931 -20259
- package/build/portal.umd.js +80 -82
- package/package.json +9 -7
- package/.env.development +0 -1
- package/.eslintrc +0 -25
- package/.github/dependabot.yml +0 -11
- package/.github/workflows/node.js.yml +0 -31
- package/.github/workflows/npm-publish.yml +0 -33
- package/.nvmrc +0 -1
- package/.prettierrc +0 -6
- package/.vscode/settings.json +0 -24
- package/CHANGELOG.MD +0 -93
- package/babel.config.json +0 -6
- package/calendar.html +0 -16
- package/coverage/clover.xml +0 -28
- package/coverage/coverage-final.json +0 -2
- package/coverage/lcov-report/base.css +0 -224
- package/coverage/lcov-report/block-navigation.js +0 -87
- package/coverage/lcov-report/favicon.png +0 -0
- package/coverage/lcov-report/helper.ts.html +0 -142
- package/coverage/lcov-report/index.html +0 -116
- package/coverage/lcov-report/prettify.css +0 -1
- package/coverage/lcov-report/prettify.js +0 -2
- package/coverage/lcov-report/sort-arrow-sprite.png +0 -0
- package/coverage/lcov-report/sorter.js +0 -196
- package/coverage/lcov.info +0 -36
- package/cypress/e2e/.examples/actions.spec.js +0 -299
- package/cypress/e2e/.examples/aliasing.spec.js +0 -39
- package/cypress/e2e/.examples/assertions.spec.js +0 -177
- package/cypress/e2e/.examples/connectors.spec.js +0 -97
- package/cypress/e2e/.examples/cookies.spec.js +0 -77
- package/cypress/e2e/.examples/cypress_api.spec.js +0 -202
- package/cypress/e2e/.examples/files.spec.js +0 -89
- package/cypress/e2e/.examples/local_storage.spec.js +0 -52
- package/cypress/e2e/.examples/location.spec.js +0 -32
- package/cypress/e2e/.examples/misc.spec.js +0 -104
- package/cypress/e2e/.examples/navigation.spec.js +0 -56
- package/cypress/e2e/.examples/network_requests.spec.js +0 -163
- package/cypress/e2e/.examples/querying.spec.js +0 -114
- package/cypress/e2e/.examples/spies_stubs_clocks.spec.js +0 -205
- package/cypress/e2e/.examples/traversal.spec.js +0 -121
- package/cypress/e2e/.examples/utilities.spec.js +0 -110
- package/cypress/e2e/.examples/viewport.spec.js +0 -59
- package/cypress/e2e/.examples/waiting.spec.js +0 -31
- package/cypress/e2e/.examples/window.spec.js +0 -22
- package/cypress/e2e/booking.spec.js +0 -81
- package/cypress/e2e/calendar.spec.js +0 -21
- package/cypress/e2e/search.spec.js +0 -25
- package/cypress/fixtures/example.json +0 -5
- package/cypress/plugins/index.js +0 -16
- package/cypress/support/commands.js +0 -25
- package/cypress/support/commands.ts +0 -37
- package/cypress/support/component-index.html +0 -12
- package/cypress/support/component.ts +0 -39
- package/cypress/support/e2e.js +0 -20
- package/cypress.config.ts +0 -15
- package/dev.tsx +0 -44
- package/index.html +0 -15
- package/invalid-calendar.html +0 -16
- package/jest.config.js +0 -195
- package/postcss.config.js +0 -17
- package/reviews.html +0 -16
- package/src/_lib/SearchQueries.ts +0 -145
- package/src/_lib/Tracking.ts +0 -51
- package/src/_lib/countries/de.json +0 -998
- package/src/_lib/countries/en.json +0 -998
- package/src/_lib/countries/es.json +0 -998
- package/src/_lib/countries/fr.json +0 -998
- package/src/_lib/countries/it.json +0 -998
- package/src/_lib/countries/nl.json +0 -998
- package/src/_lib/countries.ts +0 -15
- package/src/_lib/date_helper.ts +0 -27
- package/src/_lib/queries.ts +0 -244
- package/src/components/App.tsx +0 -108
- package/src/components/AppContext.ts +0 -14
- package/src/components/CalendarPage/BookingForm.tsx +0 -49
- package/src/components/CalendarPage/Calendar.tsx +0 -49
- package/src/components/CalendarPage/CalendarPage.tsx +0 -43
- package/src/components/CalendarPage/CalendarParts/CalendarContext.tsx +0 -89
- package/src/components/CalendarPage/CalendarParts/CalendarHeader.tsx +0 -72
- package/src/components/CalendarPage/CalendarParts/DayClasses.ts +0 -113
- package/src/components/CalendarPage/CalendarParts/GenerateCalendar.tsx +0 -72
- package/src/components/CalendarPage/CalendarParts/Legend.tsx +0 -33
- package/src/components/CalendarPage/CalendarParts/MonthHeader.tsx +0 -15
- package/src/components/CalendarPage/CalendarParts/Months.tsx +0 -37
- package/src/components/CalendarPage/CalendarParts/RenderCells.tsx +0 -97
- package/src/components/CalendarPage/CalendarParts/SingleMonth.tsx +0 -72
- package/src/components/CalendarPage/CalendarParts/StartBooking.tsx +0 -17
- package/src/components/CalendarPage/CalendarParts/WeekDays.tsx +0 -27
- package/src/components/CalendarPage/FormCreator.tsx +0 -230
- package/src/components/CalendarPage/FormItems/Date.tsx +0 -61
- package/src/components/CalendarPage/FormItems/NumberSelect.tsx +0 -39
- package/src/components/CalendarPage/FormItems/Select.tsx +0 -38
- package/src/components/CalendarPage/FormItems/index.ts +0 -4
- package/src/components/CalendarPage/PriceField/Price.tsx +0 -58
- package/src/components/CalendarPage/PriceField/Queries.ts +0 -23
- package/src/components/CalendarPage/PriceField/index.tsx +0 -129
- package/src/components/CalendarPage/Summary/CostRow.tsx +0 -58
- package/src/components/CalendarPage/Summary/CostSection.tsx +0 -15
- package/src/components/CalendarPage/Summary/CostSummary.tsx +0 -61
- package/src/components/CalendarPage/Summary/Description.tsx +0 -27
- package/src/components/CalendarPage/Summary/InsurancesAndRequired.tsx +0 -68
- package/src/components/CalendarPage/Summary/Object.tsx +0 -59
- package/src/components/CalendarPage/Summary/OnSite.tsx +0 -36
- package/src/components/CalendarPage/Summary/OptionalNotOnSite.tsx +0 -43
- package/src/components/CalendarPage/Summary/OptionalOnSite.tsx +0 -39
- package/src/components/CalendarPage/Summary/Queries.ts +0 -31
- package/src/components/CalendarPage/Summary/RentAndDiscount.tsx +0 -30
- package/src/components/CalendarPage/Summary/Totals.tsx +0 -89
- package/src/components/CalendarPage/Summary/cost_types.d.ts +0 -31
- package/src/components/CalendarPage/Summary/index.tsx +0 -24
- package/src/components/CalendarPage/calender_types.d.ts +0 -16
- package/src/components/CalendarPage/formParts/AssistanceMessage.tsx +0 -60
- package/src/components/CalendarPage/formParts/BookingHelpers.tsx +0 -47
- package/src/components/CalendarPage/formParts/BookingOrOption.tsx +0 -35
- package/src/components/CalendarPage/formParts/CancelInsuranceText.tsx +0 -69
- package/src/components/CalendarPage/formParts/DefaultBookingFields.ts +0 -105
- package/src/components/CalendarPage/formParts/DiscountCode.tsx +0 -62
- package/src/components/CalendarPage/formParts/Guests.tsx +0 -77
- package/src/components/CalendarPage/formParts/OptionalBookingFields.tsx +0 -148
- package/src/components/CalendarPage/formParts/OptionalCosts.tsx +0 -103
- package/src/components/CalendarPage/formParts/SuccessMessage.tsx +0 -31
- package/src/components/CalendarPage/formParts/Validations.tsx +0 -64
- package/src/components/CalendarPage/formParts/discount.tsx +0 -69
- package/src/components/CalendarPage/formParts/form_types.d.ts +0 -38
- package/src/components/CalendarPage/formParts/insurances.tsx +0 -62
- package/src/components/CalendarPage/formParts/radioButtons.tsx +0 -66
- package/src/components/Error/ApiError.tsx +0 -33
- package/src/components/Error/IntegrationError.tsx +0 -62
- package/src/components/Error/index.ts +0 -4
- package/src/components/ErrorBoundary.tsx +0 -34
- package/src/components/Modal/index.tsx +0 -46
- package/src/components/ReviewsPage/Queries.ts +0 -26
- package/src/components/ReviewsPage/ReviewsPage.tsx +0 -45
- package/src/components/ReviewsPage/Score.tsx +0 -29
- package/src/components/ReviewsPage/SingleReview.tsx +0 -38
- package/src/components/ReviewsPage/note.tsx +0 -17
- package/src/components/SafeBooking.tsx +0 -96
- package/src/components/SearchPage/Field.tsx +0 -75
- package/src/components/SearchPage/Filters.tsx +0 -91
- package/src/components/SearchPage/Paginator.tsx +0 -63
- package/src/components/SearchPage/Results.tsx +0 -129
- package/src/components/SearchPage/SearchPage.tsx +0 -115
- package/src/components/SearchPage/SingleResult.tsx +0 -93
- package/src/components/SearchPage/filters/Categories.tsx +0 -57
- package/src/components/SearchPage/filters/DateFilter.tsx +0 -34
- package/src/components/SearchPage/filters/List.tsx +0 -80
- package/src/components/SearchPage/filters/NumberFilter.tsx +0 -37
- package/src/components/SearchPage/filters/Radio.tsx +0 -46
- package/src/components/SearchPage/filters/Select.tsx +0 -85
- package/src/components/SearchPage/filters/__tests__/helper.spec.js +0 -13
- package/src/components/SearchPage/filters/filter_types.d.ts +0 -25
- package/src/components/SearchPage/filters/helper.ts +0 -19
- package/src/components/icons/ArrowLeft.svg.tsx +0 -20
- package/src/components/icons/ArrowRight.svg.tsx +0 -16
- package/src/components/icons/Reload.svg.tsx +0 -23
- package/src/components/icons/info.svg.tsx +0 -24
- package/src/components/icons/loading.svg.tsx +0 -98
- package/src/custom.d.ts +0 -10
- package/src/index.tsx +0 -104
- package/src/locales/de.json +0 -137
- package/src/locales/en.json +0 -137
- package/src/locales/es.json +0 -132
- package/src/locales/fr.json +0 -132
- package/src/locales/it.json +0 -128
- package/src/locales/nl.json +0 -138
- package/src/styles/calendar.css +0 -317
- package/src/styles/datepicker.css +0 -6
- package/src/styles/field.css +0 -105
- package/src/styles/filters.css +0 -92
- package/src/styles/form.css +0 -219
- package/src/styles/main.css +0 -80
- package/src/styles/modal.css +0 -79
- package/src/styles/pagination.css +0 -92
- package/src/styles/price-overview.css +0 -111
- package/src/styles/result.css +0 -142
- package/src/styles/results.css +0 -50
- package/src/styles/reviews.css +0 -90
- package/src/styles/success.css +0 -9
- package/src/types.d.ts +0 -91
- package/tmp/cache/vite/last-build-production.json +0 -7
- package/tsconfig.json +0 -17
- package/vite.config.ts +0 -31
|
@@ -1,110 +0,0 @@
|
|
|
1
|
-
/// <reference types="cypress" />
|
|
2
|
-
|
|
3
|
-
context('Utilities', () => {
|
|
4
|
-
beforeEach(() => {
|
|
5
|
-
cy.visit('https://example.cypress.io/utilities')
|
|
6
|
-
})
|
|
7
|
-
|
|
8
|
-
it('Cypress._ - call a lodash method', () => {
|
|
9
|
-
// https://on.cypress.io/_
|
|
10
|
-
cy.request('https://jsonplaceholder.cypress.io/users')
|
|
11
|
-
.then((response) => {
|
|
12
|
-
let ids = Cypress._.chain(response.body).map('id').take(3).value()
|
|
13
|
-
|
|
14
|
-
expect(ids).to.deep.eq([1, 2, 3])
|
|
15
|
-
})
|
|
16
|
-
})
|
|
17
|
-
|
|
18
|
-
it('Cypress.$ - call a jQuery method', () => {
|
|
19
|
-
// https://on.cypress.io/$
|
|
20
|
-
let $li = Cypress.$('.utility-jquery li:first')
|
|
21
|
-
|
|
22
|
-
cy.wrap($li)
|
|
23
|
-
.should('not.have.class', 'active')
|
|
24
|
-
.click()
|
|
25
|
-
.should('have.class', 'active')
|
|
26
|
-
})
|
|
27
|
-
|
|
28
|
-
it('Cypress.Blob - blob utilities and base64 string conversion', () => {
|
|
29
|
-
// https://on.cypress.io/blob
|
|
30
|
-
cy.get('.utility-blob').then(($div) => {
|
|
31
|
-
// https://github.com/nolanlawson/blob-util#imgSrcToDataURL
|
|
32
|
-
// get the dataUrl string for the javascript-logo
|
|
33
|
-
return Cypress.Blob.imgSrcToDataURL('https://example.cypress.io/assets/img/javascript-logo.png', undefined, 'anonymous')
|
|
34
|
-
.then((dataUrl) => {
|
|
35
|
-
// create an <img> element and set its src to the dataUrl
|
|
36
|
-
let img = Cypress.$('<img />', { src: dataUrl })
|
|
37
|
-
|
|
38
|
-
// need to explicitly return cy here since we are initially returning
|
|
39
|
-
// the Cypress.Blob.imgSrcToDataURL promise to our test
|
|
40
|
-
// append the image
|
|
41
|
-
$div.append(img)
|
|
42
|
-
|
|
43
|
-
cy.get('.utility-blob img').click()
|
|
44
|
-
.should('have.attr', 'src', dataUrl)
|
|
45
|
-
})
|
|
46
|
-
})
|
|
47
|
-
})
|
|
48
|
-
|
|
49
|
-
it('Cypress.minimatch - test out glob patterns against strings', () => {
|
|
50
|
-
// https://on.cypress.io/minimatch
|
|
51
|
-
let matching = Cypress.minimatch('/users/1/comments', '/users/*/comments', {
|
|
52
|
-
matchBase: true,
|
|
53
|
-
})
|
|
54
|
-
|
|
55
|
-
expect(matching, 'matching wildcard').to.be.true
|
|
56
|
-
|
|
57
|
-
matching = Cypress.minimatch('/users/1/comments/2', '/users/*/comments', {
|
|
58
|
-
matchBase: true,
|
|
59
|
-
})
|
|
60
|
-
|
|
61
|
-
expect(matching, 'comments').to.be.false
|
|
62
|
-
|
|
63
|
-
// ** matches against all downstream path segments
|
|
64
|
-
matching = Cypress.minimatch('/foo/bar/baz/123/quux?a=b&c=2', '/foo/**', {
|
|
65
|
-
matchBase: true,
|
|
66
|
-
})
|
|
67
|
-
|
|
68
|
-
expect(matching, 'comments').to.be.true
|
|
69
|
-
|
|
70
|
-
// whereas * matches only the next path segment
|
|
71
|
-
|
|
72
|
-
matching = Cypress.minimatch('/foo/bar/baz/123/quux?a=b&c=2', '/foo/*', {
|
|
73
|
-
matchBase: false,
|
|
74
|
-
})
|
|
75
|
-
|
|
76
|
-
expect(matching, 'comments').to.be.false
|
|
77
|
-
})
|
|
78
|
-
|
|
79
|
-
it('Cypress.Promise - instantiate a bluebird promise', () => {
|
|
80
|
-
// https://on.cypress.io/promise
|
|
81
|
-
let waited = false
|
|
82
|
-
|
|
83
|
-
/**
|
|
84
|
-
* @return Bluebird<string>
|
|
85
|
-
*/
|
|
86
|
-
function waitOneSecond () {
|
|
87
|
-
// return a promise that resolves after 1 second
|
|
88
|
-
// @ts-ignore TS2351 (new Cypress.Promise)
|
|
89
|
-
return new Cypress.Promise((resolve, reject) => {
|
|
90
|
-
setTimeout(() => {
|
|
91
|
-
// set waited to true
|
|
92
|
-
waited = true
|
|
93
|
-
|
|
94
|
-
// resolve with 'foo' string
|
|
95
|
-
resolve('foo')
|
|
96
|
-
}, 1000)
|
|
97
|
-
})
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
cy.then(() => {
|
|
101
|
-
// return a promise to cy.then() that
|
|
102
|
-
// is awaited until it resolves
|
|
103
|
-
// @ts-ignore TS7006
|
|
104
|
-
return waitOneSecond().then((str) => {
|
|
105
|
-
expect(str).to.eq('foo')
|
|
106
|
-
expect(waited).to.be.true
|
|
107
|
-
})
|
|
108
|
-
})
|
|
109
|
-
})
|
|
110
|
-
})
|
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
/// <reference types="cypress" />
|
|
2
|
-
|
|
3
|
-
context('Viewport', () => {
|
|
4
|
-
beforeEach(() => {
|
|
5
|
-
cy.visit('https://example.cypress.io/commands/viewport')
|
|
6
|
-
})
|
|
7
|
-
|
|
8
|
-
it('cy.viewport() - set the viewport size and dimension', () => {
|
|
9
|
-
// https://on.cypress.io/viewport
|
|
10
|
-
|
|
11
|
-
cy.get('#navbar').should('be.visible')
|
|
12
|
-
cy.viewport(320, 480)
|
|
13
|
-
|
|
14
|
-
// the navbar should have collapse since our screen is smaller
|
|
15
|
-
cy.get('#navbar').should('not.be.visible')
|
|
16
|
-
cy.get('.navbar-toggle').should('be.visible').click()
|
|
17
|
-
cy.get('.nav').find('a').should('be.visible')
|
|
18
|
-
|
|
19
|
-
// lets see what our app looks like on a super large screen
|
|
20
|
-
cy.viewport(2999, 2999)
|
|
21
|
-
|
|
22
|
-
// cy.viewport() accepts a set of preset sizes
|
|
23
|
-
// to easily set the screen to a device's width and height
|
|
24
|
-
|
|
25
|
-
// We added a cy.wait() between each viewport change so you can see
|
|
26
|
-
// the change otherwise it is a little too fast to see :)
|
|
27
|
-
|
|
28
|
-
cy.viewport('macbook-15')
|
|
29
|
-
cy.wait(200)
|
|
30
|
-
cy.viewport('macbook-13')
|
|
31
|
-
cy.wait(200)
|
|
32
|
-
cy.viewport('macbook-11')
|
|
33
|
-
cy.wait(200)
|
|
34
|
-
cy.viewport('ipad-2')
|
|
35
|
-
cy.wait(200)
|
|
36
|
-
cy.viewport('ipad-mini')
|
|
37
|
-
cy.wait(200)
|
|
38
|
-
cy.viewport('iphone-6+')
|
|
39
|
-
cy.wait(200)
|
|
40
|
-
cy.viewport('iphone-6')
|
|
41
|
-
cy.wait(200)
|
|
42
|
-
cy.viewport('iphone-5')
|
|
43
|
-
cy.wait(200)
|
|
44
|
-
cy.viewport('iphone-4')
|
|
45
|
-
cy.wait(200)
|
|
46
|
-
cy.viewport('iphone-3')
|
|
47
|
-
cy.wait(200)
|
|
48
|
-
|
|
49
|
-
// cy.viewport() accepts an orientation for all presets
|
|
50
|
-
// the default orientation is 'portrait'
|
|
51
|
-
cy.viewport('ipad-2', 'portrait')
|
|
52
|
-
cy.wait(200)
|
|
53
|
-
cy.viewport('iphone-4', 'landscape')
|
|
54
|
-
cy.wait(200)
|
|
55
|
-
|
|
56
|
-
// The viewport will be reset back to the default dimensions
|
|
57
|
-
// in between tests (the default can be set in cypress.json)
|
|
58
|
-
})
|
|
59
|
-
})
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
/// <reference types="cypress" />
|
|
2
|
-
|
|
3
|
-
context('Waiting', () => {
|
|
4
|
-
beforeEach(() => {
|
|
5
|
-
cy.visit('https://example.cypress.io/commands/waiting')
|
|
6
|
-
})
|
|
7
|
-
// BE CAREFUL of adding unnecessary wait times.
|
|
8
|
-
// https://on.cypress.io/best-practices#Unnecessary-Waiting
|
|
9
|
-
|
|
10
|
-
// https://on.cypress.io/wait
|
|
11
|
-
it('cy.wait() - wait for a specific amount of time', () => {
|
|
12
|
-
cy.get('.wait-input1').type('Wait 1000ms after typing')
|
|
13
|
-
cy.wait(1000)
|
|
14
|
-
cy.get('.wait-input2').type('Wait 1000ms after typing')
|
|
15
|
-
cy.wait(1000)
|
|
16
|
-
cy.get('.wait-input3').type('Wait 1000ms after typing')
|
|
17
|
-
cy.wait(1000)
|
|
18
|
-
})
|
|
19
|
-
|
|
20
|
-
it('cy.wait() - wait for a specific route', () => {
|
|
21
|
-
// Listen to GET to comments/1
|
|
22
|
-
cy.intercept('GET', '**/comments/*').as('getComment')
|
|
23
|
-
|
|
24
|
-
// we have code that gets a comment when
|
|
25
|
-
// the button is clicked in scripts.js
|
|
26
|
-
cy.get('.network-btn').click()
|
|
27
|
-
|
|
28
|
-
// wait for GET comments/1
|
|
29
|
-
cy.wait('@getComment').its('response.statusCode').should('be.oneOf', [200, 304])
|
|
30
|
-
})
|
|
31
|
-
})
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
/// <reference types="cypress" />
|
|
2
|
-
|
|
3
|
-
context('Window', () => {
|
|
4
|
-
beforeEach(() => {
|
|
5
|
-
cy.visit('https://example.cypress.io/commands/window')
|
|
6
|
-
})
|
|
7
|
-
|
|
8
|
-
it('cy.window() - get the global window object', () => {
|
|
9
|
-
// https://on.cypress.io/window
|
|
10
|
-
cy.window().should('have.property', 'top')
|
|
11
|
-
})
|
|
12
|
-
|
|
13
|
-
it('cy.document() - get the document object', () => {
|
|
14
|
-
// https://on.cypress.io/document
|
|
15
|
-
cy.document().should('have.property', 'charset').and('eq', 'UTF-8')
|
|
16
|
-
})
|
|
17
|
-
|
|
18
|
-
it('cy.title() - get the title', () => {
|
|
19
|
-
// https://on.cypress.io/title
|
|
20
|
-
cy.title().should('include', 'Kitchen Sink')
|
|
21
|
-
})
|
|
22
|
-
})
|
|
@@ -1,81 +0,0 @@
|
|
|
1
|
-
describe('Create booking', () => {
|
|
2
|
-
before(() => {
|
|
3
|
-
cy.visit('/calendar.html')
|
|
4
|
-
cy.get('div.col.cell.arrival').first()
|
|
5
|
-
.click()
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
cy.get('div.col.cell.departure').first()
|
|
9
|
-
.click()
|
|
10
|
-
|
|
11
|
-
cy.get('.calendar--picker > .button').click()
|
|
12
|
-
})
|
|
13
|
-
|
|
14
|
-
it('Create booking', () => {
|
|
15
|
-
cy.get(':nth-child(1) > :nth-child(3) > select').select('6');
|
|
16
|
-
cy.get(':nth-child(4) > select').select('3');
|
|
17
|
-
cy.get(':nth-child(1) > :nth-child(3) > select').select('6');
|
|
18
|
-
cy.get(':nth-child(4) > select').select('3');
|
|
19
|
-
|
|
20
|
-
expect(cy.get('.error-message.persons')).to.exist
|
|
21
|
-
|
|
22
|
-
cy.get(':nth-child(1) > :nth-child(3) > select').select('1');
|
|
23
|
-
|
|
24
|
-
cy.get('.error-message.persons').should('not.exist')
|
|
25
|
-
|
|
26
|
-
})
|
|
27
|
-
|
|
28
|
-
it('Create booking simple', () => {
|
|
29
|
-
cy.get(':nth-child(1) > :nth-child(3) > select').select('1');
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
cy.get('.error-message.persons').should('not.exist')
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
cy.get('input[name=first_name]').type('Test')
|
|
36
|
-
cy.get('input[name=last_name]').type('Test')
|
|
37
|
-
cy.get('input[name=mobile]').type('0612345678')
|
|
38
|
-
cy.get('input[name=address]').type('Straat')
|
|
39
|
-
cy.get('input[name=house_number]').type('1')
|
|
40
|
-
cy.get('input[name=email]').type('test@bukazu.com')
|
|
41
|
-
|
|
42
|
-
})
|
|
43
|
-
|
|
44
|
-
it('Validate cancel insurance', () => {
|
|
45
|
-
cy.get('select[name=cancel_insurance]').select('0');
|
|
46
|
-
|
|
47
|
-
cy.get('.insurances > input[type=date]').should('not.exist')
|
|
48
|
-
|
|
49
|
-
cy.get('select[name=cancel_insurance]').select('1');
|
|
50
|
-
|
|
51
|
-
expect(cy.get('#insurances > input[type=date]')).to.exist
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
})
|
|
55
|
-
|
|
56
|
-
it('Create booking on invalid booking form', () => {
|
|
57
|
-
cy.visit('/invalid-calendar.html')
|
|
58
|
-
cy.get('div.col.cell.arrival').first()
|
|
59
|
-
.click()
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
cy.get('div.col.cell.departure').first()
|
|
63
|
-
.click()
|
|
64
|
-
|
|
65
|
-
cy.get('.calendar--picker > .button').click()
|
|
66
|
-
|
|
67
|
-
cy.get(':nth-child(1) > :nth-child(3) > select').select('6');
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
cy.get(':nth-child(3) > .form-row > select').select('0');
|
|
71
|
-
cy.get(':nth-child(5) > :nth-child(2) > input').clear();
|
|
72
|
-
cy.get(':nth-child(5) > :nth-child(2) > input').type('Test');
|
|
73
|
-
cy.get(':nth-child(3) > input').clear();
|
|
74
|
-
cy.get(':nth-child(3) > input').type('test@example.com');
|
|
75
|
-
|
|
76
|
-
cy.get('.button').click()
|
|
77
|
-
|
|
78
|
-
expect(cy.get('.bukazu-modal .bukazu-error-message')).to.exist
|
|
79
|
-
})
|
|
80
|
-
|
|
81
|
-
})
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
describe('Show calendar', () => {
|
|
2
|
-
before(() => {
|
|
3
|
-
cy.visit('/calendar.html')
|
|
4
|
-
})
|
|
5
|
-
|
|
6
|
-
it('Click arrival date', () => {
|
|
7
|
-
cy.get('.calendar--picker > .button').should('be.disabled')
|
|
8
|
-
|
|
9
|
-
cy.get('div.col.cell.arrival').first()
|
|
10
|
-
.click()
|
|
11
|
-
.should('have.class', 'selected')
|
|
12
|
-
|
|
13
|
-
cy.get('.calendar--picker > .button').should('be.disabled')
|
|
14
|
-
|
|
15
|
-
cy.get('div.col.cell.departure').first()
|
|
16
|
-
.click()
|
|
17
|
-
.should('have.class', 'selected')
|
|
18
|
-
|
|
19
|
-
cy.get('.calendar--picker > .button').should('not.be.disabled')
|
|
20
|
-
})
|
|
21
|
-
})
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
describe('Filtering objects', () => {
|
|
2
|
-
before(() => {
|
|
3
|
-
cy.visit('/')
|
|
4
|
-
})
|
|
5
|
-
|
|
6
|
-
it('Filter countries', () => {
|
|
7
|
-
cy.get('#countries > ul.radioList > li.bu-open').should('have.length', 6)
|
|
8
|
-
cy.get(':nth-child(2) > .radioList > :nth-child(1) input')
|
|
9
|
-
.click()
|
|
10
|
-
cy.get('#regions > ul.radioList > li.bu-open').should('have.length', 3)
|
|
11
|
-
cy.get('#countries > ul.radioList > li.bu-open').should('have.length', 6)
|
|
12
|
-
|
|
13
|
-
cy.get('.filters-reload')
|
|
14
|
-
.click()
|
|
15
|
-
})
|
|
16
|
-
|
|
17
|
-
it('Go next page in paginator', () => {
|
|
18
|
-
cy.get(':nth-child(1) > .bu-pagination > :nth-child(4)')
|
|
19
|
-
.click()
|
|
20
|
-
cy.get(':nth-child(1) > .bu-pagination > :nth-child(6)')
|
|
21
|
-
.click()
|
|
22
|
-
cy.get(':nth-child(1) > .bu-pagination > :nth-child(1)')
|
|
23
|
-
.click()
|
|
24
|
-
})
|
|
25
|
-
})
|
package/cypress/plugins/index.js
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
// const injectDevServer = require("@cypress/react/plugins/react-scripts")
|
|
2
|
-
|
|
3
|
-
module.exports = (on, config) => {
|
|
4
|
-
if (config.testingType === 'component') {
|
|
5
|
-
const { startDevServer } = require('@cypress/webpack-dev-server')
|
|
6
|
-
|
|
7
|
-
// Your project's Webpack configuration
|
|
8
|
-
const webpackConfig = require('../../webpack.config.dev.js')
|
|
9
|
-
|
|
10
|
-
on('dev-server:start', (options) =>
|
|
11
|
-
startDevServer({ options, webpackConfig })
|
|
12
|
-
)
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
return config
|
|
16
|
-
}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
// ***********************************************
|
|
2
|
-
// This example commands.js shows you how to
|
|
3
|
-
// create various custom commands and overwrite
|
|
4
|
-
// existing commands.
|
|
5
|
-
//
|
|
6
|
-
// For more comprehensive examples of custom
|
|
7
|
-
// commands please read more here:
|
|
8
|
-
// https://on.cypress.io/custom-commands
|
|
9
|
-
// ***********************************************
|
|
10
|
-
//
|
|
11
|
-
//
|
|
12
|
-
// -- This is a parent command --
|
|
13
|
-
// Cypress.Commands.add('login', (email, password) => { ... })
|
|
14
|
-
//
|
|
15
|
-
//
|
|
16
|
-
// -- This is a child command --
|
|
17
|
-
// Cypress.Commands.add('drag', { prevSubject: 'element'}, (subject, options) => { ... })
|
|
18
|
-
//
|
|
19
|
-
//
|
|
20
|
-
// -- This is a dual command --
|
|
21
|
-
// Cypress.Commands.add('dismiss', { prevSubject: 'optional'}, (subject, options) => { ... })
|
|
22
|
-
//
|
|
23
|
-
//
|
|
24
|
-
// -- This will overwrite an existing command --
|
|
25
|
-
// Cypress.Commands.overwrite('visit', (originalFn, url, options) => { ... })
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
/// <reference types="cypress" />
|
|
2
|
-
// ***********************************************
|
|
3
|
-
// This example commands.ts shows you how to
|
|
4
|
-
// create various custom commands and overwrite
|
|
5
|
-
// existing commands.
|
|
6
|
-
//
|
|
7
|
-
// For more comprehensive examples of custom
|
|
8
|
-
// commands please read more here:
|
|
9
|
-
// https://on.cypress.io/custom-commands
|
|
10
|
-
// ***********************************************
|
|
11
|
-
//
|
|
12
|
-
//
|
|
13
|
-
// -- This is a parent command --
|
|
14
|
-
// Cypress.Commands.add('login', (email, password) => { ... })
|
|
15
|
-
//
|
|
16
|
-
//
|
|
17
|
-
// -- This is a child command --
|
|
18
|
-
// Cypress.Commands.add('drag', { prevSubject: 'element'}, (subject, options) => { ... })
|
|
19
|
-
//
|
|
20
|
-
//
|
|
21
|
-
// -- This is a dual command --
|
|
22
|
-
// Cypress.Commands.add('dismiss', { prevSubject: 'optional'}, (subject, options) => { ... })
|
|
23
|
-
//
|
|
24
|
-
//
|
|
25
|
-
// -- This will overwrite an existing command --
|
|
26
|
-
// Cypress.Commands.overwrite('visit', (originalFn, url, options) => { ... })
|
|
27
|
-
//
|
|
28
|
-
// declare global {
|
|
29
|
-
// namespace Cypress {
|
|
30
|
-
// interface Chainable {
|
|
31
|
-
// login(email: string, password: string): Chainable<void>
|
|
32
|
-
// drag(subject: string, options?: Partial<TypeOptions>): Chainable<Element>
|
|
33
|
-
// dismiss(subject: string, options?: Partial<TypeOptions>): Chainable<Element>
|
|
34
|
-
// visit(originalFn: CommandOriginalFn, url: string, options: Partial<VisitOptions>): Chainable<Element>
|
|
35
|
-
// }
|
|
36
|
-
// }
|
|
37
|
-
// }
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
<!DOCTYPE html>
|
|
2
|
-
<html>
|
|
3
|
-
<head>
|
|
4
|
-
<meta charset="utf-8">
|
|
5
|
-
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
|
6
|
-
<meta name="viewport" content="width=device-width,initial-scale=1.0">
|
|
7
|
-
<title>Components App</title>
|
|
8
|
-
</head>
|
|
9
|
-
<body>
|
|
10
|
-
<div data-cy-root></div>
|
|
11
|
-
</body>
|
|
12
|
-
</html>
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
// ***********************************************************
|
|
2
|
-
// This example support/component.ts is processed and
|
|
3
|
-
// loaded automatically before your test files.
|
|
4
|
-
//
|
|
5
|
-
// This is a great place to put global configuration and
|
|
6
|
-
// behavior that modifies Cypress.
|
|
7
|
-
//
|
|
8
|
-
// You can change the location of this file or turn off
|
|
9
|
-
// automatically serving support files with the
|
|
10
|
-
// 'supportFile' configuration option.
|
|
11
|
-
//
|
|
12
|
-
// You can read more here:
|
|
13
|
-
// https://on.cypress.io/configuration
|
|
14
|
-
// ***********************************************************
|
|
15
|
-
|
|
16
|
-
// Import commands.js using ES2015 syntax:
|
|
17
|
-
import './commands'
|
|
18
|
-
|
|
19
|
-
// Alternatively you can use CommonJS syntax:
|
|
20
|
-
// require('./commands')
|
|
21
|
-
|
|
22
|
-
import { mount } from 'cypress/react'
|
|
23
|
-
|
|
24
|
-
// Augment the Cypress namespace to include type definitions for
|
|
25
|
-
// your custom command.
|
|
26
|
-
// Alternatively, can be defined in cypress/support/component.d.ts
|
|
27
|
-
// with a <reference path="./component" /> at the top of your spec.
|
|
28
|
-
declare global {
|
|
29
|
-
namespace Cypress {
|
|
30
|
-
interface Chainable {
|
|
31
|
-
mount: typeof mount
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
Cypress.Commands.add('mount', mount)
|
|
37
|
-
|
|
38
|
-
// Example use:
|
|
39
|
-
// cy.mount(<MyComponent />)
|
package/cypress/support/e2e.js
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
// ***********************************************************
|
|
2
|
-
// This example support/index.js is processed and
|
|
3
|
-
// loaded automatically before your test files.
|
|
4
|
-
//
|
|
5
|
-
// This is a great place to put global configuration and
|
|
6
|
-
// behavior that modifies Cypress.
|
|
7
|
-
//
|
|
8
|
-
// You can change the location of this file or turn off
|
|
9
|
-
// automatically serving support files with the
|
|
10
|
-
// 'supportFile' configuration option.
|
|
11
|
-
//
|
|
12
|
-
// You can read more here:
|
|
13
|
-
// https://on.cypress.io/configuration
|
|
14
|
-
// ***********************************************************
|
|
15
|
-
|
|
16
|
-
// Import commands.js using ES2015 syntax:
|
|
17
|
-
import './commands'
|
|
18
|
-
|
|
19
|
-
// Alternatively you can use CommonJS syntax:
|
|
20
|
-
// require('./commands')
|
package/cypress.config.ts
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { defineConfig } from "cypress";
|
|
2
|
-
|
|
3
|
-
export default defineConfig({
|
|
4
|
-
experimentalStudio: true,
|
|
5
|
-
projectId: "rpsk7v",
|
|
6
|
-
|
|
7
|
-
e2e: {
|
|
8
|
-
// We've imported your old cypress plugins here.
|
|
9
|
-
// You may want to clean this up later by importing these.
|
|
10
|
-
setupNodeEvents(on, config) {
|
|
11
|
-
return require("./cypress/plugins/index.js")(on, config);
|
|
12
|
-
},
|
|
13
|
-
specPattern: "cypress/e2e/**/*.{js,jsx,ts,tsx}",
|
|
14
|
-
},
|
|
15
|
-
});
|
package/dev.tsx
DELETED
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import ReactDOM from 'react-dom';
|
|
3
|
-
import Portal from './src/index';
|
|
4
|
-
|
|
5
|
-
runTheApp();
|
|
6
|
-
function runTheApp() {
|
|
7
|
-
const elem = document.getElementById('bukazu-app');
|
|
8
|
-
const elements = document.getElementsByClassName('bukazu-app');
|
|
9
|
-
if (elements.length > 0) {
|
|
10
|
-
for (let element of elements) {
|
|
11
|
-
runApp(element);
|
|
12
|
-
}
|
|
13
|
-
} else if (elem) {
|
|
14
|
-
runApp(elem);
|
|
15
|
-
}
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
function runApp(element) {
|
|
19
|
-
const portalCode = element.getAttribute('portal-code');
|
|
20
|
-
const objectCode = element.getAttribute('object-code');
|
|
21
|
-
const pageType = element.getAttribute('page');
|
|
22
|
-
const locale = element.getAttribute('language');
|
|
23
|
-
let filters = element.getAttribute('filters');
|
|
24
|
-
|
|
25
|
-
if (filters) {
|
|
26
|
-
filters = JSON.parse(filters);
|
|
27
|
-
} else {
|
|
28
|
-
filters = {};
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
ReactDOM.render(
|
|
32
|
-
<Portal
|
|
33
|
-
portalCode={portalCode}
|
|
34
|
-
objectCode={objectCode}
|
|
35
|
-
pageType={pageType}
|
|
36
|
-
locale={locale}
|
|
37
|
-
filters={filters}
|
|
38
|
-
api_url="https://api.bukazu.com/graphql"
|
|
39
|
-
/>,
|
|
40
|
-
element
|
|
41
|
-
);
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
// registerServiceWorker()
|
package/index.html
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
<!DOCTYPE html>
|
|
2
|
-
<html lang="en">
|
|
3
|
-
<head>
|
|
4
|
-
<meta charset="UTF-8">
|
|
5
|
-
<title>Bukazu Portal</title>
|
|
6
|
-
<!-- <link href="./dist/style.css" rel="stylesheet"> -->
|
|
7
|
-
</head>
|
|
8
|
-
<body>
|
|
9
|
-
<h1>Bukazu Test Portal</h1>
|
|
10
|
-
|
|
11
|
-
<div class="bukazu-app" id="bukazu-app" portal-code="7f9b7a84" language='nl'></div>
|
|
12
|
-
|
|
13
|
-
<script src="./dev.tsx" type="module"></script>
|
|
14
|
-
</body>
|
|
15
|
-
</html>
|
package/invalid-calendar.html
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
<!DOCTYPE html>
|
|
2
|
-
<html lang="en">
|
|
3
|
-
<head>
|
|
4
|
-
<meta charset="UTF-8">
|
|
5
|
-
<title>Bukazu Portal</title>
|
|
6
|
-
<link href="./index.css" rel="stylesheet">
|
|
7
|
-
</head>
|
|
8
|
-
<body>
|
|
9
|
-
<h1>Bukazu Test Calendar</h1>
|
|
10
|
-
|
|
11
|
-
<!-- <div class="bukazu-app" id="bukazu-app" portal-code="3cbe4f75" object-code="AT0047" language='nl'></div> -->
|
|
12
|
-
<div class="bukazu-app" id="bukazu-app" portal-code="2b063dcd" object-code="AT0047" language='nl'></div>
|
|
13
|
-
|
|
14
|
-
<script src="./index.js"></script>
|
|
15
|
-
</body>
|
|
16
|
-
</html>
|