- Changed: Update Alfa to ^0.97.0 (#118)
- Added: The current version number is now exported. (#115)
-
Added:
SIP.upload
now also accepts the commit information as anOption
orResult
. (#114)This makes it easier to integrate with the
getCommitInformation
which provides it as aResult
.
-
Breaking:
SIP.upload
now requires asiteID
parameter. (#106)This should be the site ID of your site in the Siteimprove Intelligence Platform. It is used to group tests by site and generate more accurate metadata and aggregates.
-
Breaking:
CommitInformation
is now optional and some of its properties have been rennamed; see the package's changelog for explanations and migration advice. (#107)Previously,
SIP.upload
was automatically collecting some information about the latestgit
commit and sending it to the Siteimprove Intelligence Platform, unless opted out via theincludeGitInfo: false
option. This presented two main drawbacks:- (minor) This was heavily reliant on the directory being part of a
git
repository. For codebases that use a different version control system, not only this was useless, but no alternative was provided. - (major) This was heavily reliant on the Accessibility Code Checker running from a NodeJS environment, where access to the underlying filesystem and
git
was doable. Not only this prevented the Accessibility Code Checker to run seamlessly from other environments such as browser extensions or Cypress; but the mere fact of trying to bundleSIP.upload
for such environments (e.g. with Webpack) was causing the build to fail.
As a consequence, this release reverts a bit the approach on that information. The commit information is still valuable and can be used to name or group tests in an organised way (e.g., to follow the number of issues in a feature branch), but it now has to be provided by the caller. A
git
helper is still provided since it is by far the most used version control system.Concretely, the following changes have been made:
- The
CommitInformation.GitOrigin
field has been renamedCommitInformation.Origin
. SIP.upload
now accepts acommitInformation
option, of typeCommitInformation
; this in an object that must at least contain aBranchName
field with a string value. (note the starting uppercase inBranchName
).- If no
commitInformation
is provided, but thetestName
is a function, it will resolve to the default "Unnamed" test. - The
includeGitInfo
options ofSIP.upload
has been removed; if aCommitInformation
has been provided, it will automatically be uploaded.
In order to migrate from previous versions:
-
If you were using
includeGitInfo: false
to opt-out of it, simply remove the option as it is now an opt-in information. -
If you were using a
testName
function; you need to provide the commit information to the call. For this, use:import { getCommitInformation } from "@siteimprove/alfa-test-utils/git.js"; const gitInformation = await getCommitInformation(); SIP.upload({ ... // other options commitInformation: gitInformation, testName: (commitInfo) => ... // same function as previously }) ```
-
If you were not previously relying on the commit information but wish to keep uploading it, use:
import { getCommitInformation } from "@siteimprove/alfa-test-utils/git.js"; const gitInformation = await getCommitInformation(); SIP.upload({ ... // other options commitInformation: gitInformation, }) ```
Siteimprove recommends that you provide some basic commit information as it opens possibilities for filtering of the results and better reporting in the Siteimprove Intelligence Platform. As of November 2024, we are currently not relying on this information in any place, but it is likely that we will provide features using it in the future; therefore it might be easier to start providing it immediately instead of revisiting the codebase later.
- (minor) This was heavily reliant on the directory being part of a
-
Added: A
Rules.ARIAFilter
andRules.bestPracticesFilter
are now available. (#105)
- Changed: Update Alfa (#104)
- Changed: Update Alfa (#100)
- Changed: Update Alfa (#99)
-
Added:
SIP.upload
can now be called without an user email or API key, in which case it will return anErr
. (#96)That can nonetheless be passed to
Logging.fromAudit
which will then simply discard it. This makes it simpler to write tests without checking proactively the presence of the credentials and, e.g., run them both in environments where they are available and environments where they don't exist. -
Breaking:
Logging.prepare
andLogging.result
have been replaced byLogging.fromAudit
andLogging#print
. (#96)Migration: replace the
Logging.result(Logging.prepare(audit), pageReportUrl)
calls withLogging.fromAudit(audit, pageReportUrl).print()
. -
Breaking: The
Audit.Result
type has been renamed toAudit
. (#96)Migration: simply use
Audit
type wherever theAudit.Result
type was used.
-
Changed: Update Alfa (#98)
-
Added: An
Audit#toJSON
serialisation is now available. (#96) -
Added:
Logging.fromAudit
also accepts anAudit.JSON
input. (#96) -
Added: The audit and report functionalities can now be imported separately. (#96)
This resolves a problem where logging functionalities, highly depending on node, would crash bundlers and injections into other Javascript worlds when trying to import the full
@siteimprove/alfa-test-utils
package.
- Changed: Update Alfa (#95)
- Changed: Update Alfa (#94)
- Changed: Update Alfa and yarn (#87)
-
Changed: Content inside
<iframe>
is not checked anymore by default. (#81)This is often third party content, or separate pages that can be checked individually, hence it often makes less sense to re-check it as part of the full page.
If you want to include
<ifrme>
content in the reports, pass the{ outcomes: { includeIframe: true } }
toAudit.run
. Content of<iframe>
will nonetheless not be displayed in the Siteimprove Intelligence Platform Page Report, even if the uploaded result contains it.
- Changed: Reverting publication process. Use this version. (
0d018f8
)
- Changed: Dummy minor version to experiment with publish flow, use the previous or next minor version instead. (
4daf29d
)
- Changed: Update Alfa to ^0.92.0 (#78)
- Changed: Update Alfa (#75)
- Changed: Update Alfa (#68)
-
Added: Documentation for the
@siteimprove/alfa-test-utils
package. (#66) -
Added: Add utilities for pretty-printing console output (#64)
-
Added: New package for handling test utilities and interactions with the Siteimprove Intelligence Platform. (#59)
A new package is now available, intended to wrap several test utilities. It currently contains:
- a wrapper to upload audit results to the Siteimprove Intelligence Platform and see them in the Page Report;
- a helper to run an audit, selecting rules to use and outcomes to keep;
- a collection of filters to select the rules to run in the audit;
- a collection of filters to select the outcomes to keep in the audit.