Skip to content

Commit

Permalink
fix(appx): add check application id test and fix detect null application
Browse files Browse the repository at this point in the history
  • Loading branch information
ifurther committed May 8, 2024
1 parent 8a67540 commit db876e0
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 8 deletions.
2 changes: 1 addition & 1 deletion packages/app-builder-lib/src/targets/AppxTarget.ts
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ export default class AppXTarget extends Target {
} else if (restrictedApplicationIdValues.includes(result.toUpperCase())) {
const message = `AppX Application.Id cannot be some values`
throw new InvalidConfigurationError(message)
} else if (options.applicationId == null) {
} else if (result == null || options.applicationId == null) {
const message = `Please set appx.applicationId (or correct appx.identityName or name)`
throw new InvalidConfigurationError(message)
}
Expand Down
22 changes: 15 additions & 7 deletions test/src/windows/appxTest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,6 @@ it.ifDevOrWinCi(
app(
{
targets: Platform.WINDOWS.createTarget(["appx"], Arch.x64),
config: {
appx: {
applicationId: "01234Test.ApplicationDataSample",
},
},
},
{
projectDirCreated: async projectDir => {
Expand All @@ -39,7 +34,6 @@ it.ifDevOrWinCi(
targets: Platform.WINDOWS.createTarget(["appx"], Arch.x64),
config: {
appx: {
applicationId: "01234Test.ApplicationDataSample",
addAutoLaunchExtension: true,
},
},
Expand All @@ -48,6 +42,21 @@ it.ifDevOrWinCi(
)
)

it.ifDevOrWinCi(
"application id",
app(
{
targets: Platform.WINDOWS.createTarget(["appx"], Arch.x64),
config: {
appx: {
applicationId: "01234Test.ApplicationDataSample",
},
},
},
{}
)
)

const it2 = isEnvTrue(process.env.DO_APPX_CERT_STORE_AWARE_TEST) ? test : test.skip
it2.ifNotCi(
"certificateSubjectName",
Expand All @@ -70,7 +79,6 @@ it(
cscLink: protectedCscLink,
cscKeyPassword: "test",
appx: {
applicationId: "01234Test.ApplicationDataSample",
languages: ["de-DE", "ru-RU"],
minVersion: "10.0.16299.0",
maxVersionTested: "10.0.16299.0",
Expand Down

0 comments on commit db876e0

Please sign in to comment.