Skip to content

Commit

Permalink
fix(styles): added missing button style css (#859)
Browse files Browse the repository at this point in the history
* fix(styles): added missing button style css

* test(styles): corrected tests
  • Loading branch information
sr258 authored Oct 24, 2020
1 parent 1e0ad17 commit 65bac65
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 10 deletions.
6 changes: 5 additions & 1 deletion src/playerAssetList.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@
]
},
"styles": {
"core": ["styles/h5p.css", "styles/h5p-confirmation-dialog.css"]
"core": [
"styles/h5p.css",
"styles/h5p-confirmation-dialog.css",
"styles/h5p-core-button.css"
]
}
}
11 changes: 6 additions & 5 deletions test/H5PPlayer.loadDependencies.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ describe('Loading dependencies', () => {
.setRenderer((model) => model)
.render(contentId, contentObject, h5pObject as any)
.then((model) => {
expect((model as any).styles.slice(2)).toEqual([
expect((model as any).styles.slice(3)).toEqual([
'/h5p/libraries/Foo-4.2/foo1.css',
'/h5p/libraries/Foo-4.2/foo2.css',
'/h5p/libraries/Bar-2.1/bar.css'
Expand Down Expand Up @@ -126,7 +126,7 @@ describe('Loading dependencies', () => {
.setRenderer((model) => model)
.render(contentId, contentObject, h5pObject as any)
.then((model) => {
expect((model as any).styles.slice(2)).toEqual([
expect((model as any).styles.slice(3)).toEqual([
'/h5p/libraries/Foo-4.2/foo1.css',
'/h5p/libraries/Foo-4.2/foo2.css',
'/h5p/libraries/Bar-2.1/bar.css'
Expand Down Expand Up @@ -206,7 +206,7 @@ describe('Loading dependencies', () => {
.setRenderer((model) => model)
.render(contentId, contentObject, h5pObject as any)
.then((model) => {
expect((model as any).styles.slice(2)).toEqual([
expect((model as any).styles.slice(3)).toEqual([
'/h5p/libraries/Baz-3.3/baz.css',
'/h5p/libraries/Bar-2.1/bar.css',
'/h5p/libraries/Foo-4.2/foo.css'
Expand Down Expand Up @@ -279,7 +279,7 @@ describe('Loading dependencies', () => {
.setRenderer((model) => model)
.render(contentId, contentObject, h5pObject as any)
.then((model) => {
expect((model as any).styles.slice(2)).toEqual([
expect((model as any).styles.slice(3)).toEqual([
'/h5p/libraries/Baz-3.3/baz.css',
'/h5p/libraries/Bar-2.1/bar.css',
'/h5p/libraries/Foo-4.2/foo.css'
Expand Down Expand Up @@ -356,7 +356,7 @@ describe('Loading dependencies', () => {
.setRenderer((model) => model)
.render(contentId, contentObject, h5pObject as any)
.then((model) => {
expect((model as any).styles.slice(2)).toEqual([
expect((model as any).styles.slice(3)).toEqual([
'/h5p/libraries/Baz-3.3/baz.css',
'/h5p/libraries/Bar-2.1/bar.css',
'/h5p/libraries/Foo-4.2/foo.css'
Expand Down Expand Up @@ -460,6 +460,7 @@ describe('Loading dependencies', () => {
expect(model.styles).toEqual([
'/baseUrl/coreUrl/styles/h5p.css',
'/baseUrl/coreUrl/styles/h5p-confirmation-dialog.css',
'/baseUrl/coreUrl/styles/h5p-core-button.css',
'/baseUrl/libraryUrl/Baz-3.3/baz.css',
'/baseUrl/libraryUrl/Bar-2.1/bar.css',
'/baseUrl/libraryUrl/Foo-4.2/foo.css'
Expand Down
14 changes: 10 additions & 4 deletions test/H5PPlayer.renderHtmlPage.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ describe('Rendering the HTML page', () => {
<link rel="stylesheet" href="/h5p/core/styles/h5p.css"/>
<link rel="stylesheet" href="/h5p/core/styles/h5p-confirmation-dialog.css"/>
<link rel="stylesheet" href="/h5p/core/styles/h5p-core-button.css"/>
<script src="/h5p/core/js/jquery.js"></script>
<script src="/h5p/core/js/h5p.js"></script>
<script src="/h5p/core/js/h5p-event-dispatcher.js"></script>
Expand Down Expand Up @@ -63,7 +64,8 @@ describe('Rendering the HTML page', () => {
],
"styles":[
"/h5p/core/styles/h5p.css",
"/h5p/core/styles/h5p-confirmation-dialog.css"
"/h5p/core/styles/h5p-confirmation-dialog.css",
"/h5p/core/styles/h5p-core-button.css"
]
}
},
Expand All @@ -81,7 +83,8 @@ describe('Rendering the HTML page', () => {
],
"styles":[
"/h5p/core/styles/h5p.css",
"/h5p/core/styles/h5p-confirmation-dialog.css"
"/h5p/core/styles/h5p-confirmation-dialog.css",
"/h5p/core/styles/h5p-core-button.css"
]
},
"l10n": {
Expand Down Expand Up @@ -275,6 +278,7 @@ describe('Rendering the HTML page', () => {
<link rel="stylesheet" href="/h5p/core/styles/h5p.css"/>
<link rel="stylesheet" href="/h5p/core/styles/h5p-confirmation-dialog.css"/>
<link rel="stylesheet" href="/h5p/core/styles/h5p-core-button.css"/>
<script src="/h5p/core/js/jquery.js"></script>
<script src="/h5p/core/js/h5p.js"></script>
<script src="/h5p/core/js/h5p-event-dispatcher.js"></script>
Expand Down Expand Up @@ -319,7 +323,8 @@ describe('Rendering the HTML page', () => {
],
"styles":[
"/h5p/core/styles/h5p.css",
"/h5p/core/styles/h5p-confirmation-dialog.css"
"/h5p/core/styles/h5p-confirmation-dialog.css",
"/h5p/core/styles/h5p-core-button.css"
]
}
},
Expand All @@ -338,7 +343,8 @@ describe('Rendering the HTML page', () => {
],
"styles":[
"/h5p/core/styles/h5p.css",
"/h5p/core/styles/h5p-confirmation-dialog.css"
"/h5p/core/styles/h5p-confirmation-dialog.css",
"/h5p/core/styles/h5p-core-button.css"
]
},
"l10n": {
Expand Down

0 comments on commit 65bac65

Please sign in to comment.