mirror of
https://bitbucket.org/wisemapping/wisemapping-frontend.git
synced 2024-11-26 08:04:56 +01:00
Merged in bugfix/textarea-not-showing (pull request #16)
Fix textarea not showing Approved-by: Paulo Veiga
This commit is contained in:
commit
af83ff5351
@ -3,7 +3,10 @@ import { addMatchImageSnapshotCommand } from 'cypress-image-snapshot/command';
|
|||||||
// make matchImageSnapshot() call the real implementation only if CYPRESS_imageSnaphots is set
|
// make matchImageSnapshot() call the real implementation only if CYPRESS_imageSnaphots is set
|
||||||
// otherwise it calls a noop
|
// otherwise it calls a noop
|
||||||
if (Cypress.env('imageSnaphots')) {
|
if (Cypress.env('imageSnaphots')) {
|
||||||
addMatchImageSnapshotCommand();
|
addMatchImageSnapshotCommand({
|
||||||
|
failureThreshold: 0.001,
|
||||||
|
failureThresholdType: 'percent',
|
||||||
|
});
|
||||||
} else {
|
} else {
|
||||||
Cypress.Commands.add(
|
Cypress.Commands.add(
|
||||||
'matchImageSnapshot',
|
'matchImageSnapshot',
|
||||||
|
@ -3,7 +3,10 @@ import { addMatchImageSnapshotCommand } from 'cypress-image-snapshot/command';
|
|||||||
// make matchImageSnapshot() call the real implementation only if CYPRESS_imageSnaphots is set
|
// make matchImageSnapshot() call the real implementation only if CYPRESS_imageSnaphots is set
|
||||||
// otherwise it calls a noop
|
// otherwise it calls a noop
|
||||||
if (Cypress.env('imageSnaphots')) {
|
if (Cypress.env('imageSnaphots')) {
|
||||||
addMatchImageSnapshotCommand();
|
addMatchImageSnapshotCommand({
|
||||||
|
failureThreshold: 0.001,
|
||||||
|
failureThresholdType: 'percent',
|
||||||
|
});
|
||||||
} else {
|
} else {
|
||||||
Cypress.Commands.add(
|
Cypress.Commands.add(
|
||||||
'matchImageSnapshot',
|
'matchImageSnapshot',
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
* See the License for the specific language governing permissions and
|
* See the License for the specific language governing permissions and
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
import { $defined } from '@wisemapping/core-js';
|
import { $assert, $defined } from '@wisemapping/core-js';
|
||||||
|
|
||||||
class Font {
|
class Font {
|
||||||
constructor() {
|
constructor() {
|
||||||
@ -26,7 +26,7 @@ class Font {
|
|||||||
|
|
||||||
init(args) {
|
init(args) {
|
||||||
if ($defined(args.size)) {
|
if ($defined(args.size)) {
|
||||||
this._size = parseInt(args.size, 10);
|
this._size = Number.parseInt(args.size, 10);
|
||||||
}
|
}
|
||||||
if ($defined(args.style)) {
|
if ($defined(args.style)) {
|
||||||
this._style = args.style;
|
this._style = args.style;
|
||||||
@ -68,7 +68,9 @@ class Font {
|
|||||||
return this._weight;
|
return this._weight;
|
||||||
}
|
}
|
||||||
|
|
||||||
setSize(size) {
|
setSize(value) {
|
||||||
|
const size = Number.parseInt(value, 10);
|
||||||
|
$assert(!Number.isFinite(size), 'size must be a valid integer');
|
||||||
this._size = size;
|
this._size = size;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,12 +1,13 @@
|
|||||||
import { addMatchImageSnapshotCommand } from 'cypress-image-snapshot/command';
|
import { addMatchImageSnapshotCommand } from 'cypress-image-snapshot/command';
|
||||||
import '@testing-library/cypress/add-commands';
|
import '@testing-library/cypress/add-commands';
|
||||||
|
|
||||||
addMatchImageSnapshotCommand();
|
|
||||||
|
|
||||||
// make matchImageSnapshot() call the real implementation only if CYPRESS_imageSnaphots is set
|
// make matchImageSnapshot() call the real implementation only if CYPRESS_imageSnaphots is set
|
||||||
// otherwise it calls a noop
|
// otherwise it calls a noop
|
||||||
if (Cypress.env('imageSnaphots')) {
|
if (Cypress.env('imageSnaphots')) {
|
||||||
addMatchImageSnapshotCommand();
|
addMatchImageSnapshotCommand({
|
||||||
|
failureThreshold: 0.001,
|
||||||
|
failureThresholdType: 'percent',
|
||||||
|
});
|
||||||
} else {
|
} else {
|
||||||
Cypress.Commands.add(
|
Cypress.Commands.add(
|
||||||
'matchImageSnapshot',
|
'matchImageSnapshot',
|
||||||
|
Loading…
Reference in New Issue
Block a user