DanielBullimore / OOmutiny

OO Javascript frontend
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

O.1 Point test#1 #39

Closed DanielBullimore closed 4 years ago

DanielBullimore commented 4 years ago

Every time a feature is tested the results of that test must be recorded here in a test results register. Dont forget to place post refactor notes as comments on this issue.

Details

Feature ID: 0.1 Feature Name: Point Feature Type: object class Test Number: 1 Testing Phase: 1 Date Tested: 11/01/20

Testing Method from Testing Plan Passed?
2.3.2. An instance of OoPoint has been decleared an is type Object. fail

Test Notes and Error Details:

Instance failed to initialise as decendent of OO, despite overwriting strType after calling this.parent(), Initialise() still has strType = 'oomutiny'. as a result rayOO['OoPoint'] is undefined: [http://localhost:7700/oomutiny/OO.class.js:224] Uncaught TypeError: Cannot read property 'length' of undefined

Post refactor notes:

DanielBullimore commented 4 years ago

This is a much bigger issue than it seems. I think becuase the strType property of the super class is private, its decendants can't over right it. Even though logically if decendant inherits strType it should be private var of decendant.

DanielBullimore commented 4 years ago

So I have tried using public strType, and it worked as expected.
I'm not going to implement public strType just yet. It makes no sense to be able to change an objects type after it has been decared. Rather im going to try implement an optional parameterized decaration of OO([strType]) so if string type is passed at declaration time the instances strType will be set. otherwise strType will be 'oomutiny'. hence this.Parent = OO; this.Parent('OoPoint') ...

DanielBullimore commented 4 years ago

parameterized OO parent works with private strType. How ever I then ran the test files for O.O.Master class which resulted in a plathoria of errors.

DanielBullimore commented 4 years ago

all the errors in testing O.O.Master were cuased by comparing strDecendantType === "undefined" where it should have been typeof(strDecendant) === "undefined"