diff options
Diffstat (limited to 'e2e/tests/plugins/condition/condition.e2e.spec.js')
-rw-r--r-- | e2e/tests/plugins/condition/condition.e2e.spec.js | 29 |
1 files changed, 13 insertions, 16 deletions
diff --git a/e2e/tests/plugins/condition/condition.e2e.spec.js b/e2e/tests/plugins/condition/condition.e2e.spec.js index 43cd22f59..9662b3692 100644 --- a/e2e/tests/plugins/condition/condition.e2e.spec.js +++ b/e2e/tests/plugins/condition/condition.e2e.spec.js @@ -55,16 +55,13 @@ test.describe.serial('Condition Set CRUD Operations on @localStorage', () => { await context.storageState({ path: './e2e/test-data/recycled_local_storage.json' }); //Set object identifier from url - conditionSetUrl = await page.url(); + conditionSetUrl = page.url(); console.log('conditionSetUrl ' + conditionSetUrl); - getConditionSetIdentifierFromUrl = await conditionSetUrl.split('/').pop().split('?')[0]; + getConditionSetIdentifierFromUrl = conditionSetUrl.split('/').pop().split('?')[0]; console.debug('getConditionSetIdentifierFromUrl ' + getConditionSetIdentifierFromUrl); - await page.close(); - }); - test.afterAll(async ({ browser }) => { - await browser.close(); }); + //Load localStorage for subsequent tests test.use({ storageState: './e2e/test-data/recycled_local_storage.json' }); //Begin suite of tests again localStorage @@ -76,7 +73,7 @@ test.describe.serial('Condition Set CRUD Operations on @localStorage', () => { await expect.soft(page.locator('.l-browse-bar__object-name')).toContainText('Unnamed Condition Set'); //Assertions on loaded Condition Set in Inspector - await expect.soft(page.locator('_vue=item.name=Unnamed Condition Set')).toBeTruthy; + expect.soft(page.locator('_vue=item.name=Unnamed Condition Set')).toBeTruthy(); //Reload Page await Promise.all([ @@ -87,7 +84,7 @@ test.describe.serial('Condition Set CRUD Operations on @localStorage', () => { //Re-verify after reload await expect.soft(page.locator('.l-browse-bar__object-name')).toContainText('Unnamed Condition Set'); //Assertions on loaded Condition Set in Inspector - await expect.soft(page.locator('_vue=item.name=Unnamed Condition Set')).toBeTruthy; + expect.soft(page.locator('_vue=item.name=Unnamed Condition Set')).toBeTruthy(); }); test('condition set object can be modified on @localStorage', async ({ page }) => { @@ -113,18 +110,18 @@ test.describe.serial('Condition Set CRUD Operations on @localStorage', () => { // Verify Inspector properties // Verify Inspector has updated Name property - await expect.soft(page.locator('text=Renamed Condition Set').nth(1)).toBeTruthy(); + expect.soft(page.locator('text=Renamed Condition Set').nth(1)).toBeTruthy(); // Verify Inspector Details has updated Name property - await expect.soft(page.locator('text=Renamed Condition Set').nth(2)).toBeTruthy(); + expect.soft(page.locator('text=Renamed Condition Set').nth(2)).toBeTruthy(); // Verify Tree reflects updated Name proprety // Expand Tree await page.locator('text=Open MCT My Items >> span >> nth=3').click(); // Verify Condition Set Object is renamed in Tree - await expect(page.locator('a:has-text("Renamed Condition Set")')).toBeTruthy(); + expect(page.locator('a:has-text("Renamed Condition Set")')).toBeTruthy(); // Verify Search Tree reflects renamed Name property await page.locator('[aria-label="OpenMCT Search"] input[type="search"]').fill('Renamed'); - await expect(page.locator('a:has-text("Renamed Condition Set")')).toBeTruthy(); + expect(page.locator('a:has-text("Renamed Condition Set")')).toBeTruthy(); //Reload Page await Promise.all([ @@ -137,18 +134,18 @@ test.describe.serial('Condition Set CRUD Operations on @localStorage', () => { // Verify Inspector properties // Verify Inspector has updated Name property - await expect.soft(page.locator('text=Renamed Condition Set').nth(1)).toBeTruthy(); + expect.soft(page.locator('text=Renamed Condition Set').nth(1)).toBeTruthy(); // Verify Inspector Details has updated Name property - await expect.soft(page.locator('text=Renamed Condition Set').nth(2)).toBeTruthy(); + expect.soft(page.locator('text=Renamed Condition Set').nth(2)).toBeTruthy(); // Verify Tree reflects updated Name proprety // Expand Tree await page.locator('text=Open MCT My Items >> span >> nth=3').click(); // Verify Condition Set Object is renamed in Tree - await expect(page.locator('a:has-text("Renamed Condition Set")')).toBeTruthy(); + expect(page.locator('a:has-text("Renamed Condition Set")')).toBeTruthy(); // Verify Search Tree reflects renamed Name property await page.locator('[aria-label="OpenMCT Search"] input[type="search"]').fill('Renamed'); - await expect(page.locator('a:has-text("Renamed Condition Set")')).toBeTruthy(); + expect(page.locator('a:has-text("Renamed Condition Set")')).toBeTruthy(); }); test('condition set object can be deleted by Search Tree Actions menu on @localStorage', async ({ page }) => { //Navigate to baseURL |