Change the way we check we are in targets section. Now we check the url rather than the h2 title
This commit is contained in:
1 parent
9ad765327d
commit
960e91c8e5
2 files changed
+10
-9
No files matched your search
@@ -10,7 +10,7 @@ const generateScreenshotPath = (fileName) => {
|
||||
return path.join(screenshotPath, fileName).concat(screenshotFormat);
|
||||
};
|
||||
|
||||
// Todo: move this function to a test helpers file so it could be used by other tests.
|
||||
// TODO: move this function to a test helpers file so it could be used by other tests.
|
||||
// Returns the executable path for the Boundary binary the test suite will run.
|
||||
const returnExecutablePath = (platform, arch) => {
|
||||
try {
|
||||
@@ -91,11 +91,12 @@ test.describe('Authentication end to end test suite', async () => {
|
||||
await boundaryWindow.$eval('button[type="submit"]', (element) =>
|
||||
element.click()
|
||||
);
|
||||
|
||||
// Check we are in Targets
|
||||
await boundaryWindow.waitForSelector('h2 >> text=Targets');
|
||||
expect(await boundaryWindow.innerText('h2 >> text=Targets')).toEqual(
|
||||
'Targets '
|
||||
);
|
||||
await boundaryWindow.waitForURL('**/#/scopes/global/projects/targets');
|
||||
const windowUrl = new URL(await boundaryWindow.url());
|
||||
expect(windowUrl.hash).toEqual('#/scopes/global/projects/targets');
|
||||
|
||||
// Take screenshot
|
||||
await boundaryWindow.screenshot({
|
||||
path: generateScreenshotPath('afterLogin'),
|
||||
|
||||
@@ -58,11 +58,11 @@ test.describe('Targets end to end test suite', async () => {
|
||||
await boundaryWindow.$eval('button[type="submit"]', (element) =>
|
||||
element.click()
|
||||
);
|
||||
|
||||
// Check we are in Targets
|
||||
await boundaryWindow.waitForSelector('h2 >> text=Targets');
|
||||
expect(await boundaryWindow.innerText('h2 >> text=Targets')).toEqual(
|
||||
'Targets '
|
||||
);
|
||||
await boundaryWindow.waitForURL('**/#/scopes/global/projects/targets');
|
||||
const windowUrl = new URL(await boundaryWindow.url());
|
||||
expect(windowUrl.hash).toEqual('#/scopes/global/projects/targets');
|
||||
|
||||
// Click connect to a target
|
||||
await boundaryWindow.waitForSelector('table.rose-table');
|
||||
|
||||
Reference in new issue
Block a user