Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reinstate acceptance tests (gts) #788

Merged
merged 6 commits into from
Jan 10, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions packages/core/__tests__/language-server/diagnostics.test.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { Project } from 'glint-monorepo-test-utils';
import { describe, beforeEach, afterEach, test, expect } from 'vitest';
import { stripIndent } from 'common-tags';
import { TextEdit } from 'vscode-languageserver-textdocument';

Check warning on line 4 in packages/core/__tests__/language-server/diagnostics.test.ts

View workflow job for this annotation

GitHub Actions / Lint

'TextEdit' is defined but never used. Allowed unused vars must match /^_/u

describe('Language Server: Diagnostics', () => {
let project!: Project;
Expand Down Expand Up @@ -123,7 +123,7 @@
expect(diagnostics).toMatchObject([
{
message: "Property 'foo' does not exist on type '{}'.",
source: 'ts',
source: 'glint',
code: 2339,
},
]);
Expand Down Expand Up @@ -165,7 +165,7 @@
expect(diagnostics).toMatchObject([
{
message: "Property 'foo' does not exist on type '{}'.",
source: 'ts',
source: 'glint',
code: 2339,
},
]);
Expand Down
5 changes: 0 additions & 5 deletions packages/vscode/__fixtures__/custom-app/src/index.custom

This file was deleted.

4 changes: 2 additions & 2 deletions packages/vscode/__tests__/smoketest-ember.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ describe.skip('Smoke test: Ember', () => {
expect(languages.getDiagnostics(templateURI)).toMatchObject([
{
message: "Property 'message' does not exist on type 'ColocatedLayoutComponent'.",
source: 'ts',
source: 'glint',
code: 2339,
range: new Range(0, 7, 0, 14),
},
Expand All @@ -77,7 +77,7 @@ describe.skip('Smoke test: Ember', () => {
expect(languages.getDiagnostics(scriptURI)).toMatchObject([
{
message: "Property 'foo' does not exist on type 'MyTestContext'.",
source: 'ts',
source: 'glint',
code: 2339,
range: new Range(17, 13, 17, 16),
},
Expand Down
20 changes: 12 additions & 8 deletions packages/vscode/__tests__/smoketest-template-imports.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import { describe, afterEach, test } from 'mocha';
import { expect } from 'expect';
import { waitUntil } from './helpers/async';

describe.skip('Smoke test: ETI Environment', () => {
describe('Smoke test: ETI Environment', () => {
const rootDir = path.resolve(__dirname, '../../__fixtures__/template-imports-app');

afterEach(async () => {
Expand Down Expand Up @@ -44,7 +44,7 @@ describe.skip('Smoke test: ETI Environment', () => {
expect(languages.getDiagnostics(scriptURI)).toMatchObject([
{
message: "Type 'number' is not assignable to type 'string'.",
source: 'ts',
source: 'glint',
code: 2322,
range: new Range(6, 13, 6, 19),
},
Expand Down Expand Up @@ -75,12 +75,14 @@ describe.skip('Smoke test: ETI Environment', () => {
new Range(new Position(10, 9), new Position(10, 9)),
);

expect(fixes.length).toBe(3);
expect(fixes.length).toBe(4);

expect(fixes[1].title).toBe(`Declare property 'undocumentedProperty'`);
const fix = fixes.find((fix) => fix.title === "Declare property 'undocumentedProperty'");

expect(fix).toBeDefined();

// apply the missing arg fix
await workspace.applyEdit(fixes![1].edit!);
await workspace.applyEdit(fix!.edit!);

await waitUntil(
() =>
Expand Down Expand Up @@ -113,12 +115,14 @@ describe.skip('Smoke test: ETI Environment', () => {
new Range(new Position(10, 12), new Position(10, 12)),
);

expect(fixes.length).toBe(3);
expect(fixes.length).toBe(4);

const fix = fixes.find((fix) => fix.title === "Declare property 'localProp'");

expect(fixes[1].title).toBe(`Declare property 'localProp'`);
expect(fix).toBeDefined();

// select ignore
await workspace.applyEdit(fixes![0].edit!);
await workspace.applyEdit(fix!.edit!);

await waitUntil(
() =>
Expand Down
Loading