Skip to content

Commit

Permalink
Fix tests for enterprise
Browse files Browse the repository at this point in the history
  • Loading branch information
ryan-pratt committed Nov 21, 2024
1 parent 288b67a commit 9d667a4
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -103,27 +103,26 @@
>
<template v-slot:item.view="{ item }">
<v-btn color="primary" @click="viewScriptLog(item)">
<span v-if="item.name.includes('(') && item.name.includes(')')"
>Script Report</span
>
<span v-else>Script Log</span>
<span v-if="item.name.includes('(') && item.name.includes(')')">
Script Report
</span>
<span v-else> Script Log </span>
<v-icon right> mdi-eye </v-icon>
</v-btn>
</template>
<template v-slot:item.download="{ item }">
<v-btn
icon
:disabled="downloadScript"
:loading="downloadScript && downloadScript.name === item.name"
@click="downloadScriptLog(item)"
>
<span v-if="item.name.includes('(') && item.name.includes(')')"
>Script Report</span
>
<span v-else>Script Log</span>
<span v-if="item.name.includes('(') && item.name.includes(')')">
Script Report
</span>
<span v-else> Script Log </span>
<v-icon end> mdi-file-download-outline </v-icon>
<template v-slot:loader>
<span>Loading...</span>
<span> Loading... </span>
</template>
</v-btn>
</template>
Expand Down
2 changes: 1 addition & 1 deletion playwright/tests/bucket-explorer.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ test('direct URLs', async ({ page }) => {
test('view file', async ({ page, utils }) => {
await page.getByText('config').click()
await page.getByRole('cell', { name: 'DEFAULT' }).click()
await page.getByRole('cell', { name: 'targets' }).click()
await page.getByRole('cell', { name: 'targets', exact: true }).click()
await page.getByRole('cell', { name: 'INST', exact: true }).click()
await page.getByRole('cell', { name: 'procedures' }).click()
await page.locator('[data-test="search-input"] input').fill('calendar')
Expand Down
4 changes: 2 additions & 2 deletions playwright/tests/global.setup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ setup('global setup', async ({ page }) => {
}

// Logout and log back in as admin
await page.getByText('The Operator').click()
await page.locator('button:has-text("Logout")').click()
await page.getByText('The Operator', { exact: true }).click()
await page.getByRole('button', { name: 'Logout' }).click()
await page.waitForURL('**/auth/**')
await page.getByLabel('Username or email').fill('admin')
await page.getByLabel('Password', { exact: true }).fill('admin')
Expand Down
6 changes: 2 additions & 4 deletions playwright/tests/script-runner/script-menu.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,15 +51,13 @@ test('show started scripts', async ({ page, utils }) => {
await page.locator('text="Execution Status"').click()
await utils.sleep(1000)
// Each section has a Refresh button so click the first one
await page.locator('button:has-text("Refresh")').first().click()
await page.getByRole('button', { name: 'Refresh' }).first().click()
await expect(page.locator('[data-test=running-scripts]')).toContainText(
format(new Date(), 'yyyy_MM_dd'),
)

// Get out of the Running Scripts sheet
await page
.locator('#openc3-menu >> text=Script Runner')
.click({ force: true })
await page.keyboard.press('Escape')
await page.locator('[data-test=go-button]').click()
await expect(page.locator('[data-test=state] input')).toHaveValue('stopped')
await page.locator('[data-test=script-runner-script]').click()
Expand Down
5 changes: 5 additions & 0 deletions playwright/tests/utc-time.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ test.describe('CmdTlmServer', () => {
test.use({
toolPath: '/tools/cmdtlmserver',
toolName: 'CmdTlmServer',
storageState: 'adminStorageState.json',
})
test('displays in local or UTC time', async ({ page, utils }) => {
// Allow the table to populate
Expand Down Expand Up @@ -111,6 +112,7 @@ test.describe('Data Extractor', () => {
test.use({
toolPath: '/tools/dataextractor',
toolName: 'Data Extractor',
storageState: 'adminStorageState.json',
})

test('displays in local or UTC time', async ({ page, utils }) => {
Expand Down Expand Up @@ -210,6 +212,7 @@ test.describe('Data Viewer', () => {
test.use({
toolPath: '/tools/dataviewer',
toolName: 'Data Viewer',
storageState: 'adminStorageState.json',
})

test('displays in local or UTC time', async ({ page, utils }) => {
Expand Down Expand Up @@ -285,6 +288,7 @@ test.describe('Packet Viewer', () => {
test.use({
toolPath: '/tools/packetviewer',
toolName: 'Packet Viewer',
storageState: 'adminStorageState.json',
})

test('displays in local or UTC time', async ({ page, utils }) => {
Expand Down Expand Up @@ -367,6 +371,7 @@ test.describe('Telemetry Grapher', () => {
test.use({
toolPath: '/tools/tlmgrapher',
toolName: 'Telemetry Grapher',
storageState: 'adminStorageState.json',
})

test('displays in local or UTC time', async ({ page, utils }) => {
Expand Down

0 comments on commit 9d667a4

Please sign in to comment.