0.1.5 • Published 2 years ago

education-plugin-web v0.1.5

Weekly downloads
-
License
UNLICENSED
Repository
-
Last release
2 years ago

Education module for web app - Beta

Installation

Use the npm package manager to install

npm i education-plugin-web

Usage

Exapmle:

#Svelte
<script>
import { StartEducation } from "education-plugin-web";

StartEducation(welcomePage, scenarioCollection, hintCollection, evaluationPage);
</script>

#Example only hint function: 
StartEducation({}, {}, hintCollection, {});

Hint example:

const hintCollection = [
    {
        selector: {
            type: "tagName",
            value: "h1"
        },
        text: "Hint text..."
    },
    {
        selector: {
            type: "id",
            value: "InputText1"
        },
        text: "Hint text..."
    },
    {
        selector: {
            type: "xpath",
            value: "//label"
        },
        text: "Hint text..."
    }
];

Scenario exapmle:

const scenario = {
    name: 'Scenaro 001',
    pages: [
        {
            page: {
                name: 'page1',
                selector: {
                    type: 'id',
                    value: 'sectionP1'
                },
                parts:[
                    {
                        name: 'page1 part1',
                        tasks: [
                            {
                                description: 'Enter the *some in the *Probe text 1 field',
                                target: {
                                    id: 'p1_task_1',
                                    selector: {
                                        type: 'id',
                                        value: 'probeInput'
                                    },
                                    expectedValue: {
                                        type: 'text',
                                        value: 'some'
                                    }
                                }
                            },
                            {
                                description: 'Check the *Checkbox example',
                                target: {
                                    id: 'p1_task_4',
                                    selector: {
                                        type: 'id',
                                        value: 'checkBoxEample1'
                                    },
                                    expectedValue: {
                                        type: 'checked',
                                        value: 'true'
                                    }
                                }
                            },
                            {
                                description: 'select the *Education 2',
                                target: {
                                    id: 'p1_task_5',
                                    selector: {
                                        type: 'name',
                                        value: 'scenario'
                                    },
                                    expectedValue: {
                                        type: 'text',
                                        value: 'edu002'
                                    }
                                }
                            }
                        ]
                    },
                    {
                        name: 'page1 part2',
                        tasks: [
                            {
                                description: 'Enter the *yes in the *Probe text 3 field', //hide inputtext
                                target: {
                                    id: 'p1_task_3',
                                    selector: {
                                        type: 'id',
                                        value: 'probeInput3'
                                    },
                                    expectedValue: {
                                        type: 'text',
                                        value: 'some'
                                    }
                                }
                            }
                        ]
                    }
                ]
            }
        }
    ]
};
0.1.5

2 years ago

0.1.4

2 years ago

0.1.3

2 years ago

0.1.2

2 years ago

0.1.1

2 years ago

0.1.0

2 years ago

0.0.5

2 years ago

0.0.4

2 years ago

0.0.3

2 years ago

0.0.2

2 years ago

0.0.1

2 years ago