Created
July 24, 2023 02:36
-
-
Save dman777/afb9d59128da09cec4e368d9cc398a07 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { | |
baseTest as it, | |
expect, | |
} from '../base-test.mjs'; | |
import { injectOktaToken } from '../utilities.mjs'; | |
import { | |
setExistingButNoStartValueMock, | |
setExistingGeneratorMock, | |
setGeneratorContextNotExist, | |
} from '../mock-data/patient-id-generator.mjs'; | |
const { | |
describe, | |
beforeEach, | |
} = it; | |
describe.only('Patient ID Generator', () => { | |
describe('When there is no existing generator context', () => { | |
beforeEach(async({ page })=> { | |
//await setExistingButNoStartValueMock(page); | |
//await setExistingGeneratorMock(page); | |
await setGeneratorContextNotExist(page); | |
await injectOktaToken(page); | |
page.goto('/reconcile/configure/identifier?foobar=bar&headerName=FOO') | |
}); | |
it('it should have a header with client id and name', async ({ page }) => { | |
const el = page.getByText('Configure patient identifier for FOO, bar', { exact: true }); | |
await expect(el).toBeVisible(); | |
}); | |
it('should have readonly', async({ page }) => { | |
const textLookUps = [ | |
'Starting patient ID number', | |
'Increment by', | |
'Append to start', | |
'Append to end', | |
'No', | |
'Identifier length' | |
]; | |
for (const text of textLookUps) { | |
const el = page.getByText(text, { exact: true }); | |
await expect(el).toBeVisible(); | |
await expect(el).toBeDisabled(); | |
} | |
}); | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment