|
| 1 | +import {test} from 'autotests'; |
| 2 | +import {expect} from 'e2ed'; |
| 3 | +import { |
| 4 | + type Attributes, |
| 5 | + createSimpleLocator, |
| 6 | + createTestLocator, |
| 7 | + getCssSelectorFromAttributesChain, |
| 8 | +} from 'e2ed/createLocator'; |
| 9 | +import { |
| 10 | + getModulesGraph, |
| 11 | + type Options, |
| 12 | + resolveImports, |
| 13 | + resolveReexports, |
| 14 | +} from 'e2ed/getModulesGraph'; |
| 15 | +import {type Feature, parseGherkin, ParseGherkinError} from 'e2ed/parseGherkin'; |
| 16 | + |
| 17 | +test('External libraries are reexported correctly', {meta: {testId: '35'}}, async () => { |
| 18 | + await expect(typeof createSimpleLocator, '`createSimpleLocator` is a function').eql('function'); |
| 19 | + |
| 20 | + await expect(typeof createTestLocator, '`createTestLocator` is a function').eql('function'); |
| 21 | + |
| 22 | + await expect( |
| 23 | + typeof getCssSelectorFromAttributesChain, |
| 24 | + '`getCssSelectorFromAttributesChain` is a function', |
| 25 | + ).eql('function'); |
| 26 | + |
| 27 | + await expect(typeof getModulesGraph, '`getModulesGraph` is a function').eql('function'); |
| 28 | + |
| 29 | + await expect(typeof resolveImports, '`resolveImports` is a function').eql('function'); |
| 30 | + |
| 31 | + await expect(typeof resolveReexports, '`resolveReexports` is a function').eql('function'); |
| 32 | + |
| 33 | + await expect(typeof parseGherkin, '`parseGherkin` is a function').eql('function'); |
| 34 | + |
| 35 | + await expect(typeof ParseGherkinError, '`ParseGherkinError` is a class').eql('function'); |
| 36 | + |
| 37 | + const locatorAttributes: Attributes = {}; |
| 38 | + const modulesGraphOptions: Partial<Options> = {}; |
| 39 | + const gherkinFeatures: readonly Feature[] = []; |
| 40 | + |
| 41 | + await expect( |
| 42 | + typeof locatorAttributes === 'object' && |
| 43 | + typeof modulesGraphOptions === 'object' && |
| 44 | + gherkinFeatures.length === 0, |
| 45 | + 'Types from external libraries are imported correctly', |
| 46 | + ).ok(); |
| 47 | +}); |
0 commit comments