Skip to content

Commit

Permalink
Rename launcher button (#461)
Browse files Browse the repository at this point in the history
* Rename launcher button

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
  • Loading branch information
martinRenou and pre-commit-ci[bot] authored Oct 8, 2024
1 parent 9d01e1d commit 305b0d6
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 11 deletions.
2 changes: 1 addition & 1 deletion python/jupytercad_app/src/app/plugins/launcher/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ const launcherPlugin: JupyterFrontEndPlugin<void> = {
if (!label) {
continue;
}
if (label.innerHTML.includes('New JCAD File')) {
if (label.innerHTML.includes('CAD File')) {
const els = element
.getElementsByClassName('jp-Launcher-sectionTitle')
?.item(0);
Expand Down
2 changes: 1 addition & 1 deletion python/jupytercad_core/src/jcadplugin/plugins.ts
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ const activate = (
});

app.commands.addCommand(CommandIDs.createNew, {
label: args => 'New JCAD File',
label: args => 'CAD File',
caption: 'Create a new JCAD Editor',
icon: logoIcon,
execute: async args => {
Expand Down
12 changes: 3 additions & 9 deletions ui-tests/tests/ui.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -300,12 +300,9 @@ test.describe('UI Test', () => {

test.describe('JCAD creation test', () => {
test.describe('Extension activation test', () => {
test('should create a new JCAD file', async ({ page, request }) => {
test('should create a CAD File', async ({ page, request }) => {
await page.goto();
await page
.getByLabel('notebook content')
.getByText('New JCAD File')
.click();
await page.getByLabel('notebook content').getByText('CAD File').click();

await page.getByTitle('New Box').getByRole('button').click();
await page.getByRole('button', { name: 'Submit' }).click();
Expand Down Expand Up @@ -361,10 +358,7 @@ test.describe('UI Test', () => {
test.describe('Console activation test', () => {
test('should open console', async ({ page }) => {
await page.goto();
await page
.getByLabel('notebook content')
.getByText('New JCAD File')
.click();
await page.getByLabel('notebook content').getByText('CAD File').click();
await page.getByRole('button', { name: 'Toggle console' }).click();
await page.getByRole('button', { name: 'Remove console' });
await page.getByRole('textbox').nth(1).click();
Expand Down

0 comments on commit 305b0d6

Please sign in to comment.