diff --git a/openc3/lib/openc3/script/api_shared.rb b/openc3/lib/openc3/script/api_shared.rb index 6d6930bec6..07379e1ecd 100644 --- a/openc3/lib/openc3/script/api_shared.rb +++ b/openc3/lib/openc3/script/api_shared.rb @@ -14,7 +14,7 @@ # GNU Affero General Public License for more details. # Modified by OpenC3, Inc. -# All changes Copyright 2022, OpenC3, Inc. +# All changes Copyright 2023, OpenC3, Inc. # All Rights Reserved # # This file may also be used under the terms of a commercial license diff --git a/openc3/spec/script/api_shared_spec.rb b/openc3/spec/script/api_shared_spec.rb index 49c188f2c6..f260e97eb1 100644 --- a/openc3/spec/script/api_shared_spec.rb +++ b/openc3/spec/script/api_shared_spec.rb @@ -14,7 +14,7 @@ # GNU Affero General Public License for more details. # Modified by OpenC3, Inc. -# All changes Copyright 2022, OpenC3, Inc. +# All changes Copyright 2023, OpenC3, Inc. # All Rights Reserved # # This file may also be used under the terms of a commercial license diff --git a/playwright/tests/admin/plugins.spec.ts b/playwright/tests/admin/plugins.spec.ts index cb35a4b009..c7b22cb696 100644 --- a/playwright/tests/admin/plugins.spec.ts +++ b/playwright/tests/admin/plugins.spec.ts @@ -1,5 +1,5 @@ /* -# Copyright 2022 OpenC3, Inc. +# Copyright 2023 OpenC3, Inc. # All Rights Reserved. # # This program is free software; you can modify and/or redistribute it @@ -25,120 +25,120 @@ test.use({ test('shows and hides built-in tools', async ({ page, utils }) => { await expect(page.locator('id=openc3-tool')).toContainText( - 'openc3-cosmos-demo' + 'openc3-cosmos-demo', ) if (process.env.ENTERPRISE === '1') { await expect(page.locator('id=openc3-tool')).not.toContainText( - 'openc3-cosmos-enterprise-tool-admin' + 'openc3-cosmos-enterprise-tool-admin', ) await expect(page.locator('id=openc3-tool')).not.toContainText( - 'openc3-enterprise-tool-base' + 'openc3-enterprise-tool-base', ) } else { await expect(page.locator('id=openc3-tool')).not.toContainText( - 'openc3-cosmos-tool-admin' + 'openc3-cosmos-tool-admin', ) await expect(page.locator('id=openc3-tool')).not.toContainText( - 'openc3-tool-base' + 'openc3-tool-base', ) } await expect(page.locator('id=openc3-tool')).not.toContainText( - 'openc3-cosmos-tool-autonomic' + 'openc3-cosmos-tool-autonomic', ) await expect(page.locator('id=openc3-tool')).not.toContainText( - 'openc3-cosmos-tool-calendar' + 'openc3-cosmos-tool-calendar', ) await expect(page.locator('id=openc3-tool')).not.toContainText( - 'openc3-cosmos-tool-cmdsender' + 'openc3-cosmos-tool-cmdsender', ) await expect(page.locator('id=openc3-tool')).not.toContainText( - 'openc3-cosmos-tool-cmdtlmserver' + 'openc3-cosmos-tool-cmdtlmserver', ) await expect(page.locator('id=openc3-tool')).not.toContainText( - 'openc3-cosmos-tool-dataextractor' + 'openc3-cosmos-tool-dataextractor', ) await expect(page.locator('id=openc3-tool')).not.toContainText( - 'openc3-cosmos-tool-dataviewer' + 'openc3-cosmos-tool-dataviewer', ) await expect(page.locator('id=openc3-tool')).not.toContainText( - 'openc3-cosmos-tool-handbooks' + 'openc3-cosmos-tool-handbooks', ) await expect(page.locator('id=openc3-tool')).not.toContainText( - 'openc3-cosmos-tool-limitsmonitor' + 'openc3-cosmos-tool-limitsmonitor', ) await expect(page.locator('id=openc3-tool')).not.toContainText( - 'openc3-cosmos-tool-packetviewer' + 'openc3-cosmos-tool-packetviewer', ) await expect(page.locator('id=openc3-tool')).not.toContainText( - 'openc3-cosmos-tool-scriptrunner' + 'openc3-cosmos-tool-scriptrunner', ) await expect(page.locator('id=openc3-tool')).not.toContainText( - 'openc3-cosmos-tool-tablemanager' + 'openc3-cosmos-tool-tablemanager', ) await expect(page.locator('id=openc3-tool')).not.toContainText( - 'openc3-cosmos-tool-tlmgrapher' + 'openc3-cosmos-tool-tlmgrapher', ) await expect(page.locator('id=openc3-tool')).not.toContainText( - 'openc3-cosmos-tool-tlmviewer' + 'openc3-cosmos-tool-tlmviewer', ) await page.locator('text=Show Default Tools').click() await expect(page.locator('id=openc3-tool')).toContainText( - 'openc3-cosmos-demo' + 'openc3-cosmos-demo', ) if (process.env.ENTERPRISE === '1') { await expect(page.locator('id=openc3-tool')).toContainText( - 'openc3-cosmos-enterprise-tool-admin' + 'openc3-cosmos-enterprise-tool-admin', ) await expect(page.locator('id=openc3-tool')).toContainText( - 'openc3-enterprise-tool-base' + 'openc3-enterprise-tool-base', ) } else { await expect(page.locator('id=openc3-tool')).toContainText( - 'openc3-cosmos-tool-admin' + 'openc3-cosmos-tool-admin', ) await expect(page.locator('id=openc3-tool')).toContainText( - 'openc3-tool-base' + 'openc3-tool-base', ) } await expect(page.locator('id=openc3-tool')).toContainText( - 'openc3-cosmos-tool-autonomic' + 'openc3-cosmos-tool-autonomic', ) await expect(page.locator('id=openc3-tool')).toContainText( - 'openc3-cosmos-tool-calendar' + 'openc3-cosmos-tool-calendar', ) await expect(page.locator('id=openc3-tool')).toContainText( - 'openc3-cosmos-tool-cmdsender' + 'openc3-cosmos-tool-cmdsender', ) await expect(page.locator('id=openc3-tool')).toContainText( - 'openc3-cosmos-tool-cmdtlmserver' + 'openc3-cosmos-tool-cmdtlmserver', ) await expect(page.locator('id=openc3-tool')).toContainText( - 'openc3-cosmos-tool-dataextractor' + 'openc3-cosmos-tool-dataextractor', ) await expect(page.locator('id=openc3-tool')).toContainText( - 'openc3-cosmos-tool-dataviewer' + 'openc3-cosmos-tool-dataviewer', ) await expect(page.locator('id=openc3-tool')).toContainText( - 'openc3-cosmos-tool-handbooks' + 'openc3-cosmos-tool-handbooks', ) await expect(page.locator('id=openc3-tool')).toContainText( - 'openc3-cosmos-tool-limitsmonitor' + 'openc3-cosmos-tool-limitsmonitor', ) await expect(page.locator('id=openc3-tool')).toContainText( - 'openc3-cosmos-tool-packetviewer' + 'openc3-cosmos-tool-packetviewer', ) await expect(page.locator('id=openc3-tool')).toContainText( - 'openc3-cosmos-tool-scriptrunner' + 'openc3-cosmos-tool-scriptrunner', ) await expect(page.locator('id=openc3-tool')).toContainText( - 'openc3-cosmos-tool-tablemanager' + 'openc3-cosmos-tool-tablemanager', ) await expect(page.locator('id=openc3-tool')).toContainText( - 'openc3-cosmos-tool-tlmgrapher' + 'openc3-cosmos-tool-tlmgrapher', ) await expect(page.locator('id=openc3-tool')).toContainText( - 'openc3-cosmos-tool-tlmviewer' + 'openc3-cosmos-tool-tlmviewer', ) }) @@ -146,28 +146,28 @@ test('shows targets associated with plugins', async ({ page, utils }) => { // Check that the openc3-demo contains the following targets: await expect( page.locator( - '[data-test=plugin-list] div[role=listitem]:has-text("openc3-cosmos-demo")' - ) + '[data-test=plugin-list] div[role=listitem]:has-text("openc3-cosmos-demo")', + ), ).toContainText('EXAMPLE') await expect( page.locator( - '[data-test=plugin-list] div[role=listitem]:has-text("openc3-cosmos-demo")' - ) + '[data-test=plugin-list] div[role=listitem]:has-text("openc3-cosmos-demo")', + ), ).toContainText('INST') await expect( page.locator( - '[data-test=plugin-list] div[role=listitem]:has-text("openc3-cosmos-demo")' - ) + '[data-test=plugin-list] div[role=listitem]:has-text("openc3-cosmos-demo")', + ), ).toContainText('INST2') await expect( page.locator( - '[data-test=plugin-list] div[role=listitem]:has-text("openc3-cosmos-demo")' - ) + '[data-test=plugin-list] div[role=listitem]:has-text("openc3-cosmos-demo")', + ), ).toContainText('SYSTEM') await expect( page.locator( - '[data-test=plugin-list] div[role=listitem]:has-text("openc3-cosmos-demo")' - ) + '[data-test=plugin-list] div[role=listitem]:has-text("openc3-cosmos-demo")', + ), ).toContainText('TEMPLATED') }) @@ -192,18 +192,18 @@ test('installs a new plugin', async ({ page, utils }) => { await expect(page.locator('.v-dialog:has-text("Variables")')).toBeVisible() await page.locator('data-test=edit-submit').click() await expect(page.locator('[data-test=plugin-alert]')).toContainText( - 'Started installing' + 'Started installing', ) // Plugin install can go so fast we can't count on 'Running' to be present so try catch this let regexp = new RegExp( - `Processing plugin_install: ${pluginGem}__.* - Running` + `Processing plugin_install: ${pluginGem}__.* - Running`, ) try { await expect(page.locator('[data-test=process-list]')).toContainText( regexp, { timeout: 30000, - } + }, ) } catch {} // Ensure no Running are left @@ -211,7 +211,7 @@ test('installs a new plugin', async ({ page, utils }) => { regexp, { timeout: 30000, - } + }, ) // Check for Complete regexp = new RegExp(`Processing plugin_install: ${pluginGem} - Complete`) @@ -219,21 +219,21 @@ test('installs a new plugin', async ({ page, utils }) => { await expect( page.locator( - `[data-test=plugin-list] div[role=listitem]:has-text("${plugin}")` - ) + `[data-test=plugin-list] div[role=listitem]:has-text("${plugin}")`, + ), ).toContainText('PW_TEST') // Show the process output await page .locator( - `[data-test=process-list] div[role=listitem]:has-text("${plugin}") >> [data-test=show-output]` + `[data-test=process-list] div[role=listitem]:has-text("${plugin}") >> [data-test=show-output]`, ) .first() .click() await expect(page.locator('.v-dialog--active')).toContainText( - 'Process Output' + 'Process Output', ) await expect(page.locator('.v-dialog--active')).toContainText( - `Loading new plugin: ${pluginGem}` + `Loading new plugin: ${pluginGem}`, ) await page.locator('.v-dialog--active >> button:has-text("Ok")').click() }) @@ -246,8 +246,8 @@ test.describe(() => { // Check that there are no links (a) under the current plugin (no modified files) await expect( await page.locator( - `[data-test=plugin-list] div[role=listitem]:has-text("${plugin}") >> a` - ) + `[data-test=plugin-list] div[role=listitem]:has-text("${plugin}") >> a`, + ), ).toHaveCount(0) // Create a new script @@ -260,7 +260,7 @@ test.describe(() => { await page.locator('text=File Save As') await page .locator( - '.v-dialog >> .v-treeview-node__root:has-text("PW_TEST") > button' + '.v-dialog >> .v-treeview-node__root:has-text("PW_TEST") > button', ) .click() await page.locator('text=procedures').click() @@ -268,7 +268,7 @@ test.describe(() => { await page.type('[data-test=file-open-save-filename]', '/save_new.rb') await page.locator('[data-test=file-open-save-submit-btn]').click() await expect(page.locator('#sr-controls')).toContainText( - 'PW_TEST/procedures/save_new.rb' + 'PW_TEST/procedures/save_new.rb', ) // Create a new screen @@ -280,12 +280,12 @@ test.describe(() => { await utils.sleep(500) await page.locator('[data-test=new-screen]').click() await expect( - page.locator(`.v-system-bar:has-text("New Screen")`) + page.locator(`.v-system-bar:has-text("New Screen")`), ).toBeVisible() await page.locator('[data-test=new-screen-name]').fill('NEW_SCREEN') await page.locator('button:has-text("Ok")').click() await expect( - page.locator(`.v-system-bar:has-text("PW_TEST NEW_SCREEN")`) + page.locator(`.v-system-bar:has-text("PW_TEST NEW_SCREEN")`), ).toBeVisible() // Download the changes @@ -296,8 +296,8 @@ test.describe(() => { // Check that we have a link to click await expect( await page.locator( - `[data-test=plugin-list] div[role=listitem]:has-text("${plugin}") >> a` - ) + `[data-test=plugin-list] div[role=listitem]:has-text("${plugin}") >> a`, + ), ).toHaveCount(1) const [download1] = await Promise.all([ @@ -306,7 +306,7 @@ test.describe(() => { // Download the modified plugin page .locator( - `[data-test=plugin-list] div[role=listitem]:has-text("${plugin}") >> a` + `[data-test=plugin-list] div[role=listitem]:has-text("${plugin}") >> a`, ) .click(), ]) @@ -380,7 +380,7 @@ test('upgrades existing plugin', async ({ page, utils }) => { // Opens the file chooser. await page .locator( - `[data-test=plugin-list] div[role=listitem]:has-text("${plugin}") >> [data-test=upgrade-plugin]` + `[data-test=plugin-list] div[role=listitem]:has-text("${plugin}") >> [data-test=upgrade-plugin]`, ) .click(), ]) @@ -392,18 +392,18 @@ test('upgrades existing plugin', async ({ page, utils }) => { await page.locator('text=DELETE MODIFIED').click() await page.locator('data-test=modified-plugin-submit').click() await expect(page.locator('[data-test=plugin-alert]')).toContainText( - 'Started installing' + 'Started installing', ) // Plugin install can go so fast we can't count on 'Running' to be present so try catch this let regexp = new RegExp( - `Processing plugin_install: ${pluginGem}__.* - Running` + `Processing plugin_install: ${pluginGem}__.* - Running`, ) try { await expect(page.locator('[data-test=process-list]')).toContainText( regexp, { timeout: 30000, - } + }, ) } catch {} // Ensure no Running are left @@ -411,7 +411,7 @@ test('upgrades existing plugin', async ({ page, utils }) => { regexp, { timeout: 30000, - } + }, ) // Check for Complete regexp = new RegExp(`Processing plugin_install: ${pluginGem1} - Complete`) @@ -420,8 +420,8 @@ test('upgrades existing plugin', async ({ page, utils }) => { // Check that there are no longer any links (modified targets) await expect( await page.locator( - `[data-test=plugin-list] div[role=listitem]:has-text("${plugin}") >> a` - ) + `[data-test=plugin-list] div[role=listitem]:has-text("${plugin}") >> a`, + ), ).toHaveCount(0) }) @@ -429,40 +429,40 @@ test('edits existing plugin', async ({ page, utils }) => { // Edit then cancel await page .locator( - `[data-test=plugin-list] div[role=listitem]:has-text("${plugin}") >> [data-test=edit-plugin]` + `[data-test=plugin-list] div[role=listitem]:has-text("${plugin}") >> [data-test=edit-plugin]`, ) .click() await expect(page.locator('.v-dialog:has-text("Variables")')).toBeVisible() await page.locator('data-test=edit-cancel').click() await expect( - page.locator('.v-dialog:has-text("Variables")') + page.locator('.v-dialog:has-text("Variables")'), ).not.toBeVisible() // Edit and change a target name (forces re-install) await page .locator( - `[data-test=plugin-list] div[role=listitem]:has-text("${plugin}") >> [data-test=edit-plugin]` + `[data-test=plugin-list] div[role=listitem]:has-text("${plugin}") >> [data-test=edit-plugin]`, ) .click() await expect(page.locator('.v-dialog:has-text("Variables")')).toBeVisible() await page .locator( - '.v-dialog:has-text("Variables") .v-input:has-text("pw_test_target_name") >> input' + '.v-dialog:has-text("Variables") .v-input:has-text("pw_test_target_name") >> input', ) .fill('NEW_TGT') await page.locator('data-test=edit-submit').click() await expect(page.locator('[data-test=plugin-alert]')).toContainText( - 'Started installing' + 'Started installing', ) // Plugin install can go so fast we can't count on 'Running' to be present so try catch this let regexp = new RegExp( - `Processing plugin_install: ${pluginGem}__.* - Running` + `Processing plugin_install: ${pluginGem}__.* - Running`, ) try { await expect(page.locator('[data-test=process-list]')).toContainText( regexp, { timeout: 30000, - } + }, ) } catch {} // Ensure no Running are left @@ -470,7 +470,7 @@ test('edits existing plugin', async ({ page, utils }) => { regexp, { timeout: 30000, - } + }, ) // Check for Complete ... note new installs append '__' regexp = new RegExp(`Processing plugin_install: ${pluginGem1}__.* - Complete`) @@ -478,23 +478,23 @@ test('edits existing plugin', async ({ page, utils }) => { // Ensure the target list is updated to show the new name await expect( page.locator( - `[data-test=plugin-list] div[role=listitem]:has-text("${plugin}")` - ) + `[data-test=plugin-list] div[role=listitem]:has-text("${plugin}")`, + ), ).not.toContainText('PW_TEST') await expect( page.locator( - `[data-test=plugin-list] div[role=listitem]:has-text("${plugin}")` - ) + `[data-test=plugin-list] div[role=listitem]:has-text("${plugin}")`, + ), ).toContainText('NEW_TGT') // Show the process output await page .locator( - `[data-test=process-list] div[role=listitem]:has-text("${plugin}") >> [data-test=show-output]` + `[data-test=process-list] div[role=listitem]:has-text("${plugin}") >> [data-test=show-output]`, ) .first() .click() await expect(page.locator('.v-dialog--active')).toContainText( - 'Process Output' + 'Process Output', ) // TODO: Should this be Loading new or Updating existing? // await expect(page.locator('.v-dialog--active')).toContainText('Updating existing plugin') @@ -515,12 +515,12 @@ test.describe(() => { await utils.sleep(500) await page.locator('[data-test=new-screen]').click() await expect( - page.locator(`.v-system-bar:has-text("New Screen")`) + page.locator(`.v-system-bar:has-text("New Screen")`), ).toBeVisible() await page.locator('[data-test=new-screen-name]').fill('NEW_SCREEN') await page.locator('button:has-text("Ok")').click() await expect( - page.locator(`.v-system-bar:has-text("NEW_TGT NEW_SCREEN")`) + page.locator(`.v-system-bar:has-text("NEW_TGT NEW_SCREEN")`), ).toBeVisible() }) }) @@ -528,7 +528,7 @@ test.describe(() => { test('deletes a plugin', async ({ page, utils }) => { await page .locator( - `[data-test=plugin-list] div[role=listitem]:has-text("${plugin}") >> [data-test=delete-plugin]` + `[data-test=plugin-list] div[role=listitem]:has-text("${plugin}") >> [data-test=delete-plugin]`, ) .click() await expect(page.locator('.v-dialog--active')).toContainText('Confirm') @@ -539,18 +539,18 @@ test('deletes a plugin', async ({ page, utils }) => { await page.locator('data-test=modified-plugin-submit').click() await expect(page.locator('[data-test=plugin-alert]')).toContainText( - 'Removing plugin' + 'Removing plugin', ) // Plugin uninstall can go so fast we can't count on 'Running' to be present so try catch this let regexp = new RegExp( - `Processing plugin_install: ${pluginGem1}__.* - Running` + `Processing plugin_install: ${pluginGem1}__.* - Running`, ) try { await expect(page.locator('[data-test=process-list]')).toContainText( regexp, { timeout: 30000, - } + }, ) } catch {} // Ensure no Running are left @@ -558,28 +558,28 @@ test('deletes a plugin', async ({ page, utils }) => { regexp, { timeout: 30000, - } + }, ) // Check for Complete ... note new installs append '__' regexp = new RegExp( - `Processing plugin_uninstall: ${pluginGem1}__.* - Complete` + `Processing plugin_uninstall: ${pluginGem1}__.* - Complete`, ) await expect(page.locator('[data-test=process-list]')).toContainText(regexp) await expect(page.locator(`[data-test=plugin-list]`)).not.toContainText( - plugin + plugin, ) // Show the process output await page .locator( - `[data-test=process-list] div[role=listitem]:has-text("plugin_uninstall") >> [data-test=show-output]` + `[data-test=process-list] div[role=listitem]:has-text("plugin_uninstall") >> [data-test=show-output]`, ) .first() .click() await expect(page.locator('.v-dialog--active')).toContainText( - 'Process Output' + 'Process Output', ) await expect(page.locator('.v-dialog--active')).toContainText( - 'PluginModel destroyed' + 'PluginModel destroyed', ) await page.locator('.v-dialog--active >> button:has-text("Ok")').click() }) diff --git a/playwright/tests/admin/settings.spec.ts b/playwright/tests/admin/settings.spec.ts index 244049c248..85827f121e 100644 --- a/playwright/tests/admin/settings.spec.ts +++ b/playwright/tests/admin/settings.spec.ts @@ -13,7 +13,7 @@ # GNU Affero General Public License for more details. # # Modified by OpenC3, Inc. -# All changes Copyright 2022, OpenC3, Inc. +# All changes Copyright 2023, OpenC3, Inc. # All Rights Reserved */ diff --git a/playwright/tests/calendar.spec.ts b/playwright/tests/calendar.spec.ts index 48497c4f02..e8a019549c 100644 --- a/playwright/tests/calendar.spec.ts +++ b/playwright/tests/calendar.spec.ts @@ -13,7 +13,7 @@ # GNU Affero General Public License for more details. # # Modified by OpenC3, Inc. -# All changes Copyright 2022, OpenC3, Inc. +# All changes Copyright 2023, OpenC3, Inc. # All Rights Reserved */ @@ -52,7 +52,7 @@ test('file menu', async ({ page, utils }) => { '[data-test=cosmos-calendar-file-download-event-list]', function (contents) { expect(contents).toContain('') // % is empty - } + }, ) }) diff --git a/playwright/tests/cmd-tlm-server/cmd-pkts.spec.ts b/playwright/tests/cmd-tlm-server/cmd-pkts.spec.ts index 888a343499..9045a25f7d 100644 --- a/playwright/tests/cmd-tlm-server/cmd-pkts.spec.ts +++ b/playwright/tests/cmd-tlm-server/cmd-pkts.spec.ts @@ -13,7 +13,7 @@ # GNU Affero General Public License for more details. # # Modified by OpenC3, Inc. -# All changes Copyright 2022, OpenC3, Inc. +# All changes Copyright 2023, OpenC3, Inc. # All Rights Reserved */ diff --git a/playwright/tests/cmd-tlm-server/file-menu.spec.ts b/playwright/tests/cmd-tlm-server/file-menu.spec.ts index 3bfb5d1ecb..211540eed3 100644 --- a/playwright/tests/cmd-tlm-server/file-menu.spec.ts +++ b/playwright/tests/cmd-tlm-server/file-menu.spec.ts @@ -13,7 +13,7 @@ # GNU Affero General Public License for more details. # # Modified by OpenC3, Inc. -# All changes Copyright 2022, OpenC3, Inc. +# All changes Copyright 2023, OpenC3, Inc. # All Rights Reserved */ diff --git a/playwright/tests/cmd-tlm-server/interfaces.spec.ts b/playwright/tests/cmd-tlm-server/interfaces.spec.ts index 7caad57c42..af7c8a3262 100644 --- a/playwright/tests/cmd-tlm-server/interfaces.spec.ts +++ b/playwright/tests/cmd-tlm-server/interfaces.spec.ts @@ -13,7 +13,7 @@ # GNU Affero General Public License for more details. # # Modified by OpenC3, Inc. -# All changes Copyright 2022, OpenC3, Inc. +# All changes Copyright 2023, OpenC3, Inc. # All Rights Reserved */ @@ -27,20 +27,20 @@ test.use({ test('disconnects and connects an interface', async ({ page, utils }) => { await expect( - page.locator('tr:has-text("INST_INT") td >> nth=2') + page.locator('tr:has-text("INST_INT") td >> nth=2'), ).toContainText('CONNECTED') await page.locator('tr:has-text("INST_INT") td >> nth=1').click() await expect( - page.locator('tr:has-text("INST_INT") td >> nth=2') + page.locator('tr:has-text("INST_INT") td >> nth=2'), ).toContainText('DISCONNECTED') await expect(page.locator('[data-test=log-messages]')).toContainText( - 'INST_INT: Disconnect' + 'INST_INT: Disconnect', ) await page.locator('tr:has-text("INST_INT") td >> nth=1').click() await expect( - page.locator('tr:has-text("INST_INT") td >> nth=2') + page.locator('tr:has-text("INST_INT") td >> nth=2'), ).toContainText('CONNECTED') await expect(page.locator('[data-test=log-messages]')).toContainText( - 'INST_INT: Connection Success' + 'INST_INT: Connection Success', ) }) diff --git a/playwright/tests/cmd-tlm-server/targets.spec.ts b/playwright/tests/cmd-tlm-server/targets.spec.ts index adc65dd565..6386f96578 100644 --- a/playwright/tests/cmd-tlm-server/targets.spec.ts +++ b/playwright/tests/cmd-tlm-server/targets.spec.ts @@ -13,7 +13,7 @@ # GNU Affero General Public License for more details. # # Modified by OpenC3, Inc. -# All changes Copyright 2022, OpenC3, Inc. +# All changes Copyright 2023, OpenC3, Inc. # All Rights Reserved */ @@ -29,24 +29,24 @@ test('displays the list of targets', async ({ page, utils }) => { await expect(page.locator('[data-test=targets-table]')).toContainText('INST') await expect(page.locator('[data-test=targets-table]')).toContainText('INST2') await expect(page.locator('[data-test=targets-table]')).toContainText( - 'EXAMPLE' + 'EXAMPLE', ) await expect(page.locator('[data-test=targets-table]')).toContainText( - 'TEMPLATED' + 'TEMPLATED', ) }) test('displays the interfaces', async ({ page, utils }) => { await expect(page.locator('[data-test=targets-table]')).toContainText( - 'INST_INT' + 'INST_INT', ) await expect(page.locator('[data-test=targets-table]')).toContainText( - 'INST2_INT' + 'INST2_INT', ) await expect(page.locator('[data-test=targets-table]')).toContainText( - 'EXAMPLE_INT' + 'EXAMPLE_INT', ) await expect(page.locator('[data-test=targets-table]')).toContainText( - 'TEMPLATED_INT' + 'TEMPLATED_INT', ) }) diff --git a/playwright/tests/cmd-tlm-server/tlm-pkts.spec.ts b/playwright/tests/cmd-tlm-server/tlm-pkts.spec.ts index fedff70aef..aafe11fe9e 100644 --- a/playwright/tests/cmd-tlm-server/tlm-pkts.spec.ts +++ b/playwright/tests/cmd-tlm-server/tlm-pkts.spec.ts @@ -13,7 +13,7 @@ # GNU Affero General Public License for more details. # # Modified by OpenC3, Inc. -# All changes Copyright 2022, OpenC3, Inc. +# All changes Copyright 2023, OpenC3, Inc. # All Rights Reserved */ @@ -37,11 +37,11 @@ test('displays the packet count', async ({ page, utils }) => { await utils.sleep(2000) // Allow the telemetry to be fetched expect( parseInt( - await page.locator('text=INSTHEALTH_STATUS >> td >> nth=2').textContent() - ) + await page.locator('text=INSTHEALTH_STATUS >> td >> nth=2').textContent(), + ), ).toBeGreaterThan(50) expect( - parseInt(await page.locator('text=INSTADCS >> td >> nth=2').textContent()) + parseInt(await page.locator('text=INSTADCS >> td >> nth=2').textContent()), ).toBeGreaterThan(500) }) @@ -52,7 +52,7 @@ test('displays a raw packet', async ({ page, utils }) => { .getByRole('button', { name: 'View Raw' }) .click() await expect(page.locator('.v-dialog')).toContainText( - 'Raw Telemetry Packet: INST HEALTH_STATUS' + 'Raw Telemetry Packet: INST HEALTH_STATUS', ) await expect(page.locator('.v-dialog')).toContainText('Received Time:') await expect(page.locator('.v-dialog')).toContainText('Count:') @@ -80,6 +80,6 @@ test('links to packet viewer', async ({ page, utils }) => { timeout: 30000, }) await expect(newPage.locator('id=openc3-tool')).toContainText( - 'Health and status from the INST target' + 'Health and status from the INST target', ) }) diff --git a/playwright/tests/command-sender.spec.ts b/playwright/tests/command-sender.spec.ts index 21bb8c661e..7e85dc9acc 100644 --- a/playwright/tests/command-sender.spec.ts +++ b/playwright/tests/command-sender.spec.ts @@ -13,7 +13,7 @@ # GNU Affero General Public License for more details. # # Modified by OpenC3, Inc. -# All changes Copyright 2022, OpenC3, Inc. +# All changes Copyright 2023, OpenC3, Inc. # All Rights Reserved */ diff --git a/playwright/tests/data-extractor.spec.ts b/playwright/tests/data-extractor.spec.ts index 5b18869a71..06cd081a91 100644 --- a/playwright/tests/data-extractor.spec.ts +++ b/playwright/tests/data-extractor.spec.ts @@ -13,7 +13,7 @@ # GNU Affero General Public License for more details. # # Modified by OpenC3, Inc. -# All changes Copyright 2022, OpenC3, Inc. +# All changes Copyright 2023, OpenC3, Inc. # All Rights Reserved */ diff --git a/playwright/tests/data-viewer.spec.ts b/playwright/tests/data-viewer.spec.ts index 09a7a2e050..5cafa71c26 100644 --- a/playwright/tests/data-viewer.spec.ts +++ b/playwright/tests/data-viewer.spec.ts @@ -13,7 +13,7 @@ # GNU Affero General Public License for more details. # # Modified by OpenC3, Inc. -# All changes Copyright 2022, OpenC3, Inc. +# All changes Copyright 2023, OpenC3, Inc. # All Rights Reserved */ @@ -74,7 +74,6 @@ test('saves the configuration', async ({ page, utils }) => { }) test('opens and resets the configuration', async ({ page, utils }) => { - test.slow() // Open the config await page.locator('[data-test="cosmos-data-viewer-file"]').click() await page.locator('text=Open Configuration').click() diff --git a/playwright/tests/fixture.ts b/playwright/tests/fixture.ts index 7f80f7dd5d..fd8d1d0a81 100644 --- a/playwright/tests/fixture.ts +++ b/playwright/tests/fixture.ts @@ -1,5 +1,5 @@ /* -# Copyright 2022 OpenC3, Inc. +# Copyright 2023 OpenC3, Inc. # All Rights Reserved. # # This program is free software; you can modify and/or redistribute it @@ -101,8 +101,8 @@ export const test = base.extend<{ // Copyright (c) 2021 Anish Karandikar await context.addInitScript(() => window.addEventListener('beforeunload', () => - window.collectIstanbulCoverage(JSON.stringify(window.__coverage__)) - ) + window.collectIstanbulCoverage(JSON.stringify(window.__coverage__)), + ), ) await fs.promises.mkdir(istanbulTempDir, { recursive: true }) await context.exposeFunction('collectIstanbulCoverage', (coverageJSON) => { @@ -110,9 +110,9 @@ export const test = base.extend<{ fs.writeFileSync( path.join( istanbulTempDir, - `playwright_coverage_${generateUUID()}.json` + `playwright_coverage_${generateUUID()}.json`, ), - coverageJSON + coverageJSON, ) }) // End Copyright @@ -124,7 +124,7 @@ export const test = base.extend<{ // Copyright (c) 2021 Anish Karandikar for (const page of context.pages()) { await page.evaluate(() => - window.collectIstanbulCoverage(JSON.stringify(window.__coverage__)) + window.collectIstanbulCoverage(JSON.stringify(window.__coverage__)), ) } // End Copyright diff --git a/playwright/tests/limits-monitor.spec.ts b/playwright/tests/limits-monitor.spec.ts index f4b6b82795..59656f323e 100644 --- a/playwright/tests/limits-monitor.spec.ts +++ b/playwright/tests/limits-monitor.spec.ts @@ -13,7 +13,7 @@ # GNU Affero General Public License for more details. # # Modified by OpenC3, Inc. -# All changes Copyright 2022, OpenC3, Inc. +# All changes Copyright 2023, OpenC3, Inc. # All Rights Reserved */ @@ -87,7 +87,6 @@ test('saves the configuration', async ({ page, utils }) => { }) test('opens and resets the configuration', async ({ page, utils }) => { - test.slow() await page.locator('[data-test=cosmos-limits-monitor-file]').click() await page.locator('text=Open Configuration').click() await page.locator(`td:has-text("playwright")`).click() diff --git a/playwright/tests/packet-viewer.spec.ts b/playwright/tests/packet-viewer.spec.ts index 30064f82ac..dbcce14a9f 100644 --- a/playwright/tests/packet-viewer.spec.ts +++ b/playwright/tests/packet-viewer.spec.ts @@ -13,7 +13,7 @@ # GNU Affero General Public License for more details. # # Modified by OpenC3, Inc. -# All changes Copyright 2022, OpenC3, Inc. +# All changes Copyright 2023, OpenC3, Inc. # All Rights Reserved */ @@ -45,10 +45,10 @@ test('displays INST HEALTH_STATUS and polls the api', async ({ await utils.inputValue( page, '[data-test=select-packet] input', - 'HEALTH_STATUS' + 'HEALTH_STATUS', ) await expect(page.locator('id=openc3-tool')).toContainText( - 'Health and status' + 'Health and status', ) // Description page.on('request', (request) => { @@ -65,7 +65,7 @@ test('selects a target and packet to display', async ({ page, utils }) => { await utils.inputValue(page, '[data-test=select-target] input', 'INST') await utils.inputValue(page, '[data-test=select-packet] input', 'IMAGE') await expect(page.locator('id=openc3-tool')).toContainText( - 'Packet with image data' + 'Packet with image data', ) await expect(page.locator('id=openc3-tool')).toContainText('BYTES') }) @@ -78,12 +78,12 @@ test('gets details with right click', async ({ page, utils }) => { await page.getByRole('menuitem', { name: 'Details' }).click() await expect(page.locator('.v-dialog--active')).toBeVisible() await expect(page.locator('.v-dialog--active')).toContainText( - 'INST HEALTH_STATUS TEMP2' + 'INST HEALTH_STATUS TEMP2', ) // Check that a few of the details are there ... that proves the API request await expect(page.locator('.v-dialog--active')).toContainText('FLOAT') await expect(page.locator('.v-dialog--active')).toContainText( - 'PolynomialConversion' + 'PolynomialConversion', ) await expect(page.locator('.v-dialog--active')).toContainText('CELSIUS') @@ -97,12 +97,12 @@ test('gets details with right click', async ({ page, utils }) => { await page.getByRole('menuitem', { name: 'Details' }).click() await expect(page.locator('.v-dialog--active')).toBeVisible() await expect(page.locator('.v-dialog--active')).toContainText( - 'INST HEALTH_STATUS PACKET_TIMESECONDS' + 'INST HEALTH_STATUS PACKET_TIMESECONDS', ) // Check that a few of the details are there ... that proves the API request await expect(page.locator('.v-dialog--active')).toContainText('DERIVED') await expect(page.locator('.v-dialog--active')).toContainText( - 'PacketTimeSecondsConversion' + 'PacketTimeSecondsConversion', ) }) diff --git a/playwright/tests/script-runner/api.spec.ts b/playwright/tests/script-runner/api.spec.ts index 27fa9cb737..446f4db58c 100644 --- a/playwright/tests/script-runner/api.spec.ts +++ b/playwright/tests/script-runner/api.spec.ts @@ -13,7 +13,7 @@ # GNU Affero General Public License for more details. # # Modified by OpenC3, Inc. -# All changes Copyright 2022, OpenC3, Inc. +# All changes Copyright 2023, OpenC3, Inc. # All Rights Reserved */ @@ -54,30 +54,30 @@ test('opens a target file', async ({ page, utils }) => { timeout: 30000, }) await expect(page.locator('[data-test=output-messages]')).toContainText( - 'Writing DEFAULT/targets_modified/INST/test.txt' + 'Writing DEFAULT/targets_modified/INST/test.txt', ) await expect(page.locator('[data-test=output-messages]')).toContainText( - 'Reading DEFAULT/targets_modified/INST/test.txt' + 'Reading DEFAULT/targets_modified/INST/test.txt', ) await expect(page.locator('[data-test=output-messages]')).toContainText( - 'file contents' + 'file contents', ) await expect(page.locator('[data-test=output-messages]')).toContainText( - 'Deleting DEFAULT/targets_modified/INST/test.txt' + 'Deleting DEFAULT/targets_modified/INST/test.txt', ) // Restart after the error await page.locator('[data-test=go-button]').click() await expect(page.locator('[data-test=output-messages]')).toContainText( - 'Reading DEFAULT/targets_modified/INST/screens/web.txt' + 'Reading DEFAULT/targets_modified/INST/screens/web.txt', ) await expect(page.locator('[data-test=output-messages]')).toContainText( - 'Edited web' + 'Edited web', ) await expect(page.locator('[data-test=output-messages]')).toContainText( - 'Reading DEFAULT/targets/INST/screens/web.txt' + 'Reading DEFAULT/targets/INST/screens/web.txt', ) await expect(page.locator('[data-test=output-messages]')).toContainText( - 'Original web' + 'Original web', ) await expect(page.locator('[data-test=state]')).toHaveValue('stopped') }) diff --git a/playwright/tests/script-runner/debug.spec.ts b/playwright/tests/script-runner/debug.spec.ts index 435057af20..83f73630c3 100644 --- a/playwright/tests/script-runner/debug.spec.ts +++ b/playwright/tests/script-runner/debug.spec.ts @@ -13,7 +13,7 @@ # GNU Affero General Public License for more details. # # Modified by OpenC3, Inc. -# All changes Copyright 2022, OpenC3, Inc. +# All changes Copyright 2023, OpenC3, Inc. # All Rights Reserved */ @@ -43,12 +43,12 @@ test('keeps a debug command history', async ({ page, utils }) => { await page.locator('[data-test=debug-text]').type('x') await page.keyboard.press('Enter') await expect(page.locator('[data-test=output-messages]')).toContainText( - '12345' + '12345', ) await page.locator('[data-test=debug-text]').type('puts "abc123!"') await page.keyboard.press('Enter') await expect(page.locator('[data-test=output-messages]')).toContainText( - 'abc123!' + 'abc123!', ) await page.locator('[data-test=debug-text]').type('x = 67890') await page.keyboard.press('Enter') @@ -58,7 +58,7 @@ test('keeps a debug command history', async ({ page, utils }) => { expect(await page.inputValue('[data-test=debug-text]')).toMatch('x = 67890') await page.keyboard.press('ArrowUp') expect(await page.inputValue('[data-test=debug-text]')).toMatch( - 'puts "abc123!"' + 'puts "abc123!"', ) await page.keyboard.press('ArrowUp') expect(await page.inputValue('[data-test=debug-text]')).toMatch('x') @@ -68,7 +68,7 @@ test('keeps a debug command history', async ({ page, utils }) => { expect(await page.inputValue('[data-test=debug-text]')).toMatch('x') await page.keyboard.press('ArrowDown') expect(await page.inputValue('[data-test=debug-text]')).toMatch( - 'puts "abc123!"' + 'puts "abc123!"', ) await page.keyboard.press('ArrowDown') expect(await page.inputValue('[data-test=debug-text]')).toMatch('x = 67890') @@ -86,7 +86,7 @@ test('keeps a debug command history', async ({ page, utils }) => { await expect(page.locator('[data-test=state]')).toHaveValue('stopped') // Verify we were able to change the 'x' variable await expect(page.locator('[data-test=output-messages]')).toContainText( - 'x:67890' + 'x:67890', ) await page.locator('[data-test=cosmos-script-runner-script]').click() @@ -102,12 +102,12 @@ test('retries failed checks', async ({ page, utils }) => { }) // Check for the initial check message await expect(page.locator('[data-test=output-messages]')).toContainText( - '1 == 2 is FALSE' + '1 == 2 is FALSE', ) await page.locator('[data-test=pause-retry-button]').click() // Retry // Now we should have two error messages await expect( - page.locator('[data-test=output-messages] td:has-text("1 == 2 is FALSE")') + page.locator('[data-test=output-messages] td:has-text("1 == 2 is FALSE")'), ).toHaveCount(2) await expect(page.locator('[data-test=state]')).toHaveValue('error') await page.locator('[data-test=go-button]').click() @@ -125,7 +125,7 @@ test('displays the call stack', async ({ page, utils }) => { // page.locator('[data-test=cosmos-script-runner-script-call-stack]') // ).toBeDisabled() await expect( - page.locator('[data-test=cosmos-script-runner-script-call-stack]') + page.locator('[data-test=cosmos-script-runner-script-call-stack]'), ).toHaveAttribute('aria-disabled', 'true') // await expect(page.locator('[data-test=cosmos-script-runner-script-call-stack]')).toBeDisabled() @@ -154,7 +154,7 @@ test('displays the call stack', async ({ page, utils }) => { await page.locator('[data-test=cosmos-script-runner-script]').click() await expect( - page.locator('[data-test=cosmos-script-runner-script-call-stack]') + page.locator('[data-test=cosmos-script-runner-script-call-stack]'), ).toHaveAttribute('aria-disabled', 'true') }) @@ -187,10 +187,10 @@ test('displays disconnect icon', async ({ page, utils }) => { timeout: 20000, }) await expect(page.locator('[data-test=output-messages]')).toContainText( - 'total:0' // collect count does not change + 'total:0', // collect count does not change ) await expect(page.locator('[data-test=output-messages]')).toContainText( - 'disconnect:100' + 'disconnect:100', ) await page.locator('[data-test=cosmos-script-runner-script]').click() @@ -234,7 +234,7 @@ test('remembers breakpoints and clears all', async ({ page, utils }) => { await page.locator('text=checks >> nth=0').click() // nth=0 because INST, INST2 await page.locator('[data-test=file-open-save-submit-btn]').click() expect(await page.locator('#sr-controls')).toContainText( - `INST/procedures/checks.rb` + `INST/procedures/checks.rb`, ) await utils.sleep(1000) // Clicking on the ace gutters requires a little wait await page.locator('.ace_gutter-cell').nth(1).click({ force: true }) @@ -246,14 +246,14 @@ test('remembers breakpoints and clears all', async ({ page, utils }) => { await utils.sleep(1000) // allow page to reload // Reloading the page should bring up the previous script expect(await page.locator('#sr-controls')).toContainText( - `INST/procedures/checks.rb` + `INST/procedures/checks.rb`, ) await expect(page.locator('.ace_gutter-cell').nth(1)).toHaveClass( - 'ace_gutter-cell ace_breakpoint' + 'ace_gutter-cell ace_breakpoint', ) await expect(page.locator('.ace_gutter-cell').nth(3)).toHaveClass( - 'ace_gutter-cell ace_breakpoint' + 'ace_gutter-cell ace_breakpoint', ) await page.locator('[data-test=cosmos-script-runner-script]').click() @@ -261,9 +261,9 @@ test('remembers breakpoints and clears all', async ({ page, utils }) => { await page.locator('.v-dialog >> button:has-text("Delete")').click() await expect(page.locator('.ace_gutter-cell').nth(1)).toHaveClass( - 'ace_gutter-cell ' + 'ace_gutter-cell ', ) await expect(page.locator('.ace_gutter-cell').nth(3)).toHaveClass( - 'ace_gutter-cell ' + 'ace_gutter-cell ', ) }) diff --git a/playwright/tests/script-runner/edit-menu.spec.ts b/playwright/tests/script-runner/edit-menu.spec.ts index 7b6ccd10e5..02a19e09e4 100644 --- a/playwright/tests/script-runner/edit-menu.spec.ts +++ b/playwright/tests/script-runner/edit-menu.spec.ts @@ -13,7 +13,7 @@ # GNU Affero General Public License for more details. # # Modified by OpenC3, Inc. -# All changes Copyright 2022, OpenC3, Inc. +# All changes Copyright 2023, OpenC3, Inc. # All Rights Reserved */ diff --git a/playwright/tests/script-runner/file-menu.spec.ts b/playwright/tests/script-runner/file-menu.spec.ts index c91b525adb..2444317fa9 100644 --- a/playwright/tests/script-runner/file-menu.spec.ts +++ b/playwright/tests/script-runner/file-menu.spec.ts @@ -13,7 +13,7 @@ # GNU Affero General Public License for more details. # # Modified by OpenC3, Inc. -# All changes Copyright 2022, OpenC3, Inc. +# All changes Copyright 2023, OpenC3, Inc. # All Rights Reserved */ @@ -50,14 +50,14 @@ test('open a file', async ({ page, utils }) => { await page.locator('[data-test=file-open-save-submit-btn]').click() await expect(page.locator('.v-dialog')).not.toBeVisible() expect(await page.locator('#sr-controls')).toContainText( - `INST/procedures/disconnect.rb` + `INST/procedures/disconnect.rb`, ) // Reload and verify the file is still there await page.reload() await utils.sleep(1000) // allow page to reload expect(await page.locator('#sr-controls')).toContainText( - `INST/procedures/disconnect.rb` + `INST/procedures/disconnect.rb`, ) }) @@ -71,7 +71,7 @@ test('handles File->Save new file', async ({ page, utils }) => { await page.locator('text=temp.rb is not a valid filename') await page .locator( - '.v-dialog >> .v-treeview-node__root:has-text("INST") > button >> nth=0' + '.v-dialog >> .v-treeview-node__root:has-text("INST") > button >> nth=0', ) .click() await page.getByText('procedures', { exact: true }).click() @@ -79,7 +79,7 @@ test('handles File->Save new file', async ({ page, utils }) => { await page.type('[data-test=file-open-save-filename]', '/save_new.rb') await page.locator('[data-test=file-open-save-submit-btn]').click() expect(await page.locator('#sr-controls')).toContainText( - 'INST/procedures/save_new.rb' + 'INST/procedures/save_new.rb', ) // Delete the file @@ -98,7 +98,7 @@ test('handles File Save overwrite', async ({ page, utils }) => { .fill('INST/procedures/save_overwrite.rb') await page.locator('[data-test=file-open-save-submit-btn]').click() expect(await page.locator('#sr-controls')).toContainText( - 'INST/procedures/save_overwrite.rb' + 'INST/procedures/save_overwrite.rb', ) await page.locator('textarea').fill('# comment1') @@ -141,7 +141,7 @@ test('handles Download', async ({ page, utils }) => { '[data-test=cosmos-script-runner-file-download]', function (contents) { expect(contents).toContain('download this') - } + }, ) // Delete the file @@ -162,7 +162,7 @@ test('can delete all temp files', async ({ page, utils }) => { timeout: 20000, }) await expect(page.locator('#sr-controls')).toContainText( - /__TEMP__\/\d{4}_\d{2}_\d{2}_\d{2}_\d{2}_\d{2}_\d{3}_temp.rb/ + /__TEMP__\/\d{4}_\d{2}_\d{2}_\d{2}_\d{2}_\d{2}_\d{3}_temp.rb/, ) // Weird selector but it's how vuetify works let tempFile1 = await page @@ -183,7 +183,7 @@ test('can delete all temp files', async ({ page, utils }) => { timeout: 20000, }) await expect(page.locator('#sr-controls')).toContainText( - /__TEMP__\/\d{4}_\d{2}_\d{2}_\d{2}_\d{2}_\d{2}_\d{3}_temp.rb/ + /__TEMP__\/\d{4}_\d{2}_\d{2}_\d{2}_\d{2}_\d{2}_\d{3}_temp.rb/, ) let tempFile2 = await page .locator('#sr-controls >> input[type=hidden]') diff --git a/playwright/tests/script-runner/prompts.spec.ts b/playwright/tests/script-runner/prompts.spec.ts index eb355ba59b..52b044b888 100644 --- a/playwright/tests/script-runner/prompts.spec.ts +++ b/playwright/tests/script-runner/prompts.spec.ts @@ -13,7 +13,7 @@ # GNU Affero General Public License for more details. # # Modified by OpenC3, Inc. -# All changes Copyright 2022, OpenC3, Inc. +# All changes Copyright 2023, OpenC3, Inc. # All Rights Reserved */ @@ -38,10 +38,10 @@ test('prompts for hazardous commands', async ({ page, utils }) => { await page.locator('.v-dialog >> button:has-text("Yes")').click() await expect(page.locator('[data-test=state]')).toHaveValue('stopped') await expect(page.locator('[data-test=output-messages]')).toContainText( - 'User input: Yes' + 'User input: Yes', ) await expect(page.locator('[data-test=output-messages]')).toContainText( - 'cmd("INST CLEAR")' + 'cmd("INST CLEAR")', ) }) @@ -73,7 +73,7 @@ test('errors for out of range command parameters', async ({ page, utils }) => { await page.locator('[data-test=go-button]').click() await expect(page.locator('[data-test=state]')).toHaveValue('stopped') await expect(page.locator('[data-test=output-messages]')).toContainText( - '11 not in valid range' + '11 not in valid range', ) }) @@ -112,31 +112,31 @@ test('ask accepts default, password, and required', async ({ page, utils }) => { }) await page.locator('.v-dialog >> button:has-text("Cancel")').click() await expect(page.locator('[data-test=output-messages]')).toContainText( - 'User input: Cancel' + 'User input: Cancel', ) await expect(page.locator('[data-test=state]')).toHaveValue('paused') // Clicking go re-launches the dialog await page.locator('[data-test=go-button]').click() await expect( - page.locator('.v-dialog >> button:has-text("Ok")') + page.locator('.v-dialog >> button:has-text("Ok")'), ).toBeDisabled() await page.locator('.v-dialog >> input').type('12345') await page.locator('.v-dialog >> button:has-text("Ok")').click() await expect(page.locator('[data-test=output-messages]')).toContainText( - '12345' + '12345', ) // Now nothing is required so OK is enabled await expect(page.locator('.v-dialog >> button:has-text("Ok")')).toBeEnabled() await page.locator('.v-dialog >> button:has-text("Ok")').click() await expect(page.locator('[data-test=output-messages]')).toContainText( - 'blank:true' + 'blank:true', ) // Verify the default value expect(await page.inputValue('[data-test=ask-value-input]')).toMatch('67890') await page.locator('.v-dialog >> button:has-text("Ok")').click() await expect(page.locator('[data-test=output-messages]')).toContainText( - '67890' + '67890', ) // Now type the secret password await page.locator('.v-dialog >> input').type('abc123!') @@ -145,13 +145,13 @@ test('ask accepts default, password, and required', async ({ page, utils }) => { await expect(page.locator('[data-test=state]')).toHaveValue('waiting') // Verify we're not outputting the secret password on input await expect(page.locator('[data-test=output-messages]')).not.toContainText( - 'abc123!' + 'abc123!', ) // Once we restart we should see it since we print it await page.locator('[data-test=go-button]').click() await expect(page.locator('[data-test=state]')).toHaveValue('stopped') await expect(page.locator('[data-test=output-messages]')).toContainText( - 'abc123!' + 'abc123!', ) }) @@ -171,17 +171,17 @@ test('converts value for ask but not ask_string', async ({ page, utils }) => { await page.locator('.v-dialog >> input').type('123') await page.locator('.v-dialog >> button:has-text("Ok")').click() await expect(page.locator('[data-test=output-messages]')).toContainText( - 'int:123 Integer' + 'int:123 Integer', ) await page.locator('.v-dialog >> input').type('5.5') await page.locator('.v-dialog >> button:has-text("Ok")').click() await expect(page.locator('[data-test=output-messages]')).toContainText( - 'float:5.5 Float' + 'float:5.5 Float', ) await page.locator('.v-dialog >> input').type('5.5') await page.locator('.v-dialog >> button:has-text("Ok")').click() await expect(page.locator('[data-test=output-messages]')).toContainText( - 'string:5.5 String' + 'string:5.5 String', ) await expect(page.locator('[data-test=state]')).toHaveValue('stopped') }) @@ -202,7 +202,7 @@ test('opens a dialog with buttons for message_box, vertical_message_box', async }) await page.locator('.v-dialog >> button:has-text("Cancel")').click() await expect(page.locator('[data-test=output-messages]')).toContainText( - 'User input: Cancel' + 'User input: Cancel', ) await expect(page.locator('[data-test=state]')).toHaveValue('paused') @@ -213,7 +213,7 @@ test('opens a dialog with buttons for message_box, vertical_message_box', async await expect(page.locator('[data-test=state]')).toHaveValue('stopped') await expect(page.locator('[data-test=output-messages]')).toContainText('TWO') await expect(page.locator('[data-test=output-messages]')).toContainText( - 'FOUR' + 'FOUR', ) }) @@ -228,7 +228,7 @@ test('opens a dialog with dropdowns for combo_box', async ({ page, utils }) => { }) await page.locator('.v-dialog >> button:has-text("Cancel")').click() await expect(page.locator('[data-test=output-messages]')).toContainText( - 'User input: Cancel' + 'User input: Cancel', ) await expect(page.locator('[data-test=state]')).toHaveValue('paused') @@ -240,7 +240,7 @@ test('opens a dialog with dropdowns for combo_box', async ({ page, utils }) => { await page.locator('.v-dialog >> button:has-text("Ok")').click() await expect(page.locator('[data-test=state]')).toHaveValue('stopped') await expect(page.locator('[data-test=output-messages]')).toContainText( - 'User input: def456' + 'User input: def456', ) }) @@ -257,7 +257,7 @@ test('opens a dialog for prompt', async ({ page, utils }) => { await expect(page.locator('.v-dialog')).toContainText('Continue?') await page.locator('.v-dialog >> button:has-text("Cancel")').click() await expect(page.locator('[data-test=output-messages]')).toContainText( - 'User input: Cancel' + 'User input: Cancel', ) await expect(page.locator('[data-test=state]')).toHaveValue('paused') @@ -282,7 +282,7 @@ test.skip('opens a file dialog', async ({ page, utils }) => { }) await expect(page.locator('.v-dialog')).toContainText('Open a single file') await expect(page.locator('.v-dialog')).toContainText( - 'Choose something interesting' + 'Choose something interesting', ) await page.locator('.v-dialog >> button:has-text("Cancel")').click() await expect(page.locator('[data-test=state]')).toHaveValue('paused') @@ -302,9 +302,9 @@ test.skip('opens a file dialog', async ({ page, utils }) => { await page.locator('.v-dialog >> button:has-text("Ok")').click() await expect(page.locator('[data-test=state]')).toHaveValue('stopped') await expect(page.locator('[data-test=output-messages]')).toContainText( - 'File(s): [".env"]' + 'File(s): [".env"]', ) await expect(page.locator('[data-test=output-messages]')).toContainText( - 'RUBYGEMS_URL' + 'RUBYGEMS_URL', ) }) diff --git a/playwright/tests/script-runner/script-menu.spec.ts b/playwright/tests/script-runner/script-menu.spec.ts index cd92095c58..1ada88d95c 100644 --- a/playwright/tests/script-runner/script-menu.spec.ts +++ b/playwright/tests/script-runner/script-menu.spec.ts @@ -13,7 +13,7 @@ # GNU Affero General Public License for more details. # # Modified by OpenC3, Inc. -# All changes Copyright 2022, OpenC3, Inc. +# All changes Copyright 2023, OpenC3, Inc. # All Rights Reserved */ diff --git a/playwright/tests/script-runner/suite.spec.ts b/playwright/tests/script-runner/suite.spec.ts index 9b9489f81e..51b60c6a86 100644 --- a/playwright/tests/script-runner/suite.spec.ts +++ b/playwright/tests/script-runner/suite.spec.ts @@ -13,7 +13,7 @@ # GNU Affero General Public License for more details. # # Modified by OpenC3, Inc. -# All changes Copyright 2022, OpenC3, Inc. +# All changes Copyright 2023, OpenC3, Inc. # All Rights Reserved */ @@ -43,7 +43,7 @@ async function saveAs(page, filename: string) { await expect(page.locator('[data-test=start-suite]')).toBeVisible() expect(await page.locator('#sr-controls')).toContainText( - `INST/procedures/${filename}` + `INST/procedures/${filename}`, ) } @@ -61,7 +61,7 @@ async function runAndCheckResults( utils, startLocator, validator, - download = false + download = false, ) { await page.locator(startLocator).click() // Wait for the results ... allow for additional time @@ -69,7 +69,7 @@ async function runAndCheckResults( 'Script Results', { timeout: 30000, - } + }, ) // Allow the caller to validate the results validator(await page.inputValue('.v-dialog >> textarea')) @@ -82,7 +82,7 @@ async function runAndCheckResults( function (contents) { expect(contents).toContain('Script Report') validator(contents) - } + }, ) } await page.locator('button:has-text("Ok")').click() @@ -94,11 +94,11 @@ test('generates a suite template', async ({ page, utils }) => { await utils.sleep(1000) // Verify the drop downs are populated await expect( - page.locator('role=button[name="Suite: TestSuite"]') + page.locator('role=button[name="Suite: TestSuite"]'), ).toBeEnabled() await expect(page.locator('role=button[name="Group: Power"]')).toBeEnabled() await expect( - page.locator('role=button[name="Script: script_power_on"]') + page.locator('role=button[name="Script: script_power_on"]'), ).toBeEnabled() // // Verify Suite Start buttons are enabled await expect(page.locator('[data-test=start-suite]')).toBeEnabled() @@ -117,7 +117,7 @@ test('loads Suite controls when opening a suite', async ({ page, utils }) => { await page.locator('text=script_suite >> nth=0').click() // nth=0 because INST, INST2 await page.locator('[data-test=file-open-save-submit-btn]').click() expect(await page.locator('#sr-controls')).toContainText( - `INST/procedures/my_script_suite.rb` + `INST/procedures/my_script_suite.rb`, ) // Verify defaults in the Suite options await expect(page.locator('[data-test=pause-on-error]')).toBeChecked() @@ -129,10 +129,10 @@ test('loads Suite controls when opening a suite', async ({ page, utils }) => { // Verify the drop downs are populated await expect(page.locator('role=button[name="Suite: MySuite"]')).toBeEnabled() await expect( - page.locator('role=button[name="Group: ExampleGroup"]') + page.locator('role=button[name="Group: ExampleGroup"]'), ).toBeEnabled() await expect( - page.locator('role=button[name="Script: script_2"]') + page.locator('role=button[name="Script: script_2"]'), ).toBeEnabled() // // Verify Suite Start buttons are enabled await expect(page.locator('[data-test=start-suite]')).toBeEnabled() @@ -151,7 +151,7 @@ test('loads Suite controls when opening a suite', async ({ page, utils }) => { await page.locator('text=disconnect >> nth=0').click() // nth=0 because INST, INST2 await page.locator('[data-test=file-open-save-submit-btn]').click() expect(await page.locator('#sr-controls')).toContainText( - `INST/procedures/disconnect.rb` + `INST/procedures/disconnect.rb`, ) await expect(page.locator('[data-test=start-suite]')).not.toBeVisible() await expect(page.locator('[data-test=start-group]')).not.toBeVisible() @@ -225,7 +225,7 @@ test('starts a suite', async ({ page, utils }) => { expect(textarea).toMatch('setup:PASS') expect(textarea).toMatch('Total Tests: 1') expect(textarea).toMatch('Pass: 1') - } + }, ) // Run suite teardown @@ -237,7 +237,7 @@ test('starts a suite', async ({ page, utils }) => { expect(textarea).toMatch('teardown:PASS') expect(textarea).toMatch('Total Tests: 1') expect(textarea).toMatch('Pass: 1') - } + }, ) // Run suite @@ -251,7 +251,7 @@ test('starts a suite', async ({ page, utils }) => { expect(textarea).toMatch('Total Tests: 3') expect(textarea).toMatch('Pass: 3') }, - true + true, ) // Rewrite the script but remove setup and teardown @@ -322,7 +322,7 @@ test('starts a group', async ({ page, utils }) => { expect(textarea).toMatch('setup:PASS') expect(textarea).toMatch('Total Tests: 1') expect(textarea).toMatch('Pass: 1') - } + }, ) // Run group teardown @@ -334,7 +334,7 @@ test('starts a group', async ({ page, utils }) => { expect(textarea).toMatch('teardown:PASS') expect(textarea).toMatch('Total Tests: 1') expect(textarea).toMatch('Pass: 1') - } + }, ) // Run group @@ -347,7 +347,7 @@ test('starts a group', async ({ page, utils }) => { expect(textarea).toMatch('teardown:PASS') expect(textarea).toMatch('Total Tests: 3') expect(textarea).toMatch('Pass: 3') - } + }, ) // Rewrite the script but remove setup and teardown @@ -414,7 +414,7 @@ test('starts a script', async ({ page, utils }) => { expect(textarea).toMatch('test1') expect(textarea).toMatch('Total Tests: 1') expect(textarea).toMatch('Pass: 1') - } + }, ) await deleteFile(page) }) @@ -446,7 +446,7 @@ test('handles manual mode', async ({ page, utils }) => { expect(textarea).not.toMatch('manual2') expect(textarea).toMatch('Total Tests: 2') expect(textarea).toMatch('Pass: 2') - } + }, ) await page.locator('label:has-text("Manual")').click() // uncheck Manual // Run group @@ -460,7 +460,7 @@ test('handles manual mode', async ({ page, utils }) => { expect(textarea).toMatch('manual2') expect(textarea).toMatch('Total Tests: 2') expect(textarea).toMatch('Pass: 2') - } + }, ) await deleteFile(page) }) diff --git a/playwright/tests/table-manager.spec.ts b/playwright/tests/table-manager.spec.ts index 136dbd8122..1c3d4f161e 100644 --- a/playwright/tests/table-manager.spec.ts +++ b/playwright/tests/table-manager.spec.ts @@ -13,7 +13,7 @@ # GNU Affero General Public License for more details. # # Modified by OpenC3, Inc. -# All changes Copyright 2022, OpenC3, Inc. +# All changes Copyright 2023, OpenC3, Inc. # All Rights Reserved */ diff --git a/playwright/tests/tlm-grapher.spec.ts b/playwright/tests/tlm-grapher.spec.ts index 42779cf67e..c5dfdcc72d 100644 --- a/playwright/tests/tlm-grapher.spec.ts +++ b/playwright/tests/tlm-grapher.spec.ts @@ -13,7 +13,7 @@ # GNU Affero General Public License for more details. # # Modified by OpenC3, Inc. -# All changes Copyright 2022, OpenC3, Inc. +# All changes Copyright 2023, OpenC3, Inc. # All Rights Reserved */ diff --git a/playwright/tests/tlm-viewer.spec.ts b/playwright/tests/tlm-viewer.spec.ts index 7e0b9f0088..7ae0348285 100644 --- a/playwright/tests/tlm-viewer.spec.ts +++ b/playwright/tests/tlm-viewer.spec.ts @@ -13,7 +13,7 @@ # GNU Affero General Public License for more details. # # Modified by OpenC3, Inc. -# All changes Copyright 2022, OpenC3, Inc. +# All changes Copyright 2023, OpenC3, Inc. # All Rights Reserved */ @@ -38,14 +38,14 @@ async function showScreen(page, target, screen, callback = null) { await page.locator('div[role="button"]:has-text("Select Screen")').click() await page.locator(`.v-list-item__title:text-is("${screen}")`).click() await expect( - page.locator(`.v-system-bar:has-text("${target} ${screen}")`) + page.locator(`.v-system-bar:has-text("${target} ${screen}")`), ).toBeVisible() if (callback) { await callback() } await page.locator('[data-test=close-screen-icon]').click() await expect( - page.locator(`.v-system-bar:has-text("${target} ${screen}")`) + page.locator(`.v-system-bar:has-text("${target} ${screen}")`), ).not.toBeVisible() } @@ -83,13 +83,13 @@ test('displays INST COMMANDING', async ({ page, utils }) => { await page.getByRole('button', { name: 'Send' }).click() await expect( - page.getByText('Warning: Command is Hazardous. Send?') + page.getByText('Warning: Command is Hazardous. Send?'), ).toBeVisible() await page.getByRole('button', { name: 'Yes' }).click() // Click on the Run Script: select ... this was generated by playwright codegen await page .locator( - 'div:nth-child(7) > .d-flex > div > .v-input__control > .v-input__slot' + 'div:nth-child(7) > .d-flex > div > .v-input__control > .v-input__slot', ) .first() .click() @@ -138,34 +138,34 @@ test('displays INST LAUNCHER', async ({ page, utils }) => { await page.locator('div[role="button"]:has-text("Select Screen")').click() await page.locator(`.v-list-item__title:text-is("LAUNCHER")`).click() await expect( - page.locator('.v-system-bar:has-text("INST LAUNCHER")') + page.locator('.v-system-bar:has-text("INST LAUNCHER")'), ).toBeVisible() await page.getByRole('button', { name: 'HS', exact: true }).click() await expect(page.locator('.v-system-bar:has-text("INST HS")')).toBeVisible() await page.getByRole('button', { name: 'CMD', exact: true }).click() await expect( - page.locator('.v-system-bar:has-text("INST COMMANDING")') + page.locator('.v-system-bar:has-text("INST COMMANDING")'), ).toBeVisible() await page.getByRole('button', { name: 'GROUND', exact: true }).click() await expect( - page.locator('.v-system-bar:has-text("INST GROUND")') + page.locator('.v-system-bar:has-text("INST GROUND")'), ).toBeVisible() await page.getByRole('button', { name: 'Close HS & CMD' }).click() await expect( - page.locator('.v-system-bar:has-text("INST HS")') + page.locator('.v-system-bar:has-text("INST HS")'), ).not.toBeVisible() await expect( - page.locator('.v-system-bar:has-text("INST COMMANDING")') + page.locator('.v-system-bar:has-text("INST COMMANDING")'), ).not.toBeVisible() await expect( - page.locator('.v-system-bar:has-text("INST GROUND")') + page.locator('.v-system-bar:has-text("INST GROUND")'), ).toBeVisible() await page.getByRole('button', { name: 'Close All' }).click() await expect( - page.locator('.v-system-bar:has-text("INST GROUND")') + page.locator('.v-system-bar:has-text("INST GROUND")'), ).not.toBeVisible() await expect( - page.locator('.v-system-bar:has-text("INST LAUNCHER")') + page.locator('.v-system-bar:has-text("INST LAUNCHER")'), ).not.toBeVisible() }) @@ -191,7 +191,7 @@ test('displays INST SIMPLE', async ({ page, utils }) => { await expect(page.locator(`text=${text}`)).toBeVisible() await page.locator('[data-test=edit-screen-icon]').click() await expect( - page.locator(`.v-system-bar:has-text("Edit Screen")`) + page.locator(`.v-system-bar:has-text("Edit Screen")`), ).toBeVisible() await utils.download( page, @@ -199,11 +199,11 @@ test('displays INST SIMPLE', async ({ page, utils }) => { function (contents) { expect(contents).toContain(`LABEL ${text}`) expect(contents).toContain('BIG INST HEALTH_STATUS TEMP2') - } + }, ) await page.locator('button:has-text("Cancel")').click() await expect( - page.locator(`.v-system-bar:has-text("Edit Screen")`) + page.locator(`.v-system-bar:has-text("Edit Screen")`), ).not.toBeVisible() }) }) @@ -220,7 +220,7 @@ test('creates new blank screen', async ({ page, utils }) => { await utils.sleep(500) await page.locator('[data-test=new-screen]').click() await expect( - page.locator(`.v-system-bar:has-text("New Screen")`) + page.locator(`.v-system-bar:has-text("New Screen")`), ).toBeVisible() // Spot check the list of existing screens await expect(page.locator(`.v-dialog:has-text("ADCS")`)).toBeVisible() @@ -230,12 +230,12 @@ test('creates new blank screen', async ({ page, utils }) => { // Check trying to create an existing screen await page.locator('[data-test=new-screen-name]').type('ADCS') await expect(page.locator('.v-dialog')).toContainText( - 'Screen ADCS already exists!' + 'Screen ADCS already exists!', ) await page.locator('[data-test=new-screen-name]').fill(screen) await page.locator('button:has-text("Ok")').click() await expect( - page.locator(`.v-system-bar:has-text("INST ${screen}")`) + page.locator(`.v-system-bar:has-text("INST ${screen}")`), ).toBeVisible() }) @@ -245,18 +245,18 @@ test('creates new screen based on packet', async ({ page, utils }) => { await utils.sleep(500) await page.locator('[data-test=new-screen]').click() await expect( - page.locator(`.v-system-bar:has-text("New Screen")`) + page.locator(`.v-system-bar:has-text("New Screen")`), ).toBeVisible() await page.locator('.v-dialog [data-test=new-screen-packet]').click() await page .locator(`div[role="option"] div:text-matches("HEALTH_STATUS")`) .click() expect(await page.inputValue('[data-test=new-screen-name]')).toMatch( - 'health_status' + 'health_status', ) await page.locator('button:has-text("Ok")').click() await expect( - page.locator(`.v-system-bar:has-text("INST HEALTH_STATUS")`) + page.locator(`.v-system-bar:has-text("INST HEALTH_STATUS")`), ).toBeVisible() }) @@ -271,13 +271,13 @@ async function deleteScreen(page, screen) { await page.locator('div[role="button"]:has-text("Select Screen")').click() await page.locator(`.v-list-item__title:text-is("${screen}")`).click() await expect( - page.locator(`.v-system-bar:has-text("INST ${screen}")`) + page.locator(`.v-system-bar:has-text("INST ${screen}")`), ).toBeVisible() await page.locator('[data-test=edit-screen-icon]').click() await page.locator('[data-test=delete-screen-icon]').click() await page.locator('button:has-text("Delete")').click() await page.locator('div[role="button"]:has-text("Select Screen")').click() await expect( - page.locator(`.v-list-item__title:text-is("${screen}")`) + page.locator(`.v-list-item__title:text-is("${screen}")`), ).not.toBeVisible() } diff --git a/playwright/tests/wait-for-build.spec.ts b/playwright/tests/wait-for-build.spec.ts index 6b291dc9ce..01051bfd4c 100644 --- a/playwright/tests/wait-for-build.spec.ts +++ b/playwright/tests/wait-for-build.spec.ts @@ -13,23 +13,26 @@ # GNU Affero General Public License for more details. # # Modified by OpenC3, Inc. -# All changes Copyright 2022, OpenC3, Inc. +# All changes Copyright 2023, OpenC3, Inc. # All Rights Reserved */ // @ts-check import { test, expect } from './fixture' -test('waits for the services to deploy and connect', async ({ page, utils }) => { +test('waits for the services to deploy and connect', async ({ + page, + utils, +}) => { await page.goto('/tools/cmdtlmserver') // Check the 3rd column (nth starts at 0) on the row containing INST_INT says CONNECTED await expect( - page.locator('tr:has-text("INST_INT") td >> nth=2') + page.locator('tr:has-text("INST_INT") td >> nth=2'), ).toContainText('CONNECTED', { timeout: 120000, }) await expect( - page.locator('tr:has-text("INST2_INT") td >> nth=2') + page.locator('tr:has-text("INST2_INT") td >> nth=2'), ).toContainText('CONNECTED', { timeout: 60000, })