Skip to content

Commit

Permalink
Merge branch 'master' into 7055-add-expand-with-double-click
Browse files Browse the repository at this point in the history
  • Loading branch information
ozyx authored Jan 10, 2024
2 parents 590d94e + 3ff2f02 commit bc04900
Show file tree
Hide file tree
Showing 825 changed files with 1,519 additions and 1,150 deletions.
2 changes: 1 addition & 1 deletion LICENSE.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Open MCT License

Open MCT, Copyright (c) 2014-2023, United States Government as represented by the Administrator of the National Aeronautics and Space Administration. All rights reserved.
Open MCT, Copyright (c) 2014-2024, United States Government as represented by the Administrator of the National Aeronautics and Space Administration. All rights reserved.

Open MCT is licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.

Expand Down
2 changes: 1 addition & 1 deletion build-docs.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/bash

#*****************************************************************************
#* Open MCT, Copyright (c) 2014-2023, United States Government
#* Open MCT, Copyright (c) 2014-2024, United States Government
#* as represented by the Administrator of the National Aeronautics and Space
#* Administration. All rights reserved.
#*
Expand Down
2 changes: 1 addition & 1 deletion copyright-notice.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<!--
Open MCT, Copyright (c) 2014-2023, United States Government
Open MCT, Copyright (c) 2014-2024, United States Government
as represented by the Administrator of the National Aeronautics and Space
Administration. All rights reserved.
Expand Down
2 changes: 1 addition & 1 deletion copyright-notice.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*****************************************************************************
* Open MCT, Copyright (c) 2014-2023, United States Government
* Open MCT, Copyright (c) 2014-2024, United States Government
* as represented by the Administrator of the National Aeronautics and Space
* Administration. All rights reserved.
*
Expand Down
2 changes: 1 addition & 1 deletion e2e/appActions.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*****************************************************************************
* Open MCT, Copyright (c) 2014-2023, United States Government
* Open MCT, Copyright (c) 2014-2024, United States Government
* as represented by the Administrator of the National Aeronautics and Space
* Administration. All rights reserved.
*
Expand Down
2 changes: 1 addition & 1 deletion e2e/avpFixtures.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*****************************************************************************
* Open MCT, Copyright (c) 2014-2023, United States Government
* Open MCT, Copyright (c) 2014-2024, United States Government
* as represented by the Administrator of the National Aeronautics and Space
* Administration. All rights reserved.
*
Expand Down
2 changes: 1 addition & 1 deletion e2e/baseFixtures.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* eslint-disable no-undef */
/*****************************************************************************
* Open MCT, Copyright (c) 2014-2023, United States Government
* Open MCT, Copyright (c) 2014-2024, United States Government
* as represented by the Administrator of the National Aeronautics and Space
* Administration. All rights reserved.
*
Expand Down
5 changes: 3 additions & 2 deletions e2e/constants.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,9 @@ export const MISSION_TIME = 1732413600000; // Saturday, November 23, 2024 6:00:0

/**
* URL Constants
* - This is the URL that the browser will be directed to when running visual tests. This URL
* - This is the URL that the browser will be directed to when running visual tests. This URL
* - hides the tree and inspector to prevent visual noise
* - sets the time bounds to a fixed range
*/
export const VISUAL_URL = './#/browse/mine?tc.mode=fixed&tc.startBound=1693592063607&tc.endBound=1693593893607&tc.timeSystem=utc&view=grid&hideInspector=true&hideTree=true';
export const VISUAL_URL =
'./#/browse/mine?tc.mode=fixed&tc.startBound=1693592063607&tc.endBound=1693593893607&tc.timeSystem=utc&view=grid&hideInspector=true&hideTree=true';
2 changes: 1 addition & 1 deletion e2e/helper/addInitDataVisualization.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*****************************************************************************
* Open MCT, Copyright (c) 2014-2023, United States Government
* Open MCT, Copyright (c) 2014-2024, United States Government
* as represented by the Administrator of the National Aeronautics and Space
* Administration. All rights reserved.
*
Expand Down
2 changes: 1 addition & 1 deletion e2e/helper/addInitExampleFaultProvider.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*****************************************************************************
* Open MCT, Copyright (c) 2014-2023, United States Government
* Open MCT, Copyright (c) 2014-2024, United States Government
* as represented by the Administrator of the National Aeronautics and Space
* Administration. All rights reserved.
*
Expand Down
2 changes: 1 addition & 1 deletion e2e/helper/addInitExampleFaultProviderStatic.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*****************************************************************************
* Open MCT, Copyright (c) 2014-2023, United States Government
* Open MCT, Copyright (c) 2014-2024, United States Government
* as represented by the Administrator of the National Aeronautics and Space
* Administration. All rights reserved.
*
Expand Down
2 changes: 1 addition & 1 deletion e2e/helper/addInitExampleUser.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*****************************************************************************
* Open MCT, Copyright (c) 2014-2023, United States Government
* Open MCT, Copyright (c) 2014-2024, United States Government
* as represented by the Administrator of the National Aeronautics and Space
* Administration. All rights reserved.
*
Expand Down
2 changes: 1 addition & 1 deletion e2e/helper/addInitFaultManagementPlugin.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*****************************************************************************
* Open MCT, Copyright (c) 2014-2023, United States Government
* Open MCT, Copyright (c) 2014-2024, United States Government
* as represented by the Administrator of the National Aeronautics and Space
* Administration. All rights reserved.
*
Expand Down
2 changes: 1 addition & 1 deletion e2e/helper/addInitNotebookWithUrls.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*****************************************************************************
* Open MCT, Copyright (c) 2014-2023, United States Government
* Open MCT, Copyright (c) 2014-2024, United States Government
* as represented by the Administrator of the National Aeronautics and Space
* Administration. All rights reserved.
*
Expand Down
2 changes: 1 addition & 1 deletion e2e/helper/addInitOperatorStatus.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*****************************************************************************
* Open MCT, Copyright (c) 2014-2023, United States Government
* Open MCT, Copyright (c) 2014-2024, United States Government
* as represented by the Administrator of the National Aeronautics and Space
* Administration. All rights reserved.
*
Expand Down
2 changes: 1 addition & 1 deletion e2e/helper/addInitRestrictedNotebook.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*****************************************************************************
* Open MCT, Copyright (c) 2014-2023, United States Government
* Open MCT, Copyright (c) 2014-2024, United States Government
* as represented by the Administrator of the National Aeronautics and Space
* Administration. All rights reserved.
*
Expand Down
2 changes: 1 addition & 1 deletion e2e/helper/faultUtils.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*****************************************************************************
* Open MCT, Copyright (c) 2014-2023, United States Government
* Open MCT, Copyright (c) 2014-2024, United States Government
* as represented by the Administrator of the National Aeronautics and Space
* Administration. All rights reserved.
*
Expand Down
2 changes: 1 addition & 1 deletion e2e/helper/notebookUtils.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*****************************************************************************
* Open MCT, Copyright (c) 2014-2023, United States Government
* Open MCT, Copyright (c) 2014-2024, United States Government
* as represented by the Administrator of the National Aeronautics and Space
* Administration. All rights reserved.
*
Expand Down
26 changes: 22 additions & 4 deletions e2e/helper/planningUtils.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*****************************************************************************
* Open MCT, Copyright (c) 2014-2023, United States Government
* Open MCT, Copyright (c) 2014-2024, United States Government
* as represented by the Administrator of the National Aeronautics and Space
* Administration. All rights reserved.
*
Expand Down Expand Up @@ -113,17 +113,35 @@ export async function assertPlanOrderedSwimLanes(page, plan, objectUrl) {
* @param {string} planObjectUrl
*/
export async function setBoundsToSpanAllActivities(page, planJson, planObjectUrl) {
const activities = Object.values(planJson).flat();
// Get the earliest start value
const start = Math.min(...activities.map((activity) => activity.start));
const start = getEarliestStartTime(planJson);
// Get the latest end value
const end = Math.max(...activities.map((activity) => activity.end));
const end = getLatestEndTime(planJson);
// Set the start and end bounds to the earliest start and latest end
await page.goto(
`${planObjectUrl}?tc.mode=fixed&tc.startBound=${start}&tc.endBound=${end}&tc.timeSystem=utc&view=plan.view`
);
}

/**
* @param {object} planJson
* @returns {number}
*/
export function getEarliestStartTime(planJson) {
const activities = Object.values(planJson).flat();
return Math.min(...activities.map((activity) => activity.start));
}

/**
*
* @param {object} planJson
* @returns {number}
*/
export function getLatestEndTime(planJson) {
const activities = Object.values(planJson).flat();
return Math.max(...activities.map((activity) => activity.end));
}

/**
* Uses the Open MCT API to set the status of a plan to 'draft'.
* @param {import('@playwright/test').Page} page
Expand Down
2 changes: 1 addition & 1 deletion e2e/helper/plotTagsUtils.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*****************************************************************************
* Open MCT, Copyright (c) 2014-2023, United States Government
* Open MCT, Copyright (c) 2014-2024, United States Government
* as represented by the Administrator of the National Aeronautics and Space
* Administration. All rights reserved.
*
Expand Down
2 changes: 1 addition & 1 deletion e2e/helper/stylingUtils.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*****************************************************************************
* Open MCT, Copyright (c) 2014-2023, United States Government
* Open MCT, Copyright (c) 2014-2024, United States Government
* as represented by the Administrator of the National Aeronautics and Space
* Administration. All rights reserved.
*
Expand Down
2 changes: 1 addition & 1 deletion e2e/helper/useSnowTheme.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*****************************************************************************
* Open MCT, Copyright (c) 2014-2023, United States Government
* Open MCT, Copyright (c) 2014-2024, United States Government
* as represented by the Administrator of the National Aeronautics and Space
* Administration. All rights reserved.
*
Expand Down
2 changes: 1 addition & 1 deletion e2e/pluginFixtures.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* eslint-disable no-undef */
/*****************************************************************************
* Open MCT, Copyright (c) 2014-2023, United States Government
* Open MCT, Copyright (c) 2014-2024, United States Government
* as represented by the Administrator of the National Aeronautics and Space
* Administration. All rights reserved.
*
Expand Down
38 changes: 38 additions & 0 deletions e2e/test-data/examplePlans/ExamplePlan_Small3.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
{
"Group 1": [
{
"name": "Time until birthday",
"start": 1650320402000,
"end": 1660343797000,
"type": "Group 1",
"color": "orange",
"textColor": "white"
},
{
"name": "Time until supper",
"start": 1650320402000,
"end": 1650420410000,
"type": "Group 2",
"color": "blue",
"textColor": "white"
}
],
"Group 2": [
{
"name": "Time since the last time I ate",
"start": 1650320102001,
"end": 1650320102001,
"type": "Group 2",
"color": "green",
"textColor": "white"
},
{
"name": "Time since last accident",
"start": 1650320102002,
"end": 1650320102002,
"type": "Group 1",
"color": "yellow",
"textColor": "white"
}
]
}
2 changes: 1 addition & 1 deletion e2e/tests/framework/appActions.e2e.spec.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*****************************************************************************
* Open MCT, Copyright (c) 2014-2023, United States Government
* Open MCT, Copyright (c) 2014-2024, United States Government
* as represented by the Administrator of the National Aeronautics and Space
* Administration. All rights reserved.
*
Expand Down
2 changes: 1 addition & 1 deletion e2e/tests/framework/baseFixtures.e2e.spec.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*****************************************************************************
* Open MCT, Copyright (c) 2014-2023, United States Government
* Open MCT, Copyright (c) 2014-2024, United States Government
* as represented by the Administrator of the National Aeronautics and Space
* Administration. All rights reserved.
*
Expand Down
2 changes: 1 addition & 1 deletion e2e/tests/framework/exampleTemplate.e2e.spec.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*****************************************************************************
* Open MCT, Copyright (c) 2014-2023, United States Government
* Open MCT, Copyright (c) 2014-2024, United States Government
* as represented by the Administrator of the National Aeronautics and Space
* Administration. All rights reserved.
*
Expand Down
2 changes: 1 addition & 1 deletion e2e/tests/framework/generateLocalStorageData.e2e.spec.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*****************************************************************************
* Open MCT, Copyright (c) 2014-2022, United States Government
* Open MCT, Copyright (c) 2014-2024, United States Government
* as represented by the Administrator of the National Aeronautics and Space
* Administration. All rights reserved.
*
Expand Down
2 changes: 1 addition & 1 deletion e2e/tests/framework/pluginFixtures.e2e.spec.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*****************************************************************************
* Open MCT, Copyright (c) 2014-2023, United States Government
* Open MCT, Copyright (c) 2014-2024, United States Government
* as represented by the Administrator of the National Aeronautics and Space
* Administration. All rights reserved.
*
Expand Down
2 changes: 1 addition & 1 deletion e2e/tests/functional/branding.e2e.spec.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*****************************************************************************
* Open MCT, Copyright (c) 2014-2023, United States Government
* Open MCT, Copyright (c) 2014-2024, United States Government
* as represented by the Administrator of the National Aeronautics and Space
* Administration. All rights reserved.
*
Expand Down
2 changes: 1 addition & 1 deletion e2e/tests/functional/clearDataAction.e2e.spec.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*****************************************************************************
* Open MCT, Copyright (c) 2014-2023, United States Government
* Open MCT, Copyright (c) 2014-2024, United States Government
* as represented by the Administrator of the National Aeronautics and Space
* Administration. All rights reserved.
*
Expand Down
2 changes: 1 addition & 1 deletion e2e/tests/functional/couchdb.e2e.spec.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*****************************************************************************
* Open MCT, Copyright (c) 2014-2023, United States Government
* Open MCT, Copyright (c) 2014-2024, United States Government
* as represented by the Administrator of the National Aeronautics and Space
* Administration. All rights reserved.
*
Expand Down
2 changes: 1 addition & 1 deletion e2e/tests/functional/example/eventGenerator.e2e.spec.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*****************************************************************************
* Open MCT, Copyright (c) 2014-2023, United States Government
* Open MCT, Copyright (c) 2014-2024, United States Government
* as represented by the Administrator of the National Aeronautics and Space
* Administration. All rights reserved.
*
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*****************************************************************************
* Open MCT, Copyright (c) 2014-2023, United States Government
* Open MCT, Copyright (c) 2014-2024, United States Government
* as represented by the Administrator of the National Aeronautics and Space
* Administration. All rights reserved.
*
Expand Down
2 changes: 1 addition & 1 deletion e2e/tests/functional/forms.e2e.spec.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*****************************************************************************
* Open MCT, Copyright (c) 2014-2023, United States Government
* Open MCT, Copyright (c) 2014-2024, United States Government
* as represented by the Administrator of the National Aeronautics and Space
* Administration. All rights reserved.
*
Expand Down
2 changes: 1 addition & 1 deletion e2e/tests/functional/menu.e2e.spec.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*****************************************************************************
* Open MCT, Copyright (c) 2014-2023, United States Government
* Open MCT, Copyright (c) 2014-2024, United States Government
* as represented by the Administrator of the National Aeronautics and Space
* Administration. All rights reserved.
*
Expand Down
2 changes: 1 addition & 1 deletion e2e/tests/functional/moveAndLinkObjects.e2e.spec.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*****************************************************************************
* Open MCT, Copyright (c) 2014-2023, United States Government
* Open MCT, Copyright (c) 2014-2024, United States Government
* as represented by the Administrator of the National Aeronautics and Space
* Administration. All rights reserved.
*
Expand Down
19 changes: 11 additions & 8 deletions e2e/tests/functional/notification.e2e.spec.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*****************************************************************************
* Open MCT, Copyright (c) 2014-2023, United States Government
* Open MCT, Copyright (c) 2014-2024, United States Government
* as represented by the Administrator of the National Aeronautics and Space
* Administration. All rights reserved.
*
Expand Down Expand Up @@ -91,27 +91,30 @@ test.describe('Notification Overlay', () => {
// Create a new Display Layout object
await createDomainObjectWithDefaults(page, { type: 'Display Layout' });

// Dismiss notification banner
await page.getByRole('button', { name: 'Dismiss' }).click();

// Click on the button "Review 1 Notification"
await page.click('button[aria-label="Review 1 Notification"]');
await page.getByRole('button', { name: 'Review 1 Notification' }).click();

// Verify that Notification List is open
expect(await page.locator('div[role="dialog"]').isVisible()).toBe(true);
await expect(page.getByRole('dialog', { name: 'Overlay' })).toBeVisible();

// Wait until there is no Notification Banner
await page.waitForSelector('div[role="alert"]', { state: 'detached' });
await expect(page.getByRole('alert')).not.toBeAttached();

// Click on the "Close" button of the Notification List
await page.click('button[aria-label="Close"]');
await page.getByRole('button', { name: 'Close' }).click();

// On the Display Layout object, click on the "Edit" button
await page.click('button[title="Edit"]');
await page.getByRole('button', { name: 'Edit' }).click();

// Click on the "Save" button
await page.click('button[title="Save"]');
await page.getByRole('button', { name: 'Save' }).click();

await page.getByRole('listitem', { name: 'Save and Finish Editing' }).click();

// Verify that Notification List is NOT open
expect(await page.locator('div[role="dialog"]').isVisible()).toBe(false);
await expect(page.getByRole('dialog', { name: 'Overlay' })).toBeHidden();
});
});
2 changes: 1 addition & 1 deletion e2e/tests/functional/planning/ganttChart.e2e.spec.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*****************************************************************************
* Open MCT, Copyright (c) 2014-2023, United States Government
* Open MCT, Copyright (c) 2014-2024, United States Government
* as represented by the Administrator of the National Aeronautics and Space
* Administration. All rights reserved.
*
Expand Down
2 changes: 1 addition & 1 deletion e2e/tests/functional/planning/plan.e2e.spec.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*****************************************************************************
* Open MCT, Copyright (c) 2014-2023, United States Government
* Open MCT, Copyright (c) 2014-2024, United States Government
* as represented by the Administrator of the National Aeronautics and Space
* Administration. All rights reserved.
*
Expand Down
Loading

0 comments on commit bc04900

Please sign in to comment.