Skip to content

gf.createModel

gf.createModel(name: string, model: Object): Promise<void>

Section titled “gf.createModel(name: string, model: Object): Promise<void>”

Creates a new data bind model with the given name and data.

  • name: The name of the model to be created.
  • model: The data structure representing the model.
  • Returns a promise that resolves once the model is successfully created.
describe('Test script', function () {
const Model = { value: 'test', arr: [{ value: 1, class: 'one' }, { value: 2, class: 'two' }, { value: 3, class: 'three' }] };
this.beforeAll('Should navigate to the test page', async () => {
await gf.navigate('../../../frontend-tools/e2e/examples/data-binding.html');
await gf.createModel('Model', Model);
});
it('Test 1', async () => {
...
});
});