Software: Apache/2.4.41 (Ubuntu). PHP/8.0.30 uname -a: Linux apirnd 5.4.0-204-generic #224-Ubuntu SMP Thu Dec 5 13:38:28 UTC 2024 x86_64 uid=33(www-data) gid=33(www-data) groups=33(www-data) Safe-mode: OFF (not secure) /var/www/html/queuepro/node_modules/svg.js/spec/spec/ drwxrwxr-x | |
| Viewing file: Select action/file-type: describe('Adopter', function() {
var path, polyline, polygon, linearGradient, radialGradient
beforeEach(function() {
path = SVG.get('lineAB')
polyline = SVG.get('inlineSVG').select('polyline').first()
polygon = SVG.get('inlineSVG').select('polygon').first()
linearGradient = SVG.get('inlineSVG').select('linearGradient').first()
radialGradient = SVG.get('inlineSVG').select('radialGradient').first()
})
describe('with SVG.Doc instance', function() {
it('adopts the main svg document when parent() method is called on first level children', function() {
expect(path.parent() instanceof SVG.Doc).toBeTruthy()
})
it('defines a xmlns attribute', function() {
expect(path.parent().node.getAttribute('xmlns')).toBe(SVG.ns)
})
it('defines a version attribute', function() {
expect(path.parent().node.getAttribute('version')).toBe('1.1')
})
it('defines a xmlns:xlink attribute', function() {
expect(path.parent().node.getAttribute('xmlns:xlink')).toBe(SVG.xlink)
})
it('initializes a defs node', function() {
expect(path.parent()._defs).toBe(path.parent().defs())
})
})
describe('with SVG.Path instance', function() {
it('adopts an exiting path element', function() {
expect(path instanceof SVG.Path).toBeTruthy()
})
it('modifies an adopted element', function() {
path.fill('#f06')
expect(path.node.getAttribute('fill')).toBe('#ff0066')
})
it('parses d attribute to SVG.PathArray', function() {
expect(path.array() instanceof SVG.PathArray).toBeTruthy()
})
})
describe('with SVG.Polyline instance', function() {
it('parses points attribute to SVG.PointArray', function() {
expect(polyline.array() instanceof SVG.PointArray).toBeTruthy()
})
})
describe('with SVG.Polygon instance', function() {
it('parses points attribute to SVG.PointArray', function() {
expect(polygon.array() instanceof SVG.PointArray).toBeTruthy()
})
})
describe('with linear SVG.Gradient instance', function() {
it('is instance of SVG.Gradient', function() {
expect(linearGradient instanceof SVG.Gradient).toBeTruthy()
})
it('has type of linear', function() {
expect(linearGradient.type).toBe('linearGradient') // actually it should be 'linear'. see #606
})
})
describe('with radial SVG.Gradient instance', function() {
it('is instance of SVG.Gradient', function() {
expect(radialGradient instanceof SVG.Gradient).toBeTruthy()
})
it('has type of radial', function() {
expect(radialGradient.type).toBe('radialGradient') // actually it should be 'radial'. see #606
})
})
describe('with node that has no matching svg.js class', function() {
it('wraps the node in the base SVG.Element class', function() {
var desc = SVG.get('inlineSVG').select('desc').first()
expect(desc instanceof SVG.Element).toBeTruthy()
})
})
}) |
:: Command execute :: | |
--[ c99shell v. 2.5 [PHP 8 Update] [24.05.2025] | Generation time: 0.0045 ]-- |